Revert "includes/nuttx: fix _SCHED_GET(T/P/PP)ID definition issue"
This reverts commit 9369b75ee5.
Signed-off-by: Ville Juven <ville.juven@unikie.com>
This commit is contained in:
parent
04e760b1c2
commit
850cfb545a
1 changed files with 10 additions and 6 deletions
|
|
@ -155,9 +155,6 @@
|
|||
*/
|
||||
|
||||
#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)
|
||||
|
|
@ -167,9 +164,6 @@
|
|||
# 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)
|
||||
|
|
@ -180,6 +174,16 @@
|
|||
# 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
|
||||
|
||||
#define TCB_PID_OFF offsetof(struct tcb_s, pid)
|
||||
#define TCB_STATE_OFF offsetof(struct tcb_s, task_state)
|
||||
#define TCB_PRI_OFF offsetof(struct tcb_s, sched_priority)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue