ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/semaphore.h
Revision: 1.1.1.1 (vendor branch)
Committed: 1999-10-03T14:16:25Z (24 years, 9 months ago) by cebix
Content type: text/plain
Branch: cebix
CVS Tags: release-0_7-2, nigel-build-12, nigel-build-13, nigel-build-16, nigel-build-15, snapshot-21101999, start, snapshot-13072000, snapshot-22121999, snapshot-17022001, release-0_8-1, snapshot-15012002, snapshot-02111999, snapshot-29052001, release-0_9-1
Changes since 1.1: +0 -0 lines
Log Message:
Imported sources

File Contents

# Content
1 #ifndef __SEMAPHORE_H
2 #define __SEMAPHORE_H
3
4 #define SEM_VALUE_MAX 64
5
6 #if defined(c_plusplus) || defined(__cplusplus)
7 extern "C" {
8 #endif /* c_plusplus || __cplusplus */
9
10 typedef struct psem {
11 pthread_mutex_t sem_lock;
12 int sem_value;
13 int sem_waiting;
14 } sem_t;
15
16 int sem_init(sem_t* sem, int pshared, unsigned int value);
17 int sem_destroy(sem_t* sem);
18 sem_t sem_open(const char* name, int oflag, ...);
19 int sem_close(sem_t* sem);
20 int sem_unlink(const char* name);
21 int sem_wait(sem_t* sem);
22 int sem_trywait(sem_t* sem);
23 int sem_post(sem_t* sem);
24 int sem_getvalue(sem_t* sem, int* sval);
25
26 #if defined(c_plusplus) || defined(__cplusplus)
27 };
28 #endif /* c_plusplus || __cplusplus */
29
30 #endif /* __SEMAPHORE_H */