diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-09-28 12:19:01 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-09-28 12:19:01 -0600 |
commit | 1398381d05cea7c71d83138e36d57b06278bfa33 (patch) | |
tree | 426c11fc6e2b9d8435180dea352d2409c229dd99 /nuttx/include/sys | |
parent | 465f0eba5068ad78d659ad5c75cf3e91da60b8c3 (diff) | |
download | px4-nuttx-1398381d05cea7c71d83138e36d57b06278bfa33.tar.gz px4-nuttx-1398381d05cea7c71d83138e36d57b06278bfa33.tar.bz2 px4-nuttx-1398381d05cea7c71d83138e36d57b06278bfa33.zip |
Create a build structure that will (eventually) support using the VFS to manage named semaphores
Diffstat (limited to 'nuttx/include/sys')
-rw-r--r-- | nuttx/include/sys/syscall.h | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/nuttx/include/sys/syscall.h b/nuttx/include/sys/syscall.h index 6a350eb0a..4a85ee331 100644 --- a/nuttx/include/sys/syscall.h +++ b/nuttx/include/sys/syscall.h @@ -80,31 +80,42 @@ #define SYS_sched_setscheduler (CONFIG_SYS_RESERVED+10) #define SYS_sched_unlock (CONFIG_SYS_RESERVED+11) #define SYS_sched_yield (CONFIG_SYS_RESERVED+12) -#define SYS_sem_close (CONFIG_SYS_RESERVED+13) +#define SYS_set_errno (CONFIG_SYS_RESERVED+13) + +/* Semaphores */ + #define SYS_sem_destroy (CONFIG_SYS_RESERVED+14) -#define SYS_sem_open (CONFIG_SYS_RESERVED+15) -#define SYS_sem_post (CONFIG_SYS_RESERVED+16) -#define SYS_sem_timedwait (CONFIG_SYS_RESERVED+17) -#define SYS_sem_trywait (CONFIG_SYS_RESERVED+18) -#define SYS_sem_unlink (CONFIG_SYS_RESERVED+19) -#define SYS_sem_wait (CONFIG_SYS_RESERVED+20) -#define SYS_set_errno (CONFIG_SYS_RESERVED+21) +#define SYS_sem_post (CONFIG_SYS_RESERVED+15) +#define SYS_sem_timedwait (CONFIG_SYS_RESERVED+16) +#define SYS_sem_trywait (CONFIG_SYS_RESERVED+17) +#define SYS_sem_wait (CONFIG_SYS_RESERVED+18) + +/* Named semaphores */ + +#ifdef CONFIG_FS_NAMED_SEMAPHORES +# define SYS_sem_open (CONFIG_SYS_RESERVED+19) +# define SYS_sem_close (CONFIG_SYS_RESERVED+20) +# define SYS_sem_unlink (CONFIG_SYS_RESERVED+21) +# define __SYS_task_create (CONFIG_SYS_RESERVED+22) +#else +# define __SYS_task_create (CONFIG_SYS_RESERVED+19) +#endif /* Task creation APIs based on global entry points cannot be use with * address environments. */ #ifndef CONFIG_BUILD_KERNEL -# define SYS_task_create (CONFIG_SYS_RESERVED+22) -# define __SYS_task_delete (CONFIG_SYS_RESERVED+23) +# define SYS_task_create __SYS_task_create +# define __SYS_task_delete (__SYS_task_create+1) /* pgalloc() is only available with address environments with the page * allocator selected. MMU support from the CPU is also required. */ #else -# define SYS_pgalloc (CONFIG_SYS_RESERVED+22) -# define __SYS_task_delete (CONFIG_SYS_RESERVED+23) +# define SYS_pgalloc __SYS_task_create +# define __SYS_task_delete (__SYS_task_create+1) #endif # define SYS_task_delete __SYS_task_delete |