1 /* cygserver_sem.h: Single unix specification IPC interface for Cygwin.
3 Copyright 2003, 2008 Red Hat, Inc.
5 This file is part of Cygwin.
7 This software is a copyrighted work licensed under the terms of the
8 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
11 #ifndef __CYGSERVER_SEM_H__
12 #define __CYGSERVER_SEM_H__
14 #include <sys/types.h>
15 #include <sys/sysproto.h>
19 #include <cygwin/sem.h>
21 #include "cygserver.h"
22 #include "cygserver_ipc.h"
24 #ifndef __INSIDE_CYGWIN__
25 class transport_layer_base;
29 class client_request_sem : public client_request
31 friend class client_request;
50 struct semctl_args ctlargs;
51 struct semget_args getargs;
52 struct semop_args opargs;
61 #ifndef __INSIDE_CYGWIN__
62 client_request_sem ();
63 virtual void serve (transport_layer_base *, process_cache *);
68 #ifdef __INSIDE_CYGWIN__
69 client_request_sem (int, int, int, union semun *); // semctl
70 client_request_sem (key_t, int, int); // semget
71 client_request_sem (int, struct sembuf *, size_t); // semop
74 int retval () const { return msglen () ? _parameters.out.ret : -1; }
77 #ifndef __INSIDE_CYGWIN__
80 void semexit_myhook(void *arg, struct proc *p);
82 int semctl (struct thread *, struct semctl_args *);
83 int semget (struct thread *, struct semget_args *);
84 int semop (struct thread *, struct semop_args *);
87 #endif /* __CYGSERVER_SEM_H__ */