01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Comments<br />

Use this function to either surrender access to a counting semaphore, or to indicate that some resource<br />

guarded by this semaphore has become available.<br />

Upon this signal, the semaphore will be given to the task (if any) which is waiting at the head of this<br />

semaphore's wait queue. This can result in an immediate task switch if this waiting task is higher<br />

priority than the calling task.<br />

This function must not be called for resource semaphores, as this will cause the resource semaphore to<br />

malfunction.<br />

Related Topics<br />

Top of list<br />

Index page<br />

RTX_WAIT_SEM Wait for counting semaphore access<br />

RTX_GET_SEM Get counting semaphore without waiting<br />

<strong>RTOS</strong> Semaphore Services<br />

Interrupt 0xAD service 0x1B: RTX_WAIT_SEM, Wait on a counting semaphore<br />

Parameters<br />

AH<br />

BX<br />

ES:DI<br />

Wait up to a specified time for access to a counting semaphore.<br />

0x1B (= RTX_WAIT_SEM)<br />

ID of the semaphore acquired from RTX_CREATE_SEM<br />

Pointer to signed long buffer containing the timeout in milliseconds<br />

if timeout == 0, the caller waits forever for the resource<br />

if timeout < 0, value is illegal resulting in error code -48<br />

Return Value<br />

Comments<br />

DX =0 success AX: 0<br />

DX!=0 failure AX: contains error code<br />

This call waits for a defined time to acquire a counting semaphore and returns with an error code -27 if<br />

the semaphore is still not available after the timeout period expires.<br />

The callers wait in FIFO order for the semaphore.<br />

Related Topics<br />

RTX_SIGNAL_SEM Signal counting semaphore<br />

Page 196 / 400

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!