gtpc2m48C/C++ Language Support User's Guide

glob_unlock-Unlock TPF Global Field or Record

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);

tagname
This argument, which is defined in header file c$globz.h, uniquely identifies the TPF global field or record to be unlocked.

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