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_sgetbuf<br />

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

#include <br />

unsigned long pt_sgetbuf(<br />

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

void **paddr, /* physical address */<br />

void **laddr /* logical address */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

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

returned.<br />

On MMU-based systems, both physical and logical addresses are returned to<br />

simplify transfer of buffers between supervisor and user mode programs. In non-<br />

MMU systems, the logical address is the same as the physical address, and this call<br />

functions the same as the pt_getbuf() call.<br />

This service is available in the non-MMU versions of the pSOS+ kernel for the sole<br />

purpose of enabling software designed for MMU-based systems to run, unmodified,<br />

on systems without MMU.<br />

ptid Specifies the buffer's partition ID.<br />

paddr Points to the variable where pt_sgetbuf() stores the physical<br />

address of the buffer.<br />

laddr Points to the variable where pt_sgetbuf() stores the logical address<br />

of the buffer.<br />

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

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

1

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

Saved successfully!

Ooh no, something went wrong!