gtpc2m81C/C++ Language Support User's Guide

tpf_dlckc - Modify Lock and Input/Output Interrupt Status

This function:

Format

#include <sysapi.h>
  tpf_dlckc(*lock_pointer, lock_function)                   

lock_pointer
A pointer to the address of a doubleword lock field.

lock_function
Specify one of the following:

DLCKC_LOCK
The lockword specified by the lock_pointer parameter is locked and I/O interrupts are disabled on the I-stream calling this function.

DLCK_UNLOCK
The lockword specified by the lock_pointer parameter is unlocked and I/O interrupts are enabled on the I-stream calling this function.

Normal Return

None.

Error Return

None.

Programming Considerations

This function can be used only by ECB-controlled programs.

Examples

The following example shows a resource being locked with the I/O interrupts disabled and then unlocked with the I/O interrupts enabled.

#include <sysapi.h>
struct mflsec* mfsl_ptr = NULL;
 mfsl_ptr = cinfc(CINFC_WRITE,CINFC_CMMFS1);
 
 tpf_dlckc( mfsl_ptr->mfliolkp, DLCKC_LOCK );
 
  ·
  ·
  ·
tpf_dlckc( mfsl_ptr->mfliolkp, DLCKC_UNLOCK );

Related Information

None.