CEEOPCPO

C library interface: pthread_cleanup_pop()

CEEOPCPO removes the routine at the top of the cleanup stack of the calling thread and optionally executes it, if execute is nonzero. The cleanup stack is what is specific to cleanup routines registered for the thread by the CEEOPCPU service. The processing of the registered cleanup routines also takes place at thread termination.

Syntax

void CEEOPCPO (execute, [fc])
INT4        *execute;
FEED_BACK   *fc;
CEEOPCPO
Call this CWI interface as follows:
L     R15,CEECAALEOV-CEECAA(,R12)     CAA address is in R12
L     R15,0060(,R15)
BALR  R14,R15
execute (input)
An indicator to execute the cleanup routine that is being popped. If execute is nonzero, the routine that was previously registered through the CEEOPCPU service is executed.
fc (output/optional)
The feedback code returned by the service. It indicates the degree of success in popping and optionally executing the routine.

The following message identifiers and associated severities can be returned by the service in the feedback code fc.

Condition  
CEE000 Severity 0
Msg_No 0000
Message The service completed successfully.
CEE4S9 Severity 3
Msg_No 5001
Message POSIX services not available.
CEE5FS Severity 3
Msg_No 5628
Message Thread termination is in progress. This operation is not allowed. Calls to cleanup routine functions are not permitted during thread termination.
CEE5FT Severity 3
Msg_No 5629
Message No routine to execute (stack is empty).