includes/nuttx: fix _SCHED_GET(T/P/PP)ID definition issue
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
parent
f7dfe8326f
commit
9369b75ee5
@ -148,6 +148,9 @@
|
||||
*/
|
||||
|
||||
#if !defined(CONFIG_BUILD_FLAT) && defined(__KERNEL__)
|
||||
# define _SCHED_GETTID() nxsched_gettid()
|
||||
# define _SCHED_GETPID() nxsched_getpid()
|
||||
# define _SCHED_GETPPID() nxsched_getppid()
|
||||
# define _SCHED_GETPARAM(t,p) nxsched_get_param(t,p)
|
||||
# define _SCHED_SETPARAM(t,p) nxsched_set_param(t,p)
|
||||
# define _SCHED_GETSCHEDULER(t) nxsched_get_scheduler(t)
|
||||
@ -157,6 +160,9 @@
|
||||
# define _SCHED_ERRNO(r) (-(r))
|
||||
# define _SCHED_ERRVAL(r) (r)
|
||||
#else
|
||||
# define _SCHED_GETTID() gettid()
|
||||
# define _SCHED_GETPID() getpid()
|
||||
# define _SCHED_GETPPID() getppid()
|
||||
# define _SCHED_GETPARAM(t,p) sched_getparam(t,p)
|
||||
# define _SCHED_SETPARAM(t,p) sched_setparam(t,p)
|
||||
# define _SCHED_GETSCHEDULER(t) sched_getscheduler(t)
|
||||
@ -167,16 +173,6 @@
|
||||
# define _SCHED_ERRVAL(r) (-errno)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
|
||||
# define _SCHED_GETTID() nxsched_gettid()
|
||||
# define _SCHED_GETPID() nxsched_getpid()
|
||||
# define _SCHED_GETPPID() nxsched_getppid()
|
||||
#else
|
||||
# define _SCHED_GETTID() gettid()
|
||||
# define _SCHED_GETPID() getpid()
|
||||
# define _SCHED_GETPPID() getppid()
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_TCBINFO
|
||||
# define TCB_PID_OFF offsetof(struct tcb_s, pid)
|
||||
# define TCB_STATE_OFF offsetof(struct tcb_s, task_state)
|
||||
|
Loading…
Reference in New Issue
Block a user