_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 |
int _CP_lock(int type, int expression)
This function returns -1 if an error occurs. The error code is contained in _CP_errno.
/* Sets basic lock 1. */ _CP_lock(_CP_LOCK,1);