Home Libraries Author Links

accesslock.h File Reference


Detailed Description

Specification of abstract data types providing synchronized read-only and read-write access control of resources used by several StmThread objects.

Version:
1.11-r317
Date:
2007-11-12 19:44:00 (Tom)
Author:
Tom Michaelis
SysToMath
Wittelsbacherstr. 7
D-80469 Munich
Contact:
http://www.SysToMath.com
mailto:Tom.Michaelis@SysToMath.com
This C header file contains declarations of data types and functions specifying synchronized access control of resources used by several POSIX.1c threads. They are implemented in the C program file accesslock.c belonging to the SysToMath Base C Library stmbase.

Definition in file accesslock.h.

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

StmAccessLock Creation and Destruction

StmAccessLock stmAccessLockCreate (void)
 Creation of a new StmAccessLock object.
int stmAccessLockDestroy (StmAccessLock lock)
 Destruction of the StmAccessLock object lock.

StmAccessLock Method Functions

StmReadOnlyTicket stmAccessLockTakeReadOnly (StmAccessLock lock)
 Return a StmReadOnlyTicket object granting read access for the resource protected by the StmAccessLock object lock.
StmReadOnlyTicket stmAccessLockTryReadOnly (StmAccessLock lock)
 Try to return a StmReadOnlyTicket object granting read access for the resource protected by the StmAccessLock object lock.
StmReadWriteTicket stmAccessLockConvertReadOnly (StmAccessLock lock, StmReadOnlyTicket ticket)
 Convert the StmReadOnlyTicket object ticket granting read access to the resource protected by the StmAccessLock object lock to a StmReadWriteTicket object granting write access to the resource and return it.
int stmAccessLockGiveReadOnly (StmAccessLock lock, StmReadOnlyTicket ticket)
 Release the StmReadOnlyTicket object ticket granting read access to the resource protected by the StmAccessLock object lock.
StmReadWriteTicket stmAccessLockTakeReadWrite (StmAccessLock lock)
 Return a StmReadWriteTicket object granting write access for the resource protected by the StmAccessLock object lock.
StmReadWriteTicket stmAccessLockTryReadWrite (StmAccessLock lock)
 Try to return a StmReadWriteTicket object granting write access for the resource protected by the StmAccessLock object lock.
StmReadOnlyTicket stmAccessLockConvertReadWrite (StmAccessLock lock, StmReadWriteTicket ticket)
 Convert the StmReadWriteTicket object ticket granting write access to the resource protected by the StmAccessLock object lock to a StmReadOnlyTicket object granting read access to the resource and return it.
int stmAccessLockGiveReadWrite (StmAccessLock lock, StmReadWriteTicket ticket)
 Release the StmReadWriteTicket object ticket granting write access to the resource protected by the StmAccessLock object lock.


© Copyright Tom Michaelis 2002-2007

Distributed under the SysToMath Software License (See the accompanying file license.txt or a copy at www.SysToMath.com).