A set of macros to access multi-threaded functionality. The Speect Engine itself is not multi-threaded, but it does need access to mutex locks to be thread safe, and thread id’s for logging purposes. Different multi-threaded implementations are supported by implementing the macros.
|S_DECLARE_MUTEX||Declare a s_mutex.|
|S_DECLARE_MUTEX_STATIC||Declare a static s_mutex.|
|s_mutex_init||Initialize a mutex.|
|s_mutex_destroy||Destroy a mutex.|
|s_mutex_lock||Lock a mutex.|
|s_mutex_unlock||Unlock a mutex.|
|s_thread_id||Get the calling thread id.|
Definition of a opaque mutex structure.
Declare a s_mutex.
Declare a s_mutex with the given name, based on the threads implementation.
Initialize a mutex.
Initializes the given s_mutex mutex using the default mutex attributes.
Lock a mutex.
Locks the given s_mutex mutex so that it can only be accessed by one thread.
Get the calling thread id.
|Return:||The calling thread id as an unsigned long.|