summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/semaphorewaitsupp.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-02 14:02:20 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-19 12:00:46 +0200
commitcfa5aabc786c27887f219b92c1a6566020d96f1a (patch)
tree2811e16312c880f3d09b2aecd510f2df6d301507 /cpukit/posix/src/semaphorewaitsupp.c
parentscore: Fine grained locking for semaphores (diff)
downloadrtems-cfa5aabc786c27887f219b92c1a6566020d96f1a.tar.bz2
score: Delete _CORE_semaphore_Seize()
Rename _CORE_semaphore_Seize_isr_disable() to _CORE_semaphore_Seize().
Diffstat (limited to 'cpukit/posix/src/semaphorewaitsupp.c')
-rw-r--r--cpukit/posix/src/semaphorewaitsupp.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/cpukit/posix/src/semaphorewaitsupp.c b/cpukit/posix/src/semaphorewaitsupp.c
index cd572c4017..8b36561983 100644
--- a/cpukit/posix/src/semaphorewaitsupp.c
+++ b/cpukit/posix/src/semaphorewaitsupp.c
@@ -40,8 +40,13 @@ int _POSIX_Semaphore_Wait_support(
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
Thread_Control *executing;
+ ISR_lock_Context lock_context;
- the_semaphore = _POSIX_Semaphore_Get( sem, &location );
+ the_semaphore = _POSIX_Semaphore_Get_interrupt_disable(
+ sem,
+ &location,
+ &lock_context
+ );
switch ( location ) {
case OBJECTS_LOCAL:
@@ -51,9 +56,9 @@ int _POSIX_Semaphore_Wait_support(
executing,
the_semaphore->Object.id,
blocking,
- timeout
+ timeout,
+ &lock_context
);
- _Objects_Put( &the_semaphore->Object );
if ( !executing->Wait.return_code )
return 0;