kernel: greatly simplify syscall handlers
We now have macros which should significantly reduce the amount of boilerplate involved with defining system call handlers. - Macros which define the proper prototype based on number of arguments - "SIMPLE" variants which create handlers that don't need anything other than object verification Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
e5b5407ece
commit
225e4c0e76
15 changed files with 245 additions and 396 deletions
|
@ -47,12 +47,11 @@ void _impl_k_thread_abort(k_tid_t thread)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_USERSPACE
|
||||
u32_t _handler_k_thread_abort(u32_t thread_p, u32_t arg2, u32_t arg3,
|
||||
u32_t arg4, u32_t arg5, u32_t arg6, void *ssf)
|
||||
_SYSCALL_HANDLER1(k_thread_abort, thread_p)
|
||||
{
|
||||
struct k_thread *thread = (struct k_thread *)thread_p;
|
||||
_SYSCALL_OBJ(thread, K_OBJ_THREAD, ssf);
|
||||
_SYSCALL_VERIFY_MSG(!(thread->base.user_options & K_ESSENTIAL), ssf,
|
||||
_SYSCALL_OBJ(thread, K_OBJ_THREAD);
|
||||
_SYSCALL_VERIFY_MSG(!(thread->base.user_options & K_ESSENTIAL),
|
||||
"aborting essential thread %p", thread);
|
||||
|
||||
_impl_k_thread_abort((struct k_thread *)thread);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue