diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-04-26 10:39:08 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-04-27 19:40:12 +0200 |
commit | 127a812f501833fbad73665d7676b32753d667b3 (patch) | |
tree | e434dfb2fe0071f5fc78abefcee25660211d7011 /cpukit/rtems/src | |
parent | Return status code for _Scheduler_Get_affinity() (diff) | |
download | rtems-127a812f501833fbad73665d7676b32753d667b3.tar.bz2 |
Simplify get affinitiy directives
There is no need to disable thread dispatching to get the affinity of a
task.
Diffstat (limited to 'cpukit/rtems/src')
-rw-r--r-- | cpukit/rtems/src/taskgetaffinity.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/cpukit/rtems/src/taskgetaffinity.c b/cpukit/rtems/src/taskgetaffinity.c index 6ced283393..09349c2da9 100644 --- a/cpukit/rtems/src/taskgetaffinity.c +++ b/cpukit/rtems/src/taskgetaffinity.c @@ -33,7 +33,6 @@ rtems_status_code rtems_task_get_affinity( { Thread_Control *the_thread; ISR_lock_Context lock_context; - Per_CPU_Control *cpu_self; Status_Control status; if ( cpuset == NULL ) { @@ -52,7 +51,6 @@ rtems_status_code rtems_task_get_affinity( return RTEMS_INVALID_ID; } - cpu_self = _Thread_Dispatch_disable_critical( &lock_context ); _Thread_State_acquire_critical( the_thread, &lock_context ); status = _Scheduler_Get_affinity( @@ -62,6 +60,5 @@ rtems_status_code rtems_task_get_affinity( ); _Thread_State_release( the_thread, &lock_context ); - _Thread_Dispatch_enable( cpu_self ); return _Status_Get( status ); } |