gtpc2m48 | C/C++ Language Support User's Guide |
This function releases the exclusive use of the specified TPF global field or record. The glob_lock function must have previously been called. This function is valid only for synchronizable TPF global fields and records.
Format
#include <tpfglbl.h> #include <c$globz.h> void glob_unlock(unsigned int tagname);
Normal Return
Void.
Error Return
Not applicable.
Programming Considerations
Examples
The following example locks, tests, and unlocks a synchronizable global field.
#include <tpfglbl.h> #include <c$globz.h>
·
·
·
{ /******************************************************************/ /* Test data element mysdata in synchronizable global record */ /* _mysglob. */ /******************************************************************/ struct mysglbrec **msgrptrptr = glob_lock(_mysglob); struct mysglbrec *msgrptr = *msgrptrptr; if (msgrptr->mysdata != 0) { ... } glob_unlock(_mysglob); }
Related Information