kernel: userspace.c code cleanup

- Dumping error messages split from _k_object_validate(), to avoid spam
  in test cases that are expected to have failure result.

- _k_object_find() prototype moved to syscall_handler.h

- Clean up k_object_access() implementation to avoid double object
  lookup and use single validation function

- Added comments, minor whitespace changes

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2017-10-10 09:31:32 -07:00 committed by Anas Nashif
commit 7e3d3d782f
5 changed files with 141 additions and 84 deletions

View file

@ -131,6 +131,8 @@ struct k_mem_partition;
* function in kernel/userspace.c
*/
enum k_objects {
K_OBJ_ANY,
/* Core kernel objects */
K_OBJ_ALERT,
K_OBJ_MSGQ,