coruc: Unhold a resource
This function releases exclusive control over a resource.
Format
#include <tpf/tpfapi.h>
void coruc(void *resource); - resource
- A pointer to type void representing the resource over which exclusive control is to be relinquished.
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 <tpf/tpfapi.h>
#include <tpf/tpfglbl.h>
#include <tpf/c_globz.h>
struct msgexp *q05met;
⋮
q05met = *(struct msgexp **) glob(_q05met);
corhc(q05met);
⋮
coruc(q05met);
The following example obtains a lock on resource
name ABCD, and then relinquishes the lock.
#include <tpf/tpfapi.h>
#define RESOURCE_KEY ((void *) 0xC1C2C3C4)
⋮
corhc(RESOURCE_KEY);
⋮
coruc(RESOURCE_KEY);Related information
See z/TPF C functions overview for more information about z/TPF C/C++ language support.