semaphoreset.h
// Copyright (c) 1999-2018 David Muse
// See the COPYING file for more information.
#ifndef RUDIMENTS_SEMAPHORESET_H
#define RUDIMENTS_SEMAPHORESET_H
#include <rudiments/private/semaphoresetincludes.h>
class RUDIMENTS_DLLSPEC semaphoreset {
public:
semaphoreset();
~semaphoreset();
bool supportsTimedSemaphoreOperations();
bool supportsUndoSemaphoreOperations();
bool create(key_t key, mode_t permissions,
int32_t semcount, const int32_t *values);
bool attach(key_t key, int32_t semcount);
bool createOrAttach(key_t key, mode_t permissions,
int32_t semcount, const int32_t *values);
void dontRemove();
bool forceRemove();
int32_t getId() const;
bool wait(int32_t index);
bool wait(int32_t index, int32_t seconds,
int32_t nanoseconds);
bool signal(int32_t index);
bool waitWithUndo(int32_t index);
bool waitWithUndo(int32_t index,
int32_t seconds, int32_t nanoseconds);
bool signalWithUndo(int32_t index);
bool setValue(int32_t index, int32_t value);
int32_t getValue(int32_t index);
bool setUserName(const char *username);
bool setGroupName(const char *groupname);
bool setUserId(uid_t uid);
bool setGroupId(gid_t gid);
bool setPermissions(mode_t permissions);
const char *getUserName();
const char *getGroupName();
uid_t getUserId();
gid_t getGroupId();
mode_t getPermissions();
int32_t getWaitingForZero(int32_t index);
int32_t getWaitingForIncrement(int32_t index);
void retryInterruptedOperations();
void dontRetryInterruptedOperations();
static bool supported();
#include <rudiments/private/semaphoreset.h>
};
#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)