CEEOPCW

C library interface: pthread_cond_wait()

CEEOPCW blocks the calling thread until another thread calls the condition signal or broadcast service specifying the same condition object cond. CEEOPCW releases the associated mutex object mutex before blocking the thread. Before returning to the caller, CEEOPCW reacquires (locks) the mutex again.

Syntax

void CEEOPCW (cond, mutex, [fc])
CEE_TOKEN    *cond;
CEE_MUTEX    *mutex;
FEED_BACK    *fc;
CEEOPCW
Call this CWI interface as follows:
L     R15,CEECAALEOV-CEECAA(,R12)     CAA address is in R12
L     R15,0228(,R15)
BALR  R14,R15
cond (input)
The condition object to wait on.
mutex (input)
The associated locked mutex.
fc (output/optional)
The feedback code returned by the service. It indicates the degree of success in waiting for the condition variable.

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

Condition Description category Description value
CEE000 Severity 0
Msg_No 0000
Message The service completed successfully.
CEE4S9 Severity 3
Msg_No 5001
Message The service is unavailable unless POSIX(ON) runtime option specified and z/OS UNIX System Services are started.
CEE5I5 Severity 3
Msg_No 5701
Message The mutex specified by mutex is not initialized.
CEE5I8 Severity 4
Msg_No 5704
Message Address exception while referencing storage allocated by condition initialization for pthread_mutex_t object specified by mutex.
CEE5IA Severity 3
Msg_No 5706
Message The mutex specified by mutex is not owned by the calling thread.
CEE5IO Severity 4
Msg_No 5720
Message Mutex specified by mutex not reacquired after condition wait terminated because thread was forced to terminate.
CEE5IU Severity 3
Msg_No 5726
Message The condition variable specified by cond is not initialized.
CEE5J0 Severity 4
Msg_No 5728
Message Address exception while referencing storage allocated by condition initialization for cond_t object specified by cond.
CEE5J1 Severity 3
Msg_No 5729
Message The mutex specified by mutex is a recursive mutex.
CEE5J2 Severity 3
Msg_No 5730
Message A mutex other than the mutex specified by mutex is already associated with the condition specified by cond.
CEE5J3 Severity 3
Msg_No 5731
Message Unexpected return code from z/OS UNIX condition setup, BPX1CSE, callable service.
CEE5J4 Severity 3
Msg_No 5732
Message Unexpected return code from z/OS UNIX condition wait, BPX1CWA, callable service.
CEE5L3 Severity 3
Msg_No 5795
Message The callable service, BPX1SMC, failed during shared condition variable processing. The system return code was return_code. The reason code was return_code X'00'.