4 #ifndef RUDIMENTS_SEMAPHORESET_H
5 #define RUDIMENTS_SEMAPHORESET_H
7 #include <rudiments/private/semaphoresetincludes.h>
9 #ifdef RUDIMENTS_NAMESPACE
13 class semaphoresetprivate;
63 bool supportsTimedSemaphoreOperations();
75 int32_t semcount,
const int32_t *values);
80 bool attach(key_t key, int32_t semcount);
86 bool createOrAttach(key_t key, mode_t permissions,
87 int32_t semcount,
const int32_t *values);
103 int32_t getId()
const;
106 bool wait(int32_t index);
113 bool wait(int32_t index,
long seconds,
long nanoseconds);
116 bool signal(int32_t index);
121 bool waitWithUndo(int32_t index);
129 bool waitWithUndo(int32_t index,
130 long seconds,
long nanoseconds);
134 bool signalWithUndo(int32_t index);
138 bool setValue(int32_t index, int32_t value);
141 int32_t getValue(int32_t index);
150 bool setUserName(
const char *username);
159 bool setGroupName(
const char *groupname);
163 bool setUserId(uid_t uid);
167 bool setGroupId(gid_t gid);
171 bool setPermissions(mode_t permissions);
185 const char *getUserName();
198 const char *getGroupName();
209 mode_t getPermissions();
214 int32_t getWaitingForZero(int32_t index);
218 int32_t getWaitingForIncrement(int32_t index);
223 void retryInterruptedOperations();
228 void dontRetryInterruptedOperations();
230 #include <rudiments/private/semaphoreset.h>
234 #ifdef RUDIMENTS_NAMESPACE