summaryrefslogtreecommitdiffstats
path: root/c/src/exec/posix/src/semaphorenametoid.c
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>1999-11-18 19:43:13 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>1999-11-18 19:43:13 +0000
commit17879f4750a2bc0d556c8cd1d0f6715b127d681a (patch)
treeb5ad2e47489b8afa97dc5cd66aa36e3900da282e /c/src/exec/posix/src/semaphorenametoid.c
parentAdded a routine to remove a semaphore name from its namespace. (diff)
downloadrtems-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 'c/src/exec/posix/src/semaphorenametoid.c')
-rw-r--r--c/src/exec/posix/src/semaphorenametoid.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/c/src/exec/posix/src/semaphorenametoid.c b/c/src/exec/posix/src/semaphorenametoid.c
index 8761f79f8b..c6de93c201 100644
--- a/c/src/exec/posix/src/semaphorenametoid.c
+++ b/c/src/exec/posix/src/semaphorenametoid.c
@@ -20,7 +20,8 @@
*
* _POSIX_Semaphore_Name_to_id
*
- * XXX
+ * Look up the specified name and attempt to locate the id
+ * for the associated semaphore.
*/
int _POSIX_Semaphore_Name_to_id(
@@ -30,12 +31,12 @@ int _POSIX_Semaphore_Name_to_id(
{
Objects_Name_to_id_errors status;
- status = _Objects_Name_to_id( &_POSIX_Semaphore_Information, (char *)name, 0, id );
+ status = _Objects_Name_to_id(
+ &_POSIX_Semaphore_Information, (char *)name, 0, id );
- if ( status == OBJECTS_SUCCESSFUL ) {
- return 0;
- } else {
- return EINVAL;
- }
+ if ( status == OBJECTS_SUCCESSFUL )
+ return 0;
+
+ return EINVAL;
}