summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/regiongetsegment.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-27 14:43:19 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-30 16:16:21 +0200
commit93306058c0417b1c6e950b44ef279e096062dfba (patch)
tree1a3326d052169d2aec4c4acdd894589d5d84614c /cpukit/rtems/src/regiongetsegment.c
parentscore: Add _Thread_queue_Context_set_MP_callout() (diff)
downloadrtems-93306058c0417b1c6e950b44ef279e096062dfba.tar.bz2
score: _CORE_mutex_Check_dispatch_for_seize()
Move the safety check performed by _CORE_mutex_Check_dispatch_for_seize() out of the performance critical path and generalize it. Blocking on a thread queue with an unexpected thread dispatch disabled level is illegal in all system states. Add the expected thread dispatch disable level (which may be 1 or 2 depending on the operation) to Thread_queue_Context and use it in _Thread_queue_Enqueue_critical().
Diffstat (limited to 'cpukit/rtems/src/regiongetsegment.c')
-rw-r--r--cpukit/rtems/src/regiongetsegment.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpukit/rtems/src/regiongetsegment.c b/cpukit/rtems/src/regiongetsegment.c
index fe2b9e78ea..cfc664580c 100644
--- a/cpukit/rtems/src/regiongetsegment.c
+++ b/cpukit/rtems/src/regiongetsegment.c
@@ -86,7 +86,8 @@ rtems_status_code rtems_region_get_segment(
the_region->wait_operations,
executing,
STATES_WAITING_FOR_SEGMENT,
- timeout
+ timeout,
+ 2
);
_Thread_Dispatch_enable( cpu_self );