06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

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.

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

pt_getbuf Gets a buffer from a partition.<br />

#include <br />

unsigned long pt_getbuf(<br />

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

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

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

This system call gets a buffer from a partition. If the partition is empty, an error is<br />

returned.<br />

ptid Specifies the partition identifier.<br />

bufaddr Points to the variable where pt_getbuf() stores the<br />

starting address of the allocated buffer.<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 />

0x2C ERR_NOBUF Cannot allocate; partition out of free<br />

buffers.<br />

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

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

1

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

Saved successfully!

Ooh no, something went wrong!