CEEOPRT
C library interface: pthread_rwlock_tryrdlock()
CEEOPRT conditionally acquires (locks) the read-write lock for
read referred to by rwlock. Conditionally
means the call always returns immediately, whether or not the lock
is acquired. If the read-write lock is already locked for write, or
if there are threads waiting for the read-write lock for write, the
read-write lock is not acquired. The exception is when the calling
thread has already locked the read-write lock for read, in which case
it will still acquire the lock. When successful, this function returns
with the read-write lock in the locked state with the calling thread
as its owner.
Note: Only the owning thread (the thread that acquired
a read-write lock) can unlock it.
Syntax
void CEEOPRT (rwlock,
[fc])
CEE_RWLOCK *rwlock;
FEED_BACK *fc;
- CEEOPRT
- Call this CWI interface as follows:
L R15,CEECAALEOV-CEECAA(,R12) CAA address is in R12 L R15,504(,R15) BALR R14,R15
- rwlock (input)
- The read-write lock to be locked for read conditionally.
- fc (output/optional)
- The feedback code returned by the service. It indicates the degree of success in locking the read-write lock for read conditionally.
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. | |
CEE5K4 | Severity | 3 |
Msg_No | 5764 | |
Message | The read-write lock specified by the rwlock was not initialized. | |
CEE5K6 | Severity | 3 |
Msg_No | 5766 | |
Message | An addressing exception occurred referencing a lock object. | |
CEE5K7 | Severity | 4 |
Msg_No | 5767 | |
Message | Address exception while referencing system storage allocated by lock object initialization. | |
CEE5KN | Severity | 4 |
Msg_No | 5783 | |
Message | Read-write lock specified by rwlock was not locked because thread was forced to terminate. | |
CEE5KQ | Severity | 3 |
Msg_No | 5786 | |
Message | The callable service BPX1SLK failed during shared lock processing. The system return code was return_code, the reason code was reason_code, X'00''. | |
CEE5KR | Severity | 3 |
Msg_No | 5787 | |
Message | Not enough resource (other than memory). | |
CEE5KS | Severity | 3 |
Msg_No | 5788 | |
Message | The read-write lock specified by rwlock was busy. | |
CEE5KU | Severity | 3 |
Msg_No | 5790 | |
Message | Insufficient storage to lock the read-write lock object specified by rwlock. | |
CEE5KV | Severity | 4 |
Msg_No | 5791 | |
Message | System read-write lock storage could not be freed. |
Usage Notes:
- It is assumed that routine is currently available and does not require an explicit LOAD performed.