1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-11 09:50:12 +00:00

Track libc_r addition of semaphores implementation.

Approved by:	jkh
This commit is contained in:
Jason Evans 2000-01-20 07:55:42 +00:00
parent 120bfc9ded
commit 4f249023a4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=56321
2 changed files with 32 additions and 20 deletions

View File

@ -38,27 +38,33 @@
*/
#include <sys/_posix.h>
#include <machine/limits.h>
#ifdef _P1003_1B_INCLUDE_MAYBES
#include <sys/types.h>
#include <fcntl.h>
#endif
typedef int sem_t;
/* Opaque type definition. */
struct sem;
typedef struct sem *sem_t;
#define SEM_FAILED ((sem_t *)0)
#define SEM_VALUE_MAX UINT_MAX
#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
int sem_init __P((sem_t *, int, unsigned int));
int sem_destroy __P((sem_t *));
sem_t sem_open __P((const char *, int, ...));
int sem_close __P((sem_t *));
int sem_unlink __P((const char *));
int sem_wait __P((sem_t *));
int sem_trywait __P((sem_t *));
int sem_post __P((sem_t *));
int sem_getvalue __P((sem_t *, int *));
int sem_init __P((sem_t *, int, unsigned int));
int sem_destroy __P((sem_t *));
sem_t *sem_open __P((const char *, int, ...));
int sem_close __P((sem_t *));
int sem_unlink __P((const char *));
int sem_wait __P((sem_t *));
int sem_trywait __P((sem_t *));
int sem_post __P((sem_t *));
int sem_getvalue __P((sem_t *, int *));
__END_DECLS
#endif

View File

@ -38,27 +38,33 @@
*/
#include <sys/_posix.h>
#include <machine/limits.h>
#ifdef _P1003_1B_INCLUDE_MAYBES
#include <sys/types.h>
#include <fcntl.h>
#endif
typedef int sem_t;
/* Opaque type definition. */
struct sem;
typedef struct sem *sem_t;
#define SEM_FAILED ((sem_t *)0)
#define SEM_VALUE_MAX UINT_MAX
#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
int sem_init __P((sem_t *, int, unsigned int));
int sem_destroy __P((sem_t *));
sem_t sem_open __P((const char *, int, ...));
int sem_close __P((sem_t *));
int sem_unlink __P((const char *));
int sem_wait __P((sem_t *));
int sem_trywait __P((sem_t *));
int sem_post __P((sem_t *));
int sem_getvalue __P((sem_t *, int *));
int sem_init __P((sem_t *, int, unsigned int));
int sem_destroy __P((sem_t *));
sem_t *sem_open __P((const char *, int, ...));
int sem_close __P((sem_t *));
int sem_unlink __P((const char *));
int sem_wait __P((sem_t *));
int sem_trywait __P((sem_t *));
int sem_post __P((sem_t *));
int sem_getvalue __P((sem_t *, int *));
__END_DECLS
#endif