Rudiments: /home/dmuse/temp/rudiments/include/rudiments/semaphoreset.h Source File

Rudiments

semaphoreset.h
1 // Copyright (c) 1999-2018 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
44 class RUDIMENTS_DLLSPEC semaphoreset {
45 public:
46
48 semaphoreset();
49
53 ~semaphoreset();
54
57 bool supportsTimedSemaphoreOperations();
58
64 bool supportsUndoSemaphoreOperations();
65
75 bool create(key_t key, mode_t permissions,
76 int32_t semcount, const int32_t *values);
77
81 bool attach(key_t key, int32_t semcount);
82
87 bool createOrAttach(key_t key, mode_t permissions,
88 int32_t semcount, const int32_t *values);
89
97 void dontRemove();
98
101 bool forceRemove();
102
104 int32_t getId() const;
105
107 bool wait(int32_t index);
108
118 bool wait(int32_t index, int32_t seconds,
119 int32_t nanoseconds);
120
122 bool signal(int32_t index);
123
124
127 bool waitWithUndo(int32_t index);
128
139 bool waitWithUndo(int32_t index,
140 int32_t seconds, int32_t nanoseconds);
141
144 bool signalWithUndo(int32_t index);
145
146
148 bool setValue(int32_t index, int32_t value);
149
151 int32_t getValue(int32_t index);
152
153
160 bool setUserName(const char *username);
161
169 bool setGroupName(const char *groupname);
170
173 bool setUserId(uid_t uid);
174
177 bool setGroupId(gid_t gid);
178
181 bool setPermissions(mode_t permissions);
182
183
195 const char *getUserName();
196
208 const char *getGroupName();
209
212 uid_t getUserId();
213
216 gid_t getGroupId();
217
219 mode_t getPermissions();
220
221
224 int32_t getWaitingForZero(int32_t index);
225
228 int32_t getWaitingForIncrement(int32_t index);
229
233 void retryInterruptedOperations();
234
238 void dontRetryInterruptedOperations();
239
242 static bool supported();
243
244 #include <rudiments/private/semaphoreset.h>
245 };
246
247 #endif
permissions
Definition: permissions.h:28
semaphoreset
Definition: semaphoreset.h:44
semaphoreset::wait
bool wait(int32_t index, int32_t seconds, int32_t nanoseconds)
semaphoreset::createOrAttach
bool createOrAttach(key_t key, mode_t permissions, int32_t semcount, const int32_t *values)
semaphoreset::supportsUndoSemaphoreOperations
bool supportsUndoSemaphoreOperations()
semaphoreset::create
bool create(key_t key, mode_t permissions, int32_t semcount, const int32_t *values)
semaphoreset::getPermissions
mode_t getPermissions()
semaphoreset::dontRemove
void dontRemove()
semaphoreset::setPermissions
bool setPermissions(mode_t permissions)
semaphoreset::forceRemove
bool forceRemove()
semaphoreset::getGroupId
gid_t getGroupId()
semaphoreset::retryInterruptedOperations
void retryInterruptedOperations()
semaphoreset::setUserId
bool setUserId(uid_t uid)
semaphoreset::signalWithUndo
bool signalWithUndo(int32_t index)
semaphoreset::supported
static bool supported()
semaphoreset::getId
int32_t getId() const
semaphoreset::semaphoreset
semaphoreset()
semaphoreset::setUserName
bool setUserName(const char *username)
semaphoreset::getUserId
uid_t getUserId()
semaphoreset::wait
bool wait(int32_t index)
semaphoreset::setGroupId
bool setGroupId(gid_t gid)
semaphoreset::setGroupName
bool setGroupName(const char *groupname)
semaphoreset::setValue
bool setValue(int32_t index, int32_t value)
semaphoreset::dontRetryInterruptedOperations
void dontRetryInterruptedOperations()
semaphoreset::attach
bool attach(key_t key, int32_t semcount)
semaphoreset::getWaitingForIncrement
int32_t getWaitingForIncrement(int32_t index)
semaphoreset::getWaitingForZero
int32_t getWaitingForZero(int32_t index)
semaphoreset::~semaphoreset
~semaphoreset()
semaphoreset::supportsTimedSemaphoreOperations
bool supportsTimedSemaphoreOperations()
semaphoreset::waitWithUndo
bool waitWithUndo(int32_t index)
semaphoreset::waitWithUndo
bool waitWithUndo(int32_t index, int32_t seconds, int32_t nanoseconds)
semaphoreset::signal
bool signal(int32_t index)
semaphoreset::getGroupName
const char * getGroupName()
semaphoreset::getUserName
const char * getUserName()
semaphoreset::getValue
int32_t getValue(int32_t index)