06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

pSOS+ <strong>System</strong> <strong>Calls</strong> pt_retbuf<br />

pt_retbuf Returns a buffer to the partition from which it came.<br />

#include <br />

unsigned long pt_retbuf(<br />

unsigned long ptid, /* partition identifier */<br />

void *bufaddr /* starting address of the buffer */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

This system call returns a buffer to the partition from which it was allocated.<br />

Because the pSOS+ kernel does not keep track of buffer ownership, it is possible for<br />

one task to get a buffer, and another task to return it.<br />

ptid Specifies the partition ID of the buffer to return.<br />

bufaddr Specifies the buffer’s starting address.<br />

This system call returns 0 on success, or an error code on failure.<br />

Hex Mnemonic Description<br />

0x05 ERR_OBJDEL Partition has been deleted.<br />

0x06 ERR_OBJID ptid is incorrect; failed validity<br />

check.<br />

0x07 ERR_OBJTYPE Object type doesn’t match object ID;<br />

failed validity check.<br />

0x2D ERR_BUFADDR Incorrect buffer starting address.<br />

0x2F ERR_BUFFREE Buffer is already unallocated.<br />

0x65 ERR_STALEID Object's node has failed.<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 1-57<br />

1

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

Saved successfully!

Ooh no, something went wrong!