#include <OSD_Semaphore.hxx>
Public Member Functions | |
void * | operator new (size_t, void *anAddress) |
void * | operator new (size_t size) |
void | operator delete (void *anAddress) |
Standard_EXPORT | OSD_Semaphore () |
Allocate room for semaphore name. This is to be used with 'Open'. so the process is a client. . | |
Standard_EXPORT | OSD_Semaphore (const TCollection_AsciiString &Name) |
Instantiates Semaphore object with a name. The name is the only way provided to work with a common semaphore for different processes. Each process working with the same semaphore must use a common known access : the semaphore's NAME. Raises ConstructionError when the name contains characters not in range of ' '...'~'. This is for a server process. . | |
Standard_EXPORT void | Build () |
Sets semaphore (physically) into memory . | |
Standard_EXPORT void | Open (const TCollection_AsciiString &Name) |
Opens (physically) a semaphore Raises ConstructionError when the name contains characters not in range of ' '...'~'. . | |
Standard_EXPORT Standard_Integer | GetCounter () |
Returns current value of the semaphore's counter. Raises ProgramError when the semaphore is not open. . | |
Standard_EXPORT void | SetCounter (const Standard_Integer Value) |
Sets the semaphore's counter to a specific value. Raises ProgramError when the semaphore is not open. . | |
Standard_EXPORT void | Delete () |
Removes the semaphore. This is used only by server process ! Raise ProgramError if the semaphore is already deleted. . | |
Standard_EXPORT void | Lock () |
Makes current process waiting for access Raises ProgramError when the semaphore does't exist. . | |
Standard_EXPORT void | Free () |
Frees one access to a semaphore. Raises ProgramError when the semaphore does't exist. . | |
Standard_EXPORT void | Restore () |
Resets semaphore counter to zero. Raises ProgramError when the semaphore does't exist. . | |
Standard_EXPORT Standard_Boolean | Failed () const |
Returns TRUE if an error occurs . | |
Standard_EXPORT void | Reset () |
Resets error counter to zero . | |
Standard_EXPORT void | Perror () |
Raises OSD_Error . | |
Standard_EXPORT Standard_Integer | Error () const |
Returns error number if 'Failed' is TRUE. . | |
Private Attributes | |
TCollection_AsciiString | myName |
Standard_Integer | myKey |
Standard_Integer | mySemId |
OSD_Error | myError |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|