prg_mt_global_lock()
Abstract
Locks the global mutex.
Syntax
prg_mt_global_lock (rank_ptr, description, lock_id)
| Argument | Type | Description |
|---|---|---|
rank_ptr |
int * |
If the global mutex is set to check for ranks, this will be filled with the lowest ranked mutex for the process if the lock attempt failed. If set to PRGC_NIL, no rank value will be stored. |
description |
char * |
If the global mutex lock attempt failed, this will be a copy of the description of the lowest ranked mutex locked by the process. The argument should be a char array big enough to store any description. If set to PRGC_NIL, no description will be copied. |
lock_id |
int |
ID of the locking process (arbitrary value specified by caller) |
Return Type
Success or failure code; one of the values in Table 6 Mutex Package Symbolic Constants.
Header
prg_mt.h
Details
The global mutex is a built-in mutex with the highest possible rank. This mutex can be used by model code when it is undesirable or impossible to create a unique mutex.