summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems/posix/pthreadimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-06 16:26:22 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-12 07:36:14 +0200
commit9555341f0fc309243e1d92f95e4278a7b820f485 (patch)
tree74c17533f5d7205a93bc4d993fda5de47d043fe9 /cpukit/posix/include/rtems/posix/pthreadimpl.h
parentposix: Use proper lock for sigaction() (diff)
downloadrtems-9555341f0fc309243e1d92f95e4278a7b820f485.tar.bz2
posix: Use a dedicated lock for scheduler changes
Update #2555.
Diffstat (limited to 'cpukit/posix/include/rtems/posix/pthreadimpl.h')
-rw-r--r--cpukit/posix/include/rtems/posix/pthreadimpl.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/cpukit/posix/include/rtems/posix/pthreadimpl.h b/cpukit/posix/include/rtems/posix/pthreadimpl.h
index 42f10b08bc..ef5821e48f 100644
--- a/cpukit/posix/include/rtems/posix/pthreadimpl.h
+++ b/cpukit/posix/include/rtems/posix/pthreadimpl.h
@@ -223,6 +223,23 @@ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Join_dequeue(
);
}
+RTEMS_INLINE_ROUTINE void _POSIX_Threads_Scheduler_acquire(
+ POSIX_API_Control *api,
+ ISR_lock_Context *lock_context
+)
+{
+ _ISR_lock_ISR_disable_and_acquire( &api->Scheduler_lock, lock_context );
+}
+
+RTEMS_INLINE_ROUTINE void _POSIX_Threads_Scheduler_release(
+ POSIX_API_Control *api,
+ ISR_lock_Context *lock_context
+)
+{
+ _ISR_lock_Release_and_ISR_enable( &api->Scheduler_lock, lock_context );
+}
+
+
/** @} */
#ifdef __cplusplus