_CP_lock

_CP_lock is equivalent to the lock BASIC statement.

The variant of lock used depends upon the type parameter:

Type

BASIC Statement

_CP_LOCK

lock expression

_CP_LOCK_W

lock expression else * return -1

Syntax

int _CP_lock(int type, int expression)

Description

This function returns -1 if an error occurs. The error code is contained in _CP_errno.

Example(s)

/* Sets basic lock 1. */

_CP_lock(_CP_LOCK,1);

See Also

C Functions Overview, _CP_unlock, _CP_unlock_all