Sync.inc

This file defines structures and cosntants for synchronization and mutual exclusion functions of PwnOS.

See Also

Authors

  • Neil G.  Dickson
Summary
Sync.incThis file defines structures and cosntants for synchronization and mutual exclusion functions of PwnOS.
LOCKSTRUCTThis structure is the centre of synchronization data in PwnOS, defining the state of an access lock.

LOCKSTRUCT

This structure is the centre of synchronization data in PwnOS, defining the state of an access lock.

Members

AccessFlagsused with LOCK_FLAG_USELOCK_BITNUM to gain access to the structure, and LOCK_FLAG_STATE_BITNUM to gain the lock’s access
hThreadthe thread that currently owns the lock’s access (or undefined if no thread owns the lock’s access)
pAccessListaddress of the list of threads waiting to gain the lock’s access, or NULL if none
pWaitListaddress of the list of threads waiting for notification on the lock, or NULL if none
This file contains basic synchronization and mutual exclusion functions of PwnOS.