diff options
author | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 1999-11-18 19:43:13 +0000 |
---|---|---|
committer | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 1999-11-18 19:43:13 +0000 |
commit | 17879f4750a2bc0d556c8cd1d0f6715b127d681a (patch) | |
tree | b5ad2e47489b8afa97dc5cd66aa36e3900da282e /cpukit/posix/src/semunlink.c | |
parent | Added a routine to remove a semaphore name from its namespace. (diff) | |
download | rtems-17879f4750a2bc0d556c8cd1d0f6715b127d681a.tar.bz2 |
+ Debuged to the point that you could open, unlink and close a semaphore.
but all paths have not been checked, yet.
Diffstat (limited to 'cpukit/posix/src/semunlink.c')
-rw-r--r-- | cpukit/posix/src/semunlink.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cpukit/posix/src/semunlink.c b/cpukit/posix/src/semunlink.c index 7fc2c56a28..105a710c47 100644 --- a/cpukit/posix/src/semunlink.c +++ b/cpukit/posix/src/semunlink.c @@ -31,8 +31,7 @@ int sem_unlink( Objects_Locations location; status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); - - if ( !status ) + if ( status != 0 ) set_errno_and_return_minus_one( status ); the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); @@ -55,7 +54,7 @@ int sem_unlink( #endif the_semaphore->linked = FALSE; - + _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); |