Rudiments

- Main Page
- Classes

semaphoreset.h
1 // Copyright (c) 1999-2002 David Muse
2 // See the COPYING file for more information.
3
4 #ifndef RUDIMENTS_SEMAPHORESET_H
5 #define RUDIMENTS_SEMAPHORESET_H
6
7 #include <rudiments/private/semaphoresetincludes.h>
8
9 class semaphoresetprivate;
10
46 class RUDIMENTS_DLLSPEC semaphoreset {
47 public:
48
50 semaphoreset();
51
55 ~semaphoreset();
56
59 bool supportsTimedSemaphoreOperations();
60
66 bool supportsUndoSemaphoreOperations();
67
77 bool create(key_t key, mode_t permissions,
78 int32_t semcount, const int32_t *values);
79
83 bool attach(key_t key, int32_t semcount);
84
89 bool createOrAttach(key_t key, mode_t permissions,
90 int32_t semcount, const int32_t *values);
91
99 void dontRemove();
100
103 bool forceRemove();
104
106 int32_t getId() const;
107
109 bool wait(int32_t index);
110
120 bool wait(int32_t index, int32_t seconds,
121 int32_t nanoseconds);
122
124 bool signal(int32_t index);
125
126
129 bool waitWithUndo(int32_t index);
130
141 bool waitWithUndo(int32_t index,
142 int32_t seconds, int32_t nanoseconds);
143
146 bool signalWithUndo(int32_t index);
147
148
150 bool setValue(int32_t index, int32_t value);
151
153 int32_t getValue(int32_t index);
154
155
162 bool setUserName(const char *username);
163
171 bool setGroupName(const char *groupname);
172
175 bool setUserId(uid_t uid);
176
179 bool setGroupId(gid_t gid);
180
183 bool setPermissions(mode_t permissions);
184
185
197 const char *getUserName();
198
210 const char *getGroupName();
211
214 uid_t getUserId();
215
218 gid_t getGroupId();
219
221 mode_t getPermissions();
222
223
226 int32_t getWaitingForZero(int32_t index);
227
230 int32_t getWaitingForIncrement(int32_t index);
231
235 void retryInterruptedOperations();
236
240 void dontRetryInterruptedOperations();
241
242 #include <rudiments/private/semaphoreset.h>
243
244 };
245
246 #endif
semaphoreset
Definition: semaphoreset.h:46
permissions
Definition: permissions.h:28