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.

BX<br />

ES:DI<br />

0x19 (= RTX_RESERVE_RES)<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, semaphore is in use<br />

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

semaphore is still in use by another task after the timeout period expires.<br />

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

On success, the calling task then owns the resource semaphore. A task which owns the semaphore is<br />

free to call here repeated times, reserving the same semaphore more than once. Each such call<br />

increments a "use count" internal to the semaphore. This use count must be restored to zero before any<br />

other task can be granted ownership of this resource semaphore.<br />

Related Topics<br />

Top of list<br />

Index page<br />

RTX_FREE_RES Free resource semaphore<br />

RTX_RELEASE_SEM Release resource semaphore<br />

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

Interrupt 0xAD service 0x1A: RTX_SIGNAL_SEM, Signal a counting semaphore<br />

Parameters<br />

AH<br />

BX<br />

Make semaphore access available to one additional task.<br />

0x1A (= RTX_SIGNAL_SEM)<br />

ID of the semaphore acquired from RTX_CREATE_SEM<br />

Return Value<br />

DX =0 success AX: 0<br />

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

Page 195 / 400

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

Saved successfully!

Ooh no, something went wrong!