2009-07-22 Joel Sherrill <joel.sherrill@oarcorp.com>

* posix/include/semaphore.h, posix/include/rtems/posix/semaphore.h:
	Move SEM_FAILED from private file to public file since it is defined
	by POSIX.
This commit is contained in:
Joel Sherrill
2009-07-22 15:39:09 +00:00
parent 17e3808dd5
commit 51cec29e9e
3 changed files with 11 additions and 9 deletions

View File

@@ -1,3 +1,9 @@
2009-07-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/include/semaphore.h, posix/include/rtems/posix/semaphore.h:
Move SEM_FAILED from private file to public file since it is defined
by POSIX.
2009-07-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/shell/main_mount.c: Eliminate warning.

View File

@@ -27,8 +27,6 @@ extern "C" {
#include <semaphore.h>
#include <rtems/score/coresem.h>
#define SEM_FAILED (sem_t *) -1
/*
* Data Structure used to manage a POSIX semaphore
*/

View File

@@ -29,13 +29,16 @@ extern "C" {
/*
* 11.1 Semaphore Characteristics, P1003.1b-1993, p.219
*/
typedef int sem_t;
/*
* Bad semaphore Id
*/
#define SEM_FAILED (sem_t *) -1
/*
* 11.2.1 Initialize an Unnamed Semaphore, P1003.1b-1993, p.219
*/
int sem_init(
sem_t *sem,
int pshared,
@@ -45,7 +48,6 @@ int sem_init(
/*
* 11.2.2 Destroy an Unnamed Semaphore, P1003.1b-1993, p.220
*/
int sem_destroy(
sem_t *sem
);
@@ -55,7 +57,6 @@ int sem_destroy(
*
* NOTE: Follows open() calling conventions.
*/
sem_t *sem_open(
const char *name,
int oflag,
@@ -65,7 +66,6 @@ sem_t *sem_open(
/*
* 11.2.4 Close a Named Semaphore, P1003.1b-1993, p.224
*/
int sem_close(
sem_t *sem
);
@@ -73,7 +73,6 @@ int sem_close(
/*
* 11.2.5 Remove a Named Semaphore, P1003.1b-1993, p.225
*/
int sem_unlink(
const char *name
);
@@ -83,7 +82,6 @@ int sem_unlink(
*
* NOTE: P1003.4b/D8 adds sem_timedwait(), p. 27
*/
int sem_wait(
sem_t *sem
);