summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/sempost.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2015-05-21 18:08:32 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2015-05-21 18:08:32 -0500
commit24acc6d0c092c244881dd6ffadc3782a8136fccc (patch)
tree864b4985a7a431bd3520e9d815927eee5315c2df /cpukit/posix/src/sempost.c
parentMerge branch 'master' of ssh://dispatch.rtems.org/data/git/rtems (diff)
parentdoc: Add new documentation section for Epiphany architecture (diff)
downloadrtems-24acc6d0c092c244881dd6ffadc3782a8136fccc.tar.bz2
Merge branch 'master' of ssh://dispatch.rtems.org/data/git/rtems
Diffstat (limited to 'cpukit/posix/src/sempost.c')
-rw-r--r--cpukit/posix/src/sempost.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/cpukit/posix/src/sempost.c b/cpukit/posix/src/sempost.c
index f139c9ab67..9c8c673ddb 100644
--- a/cpukit/posix/src/sempost.c
+++ b/cpukit/posix/src/sempost.c
@@ -37,8 +37,13 @@ int sem_post(
{
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
+ 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:
@@ -46,12 +51,12 @@ int sem_post(
&the_semaphore->Semaphore,
the_semaphore->Object.id,
#if defined(RTEMS_MULTIPROCESSING)
- NULL /* POSIX Semaphores are local only */
+ NULL, /* POSIX Semaphores are local only */
#else
- NULL
+ NULL,
#endif
+ &lock_context
);
- _Objects_Put( &the_semaphore->Object );
return 0;
#if defined(RTEMS_MULTIPROCESSING)