Create a lock for an offscreen context
int PdCreateOffscreenLock(
       PdOffscreenContext_t *osc,
       PdOSCCreateLockParams_t *params );
- osc
 
- A pointer to the PdOffscreenContext_t structure for the
  offscreen context.
 
- params
 
- A pointer to a PdOSCCreateLockParams_t structure that
  defines the parameters for the lock; see below.
 
ph
This function creates an offscreen lock in an offscreen context.
  | 
This function doesn't lock the offscreen context; to do that, call
PdLockOffscreen(). | 
 
The PdOSCCreateLockParams_t structure includes the following
members:
- uint32_t flags
 
- Flags, including:
  
- Pg_OSC_LOCK_SIG — register a signal to be dropped
    if a request is made to remove the offscreen context while it's locked.
    
  
 
 
- int sig
 
- The signal to drop on the current hard locking process if the context
  needs to be destroyed.
  
  This signal is used only if you set Pg_OSC_LOCK_SIG
  in the flags member.
 
  | 
You can't lock the primary display unless the application is in direct mode. | 
 
- EOK
 
- The lock was successfully created.
 
- Pg_OSC_LOCK_ALREADY_CREATED
 
- The lock has already been created for this offscreen context.
  
 
- Pg_OSC_CREATE_LOCK_FAILED
 
- The lock couldn't be created.
  The most likely reason is that io-graphics is running remotely.
  
 
Photon
| Safety: |  | 
| Interrupt handler | 
    No | 
| Signal handler | 
    No | 
| Thread | 
    No | 
PdDestroyOffscreenLock(),
PdGetOffscreenContextPtr(),
PdIsOffscreenLocked(),
PdLockOffscreen(),
PdUnlockOffscreen()
“Offscreen locks”
in the Raw Drawing and Animation chapter of the 
Photon Programmer's Guide