1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
#include <kernel/OS.h>
#define USE_POSIX_TIME
#define HAS_TEST_AND_SET
typedef unsigned char slock_t;
#define AF_UNIX 1 /* no domain sockets on BeOS */
#ifdef __cplusplus
extern "C" {
#endif
#include "kernel/image.h"
#undef HAVE_UNION_SEMUN
#define HAVE_UNION_SEMUN 1
#undef HAVE_SYS_SEM_H
#undef HAVE_SYS_SHM_H
union semun
{
int val;
struct semid_ds *buf;
unsigned short *array;
};
/* SYS V emulation */
#define IPC_RMID 256
#define IPC_CREAT 512
#define IPC_EXCL 1024
#define IPC_PRIVATE 234564
#define EACCESS 2048
#define EIDRM 4096
#define SETALL 8192
#define GETNCNT 16384
#define GETVAL 65536
#define SETVAL 131072
struct sembuf
{
int sem_flg;
int sem_op;
int sem_num;
};
int semctl(int semId,int semNum,int flag,union semun);
int semget(int semKey, int semNum, int flags);
int semop(int semId, struct sembuf *sops, int flag);
struct shmid_ds
{
int dummy;
};
int shmdt(char* shmaddr);
int* shmat(int memId,int m1,int m2);
int shmctl(int shmid,int flag, struct shmid_ds* dummy);
int shmget(int memKey,int size,int flag);
/* Support functions */
/* Specific beos action made on postgres/postmaster startup */
void beos_startup(int argc,char** argv);
/* Load a shared library */
image_id beos_dl_open(char * filename);
/* UnLoad a shared library */
status_t beos_dl_close(image_id im);
/* Specific beos action made on backend startup */
void beos_backend_startup(char* binary);
#ifdef __cplusplus
}
#endif
|