summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/lib/semctl.c
blob: cec0b75357ddb917abfbac5b0880397332386199 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <sys/types.h>
#include <sys/ipc.h>

extern int __ipc(int,int,int,int,void*);

union semun {
  int val;			/* value for SETVAL */
  struct semid_ds *buf;		/* buffer for IPC_STAT & IPC_SET */
  unsigned short *array;		/* array for GETALL & SETALL */
  struct seminfo *__buf;		/* buffer for IPC_INFO */
  void *__pad;
};

int semctl(int semid, int semnum, int cmd, union semun arg);
int semctl(int semid, int semnum, int cmd, union semun arg) {
  return __ipc(SEMCTL,semid,semnum,cmd,&arg);
}