kernel: Provide only one _SYSCALL_HANDLER() macro

Use some preprocessor trickery to automatically deduce the amount of
arguments for the various _SYSCALL_HANDLERn() macros.  Makes the grunt
work of converting a bunch of kernel APIs to system calls slightly
easier.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This commit is contained in:
Leandro Pereira 2017-10-13 14:00:22 -07:00 committed by Anas Nashif
commit 6f99bdb02a
15 changed files with 56 additions and 42 deletions

View file

@ -47,7 +47,7 @@ void _impl_k_thread_abort(k_tid_t thread)
#endif
#ifdef CONFIG_USERSPACE
_SYSCALL_HANDLER1(k_thread_abort, thread_p)
_SYSCALL_HANDLER(k_thread_abort, thread_p)
{
struct k_thread *thread = (struct k_thread *)thread_p;
_SYSCALL_OBJ(thread, K_OBJ_THREAD);