class ThreadLock

Posix rwlock extension for protected access. More...

Full nameost::ThreadLock
Definition#include <thread.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

The ThreadLock class impliments a thread rwlock for optimal reader performance on systems which have rwlock support, and reverts to a simple mutex for those that do not.

 ThreadLock ()

ThreadLock

Create a process shared thread lock object.

 ~ThreadLock ()

~ThreadLock

[virtual]

Destroy a process shared thread lock object.

void  ReadLock (void)

ReadLock

Aquire a read lock for the current object.

void  WriteLock (void)

WriteLock

Aquire a write lock for the current object.

bool  TryReadLock (void)

TryReadLock

Attempt read lock for current object.

Returns: true on success.

bool  TryWriteLock (void)

TryWriteLock

Attempt write lock for current object.

Returns: true on success.

void  Unlock (void)

Unlock

Release any held locks.