diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-07 16:48:30 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-12 07:36:18 +0200 |
commit | 572cb6242969f96a5bf74dc107e3f845894b6b2b (patch) | |
tree | be87de631165d9314f36ad6d48e15b8ca8fb9d7b /cpukit/rtems/src/regionprocessqueue.c | |
parent | rtems: Ensure lock ownership for _Region_Get() (diff) | |
download | rtems-572cb6242969f96a5bf74dc107e3f845894b6b2b.tar.bz2 |
score: Simplify _Objects_Get_no_protection()
This functions supports only local objects. Thus, drop the location
parameter which was unused by all callers.
Remove superfluous includes from Classic Region implementation.
Diffstat (limited to 'cpukit/rtems/src/regionprocessqueue.c')
-rw-r--r-- | cpukit/rtems/src/regionprocessqueue.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cpukit/rtems/src/regionprocessqueue.c b/cpukit/rtems/src/regionprocessqueue.c index a1f2601c77..a28d68c03e 100644 --- a/cpukit/rtems/src/regionprocessqueue.c +++ b/cpukit/rtems/src/regionprocessqueue.c @@ -19,15 +19,16 @@ #endif #include <rtems/rtems/regionimpl.h> -#include <rtems/score/apimutex.h> #include <rtems/score/threadqimpl.h> void _Region_Process_queue( Region_Control *the_region ) { - Thread_Control *the_thread; - void *the_segment; + Per_CPU_Control *cpu_self; + Thread_Control *the_thread; + void *the_segment; + /* * Switch from using the memory allocation mutex to using a * dispatching disabled critical section. We have to do this @@ -38,7 +39,7 @@ void _Region_Process_queue( * since we do not want to open a window where a context * switch could occur. */ - _Thread_Disable_dispatch(); + cpu_self = _Thread_Dispatch_disable(); _RTEMS_Unlock_allocator(); /* @@ -67,5 +68,6 @@ void _Region_Process_queue( _Thread_queue_Extract( the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } - _Thread_Enable_dispatch(); + + _Thread_Dispatch_enable( cpu_self ); } |