gtpc2m99C/C++ Language Support User's Guide

unlkc-Unlock a Resource

This function is used to unlock a resource previously locked by the lockc function. If the lock is not held by this I-stream, a dump is taken and the lock is unlocked.

Format

#include   <tpfapi.h>
int        unlkc(void *lockword);

lockword
A pointer to a lock made up of 2 consecutive fullwords used for lock and trace.

Normal Return

0.

Error Return

Not applicable.

Programming Considerations

The lock specified by lockword must be held by this I-stream. If the lock is not held, a CTL-000573 will be taken and the lock unlocked.

Examples

The following example unlocks an area whose lock field is pointed to by table_lock_ptr.

#include <tpfapi.h>

  ·
  ·
  ·
unlkc(table_lock_ptr);
  ·
  ·
  ·

Related Information

lockc-Lock a Resource.