LeaveWorkUnit() — Leave a WLM work unit

Standards

Standards / Extensions C or C++ Dependencies
z/OS® UNIX both  

Format

#include <sys/__wlm.h>

int LeaveWorkUnit(wlmetok_t *enclavetoken);

General description

The LeaveWorkUnit() function provides the ability for an application to leave a WLM work unit.
*enclavetoken
Points to a work unit enclave token that was returned from a call to CreateWorkUnit() or ContinueWorkUnit().

Returned value

If successful, LeaveWorkUnit() returns 0.

If unsuccessful, LeaveWorkUnit() returns -1 and sets errno to one of the following values:
Error Code
Description
EFAULT
An argument of this function contained an address that was not accessible to the caller.
EINVAL
An argument of this function contained an incorrect value.
EMVSSAF2ERR
An error occurred in the security product.
EMVSWLMERROR
The WLM leave enclave failed. Use __errno2() to obtain the WLM service reason code for the failure.
EPERM
The calling thread's address space is not permitted to the BPX.WLMSERVER Facility class. The caller's address space must be permitted to the BPX.WLMSERVER Facility class if it is defined. If BPX.WLMSERVER is not defined, the calling process is not defined as a superuser (UID=0).

Related information