gtpc2m10 | C/C++ Language Support User's Guide |
This function releases exclusive control over a resource.
Format
#include <tpfapi.h> void coruc(void *resource);
Normal Return
Void. Exclusive control over the resource has been relinquished.
Error Return
Not applicable.
Programming Considerations
Attempting to release a resource that the ECB is not holding results in a system error with exit. The pointer value (not the referenced value) passed to coruc must be the same as the pointer value passed to corhc. The pointer value is not required to reference a storage location.
Examples
The following example obtains a hold on the global record _q05met based on the address of the record, and then relinquishes the hold.
#include <tpfapi.h> #include <tpfglbl.h> #include <c$globz.h> struct msgexp *q05met;
·
·
·
q05met = *(struct msgexp **) glob(_q05met); corhc(q05met);
·
·
·
coruc(q05met); modec(MODEC_24);
The following example obtains a lock on resource name ABCD, and then relinquishes the lock.
#include <tpfapi.h> #define RESOURCE_KEY ((void *) 0xC1C2C3C4)
·
·
·
corhc(RESOURCE_KEY);
·
·
·
coruc(RESOURCE_KEY);
Related Information