Add task_setcancelstate()

This commit is contained in:
Gregory Nutt
2016-12-10 15:16:46 -06:00
parent 698597a838
commit 5fb207eb36
9 changed files with 156 additions and 81 deletions
+2
View File
@@ -229,6 +229,8 @@ int task_create(FAR const char *name, int priority, int stack_size,
int task_delete(pid_t pid);
int task_restart(pid_t pid);
int task_setcancelstate(int state, FAR int *oldstate);
/* Task Scheduling Interfaces (based on POSIX APIs) */
int sched_setparam(pid_t pid, const struct sched_param *param);
+11 -11
View File
@@ -128,8 +128,9 @@
# define SYS_task_delete __SYS_task_delete
# define SYS_task_restart (__SYS_task_delete+1)
# define SYS_up_assert (__SYS_task_delete+2)
# define __SYS_vfork (__SYS_task_delete+3)
# define SYS_task_setcancelstate (__SYS_task_delete+2)
# define SYS_up_assert (__SYS_task_delete+3)
# define __SYS_vfork (__SYS_task_delete+4)
/* The following can be individually enabled */
@@ -400,18 +401,17 @@
# define SYS_pthread_mutex_trylock (__SYS_pthread+20)
# define SYS_pthread_mutex_unlock (__SYS_pthread+21)
# define SYS_pthread_once (__SYS_pthread+22)
# define SYS_pthread_setcancelstate (__SYS_pthread+23)
# define SYS_pthread_setschedparam (__SYS_pthread+24)
# define SYS_pthread_setschedprio (__SYS_pthread+25)
# define SYS_pthread_setspecific (__SYS_pthread+26)
# define SYS_pthread_yield (__SYS_pthread+27)
# define SYS_pthread_setschedparam (__SYS_pthread+23)
# define SYS_pthread_setschedprio (__SYS_pthread+24)
# define SYS_pthread_setspecific (__SYS_pthread+25)
# define SYS_pthread_yield (__SYS_pthread+26)
# ifdef CONFIG_CANCELLATION_POINTS
# define SYS_pthread_setcanceltype (__SYS_pthread+28)
# define SYS_pthread_testcancel (__SYS_pthread+29)
# define __SYS_pthread_smp (__SYS_pthread+30)
# define SYS_pthread_setcanceltype (__SYS_pthread+27)
# define SYS_pthread_testcancel (__SYS_pthread+28)
# define __SYS_pthread_smp (__SYS_pthread+29)
# else
# define __SYS_pthread_smp (__SYS_pthread+28)
# define __SYS_pthread_smp (__SYS_pthread+27)
# endif
# ifdef CONFIG_SMP