RTEMS ITRON 3.0 API User's Guide
ER wai_sem( ID semid );
E_OK
- Normal Completion
E_ID
- Invalid ID number (semid was invalid or could not be used)
E_NOEXS
- Object does not exist (the semaphore specified by semid
does not exist)
E_OACV
- Object access violation (A semid less than -4 was
specified from a user task. This is implementation dependent.)
E_DLT
- The object being waited for was deleted (the specified
semaphore was deleted while waiting)
E_RLWAI
- Wait state was forcibly released (rel_wai was received
while waiting)
E_CTX
- Context error (issued from task-independent portions or a
task in dispatch disabled state)
EN_OBJNO
- An object number which could not be accessed on the
target node is specified.
EN_PAR
- A value outside the range supported by the target node
and/or transmission packet format was specified as a parameter (a value
outside supported range was specified for tmout)
This routine attempts to acquire the semaphore specified by semid
.
If the semaphore is available (i.e. positive semaphore count), then the
semaphore count is decremented and the calling task returns immediately.
Otherwise the calling tasking is blocked until the semaphore is released
by a subsequent invocation of sig_sem
.
Multiprocessing is not supported. Thus none of the "EN_" status codes will be returned.
If the semaphore is not available, then the calling task will be blocked.
RTEMS ITRON 3.0 API User's Guide
Copyright © 1988-2008 OAR Corporation