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.

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

pt_create Creates a memory partition of fixed-size buffers.<br />

#include <br />

unsigned long pt_create(<br />

char name[4], /* partition name */<br />

void *paddr, /* partition physical addr. */<br />

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

unsigned long length, /* partition length in bytes */<br />

unsigned long bsize, /* buffer size in bytes */<br />

unsigned long flags, /* buffer attributes */<br />

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

unsigned long *nbuf /* number of buffers created */<br />

)<br />

Description<br />

Arguments<br />

This service call enables a task to create a new memory partition, from which fixedsized<br />

memory buffers can be allocated for use by the application. The pSOS+ kernel<br />

takes a portion from the top of this region to use as its Partition Control Block.<br />

name Specifies the user-assigned name for the new partition.<br />

paddr Specifies the physical memory address of the partition.<br />

laddr Specifies the logical address of the partition generated after MMUtranslation;<br />

laddr is ignored on non-MMU systems.<br />

length Specifies the total partition length in bytes.<br />

bsize Specifies the size of the buffers. bsize must be a power of 2, and<br />

equal to or greater than 4.<br />

flags Specifies the attributes of the buffer. flags is formed by OR-ing the<br />

following symbolic constants (one from each pair), which are defined<br />

in . For instance, to specify that a partition is globally<br />

addressable, you place the symbolic constant PT_GLOBAL in flags.<br />

To specify that the partition is globally addressable and that it<br />

prohibits deletion with outstanding buffers, you place both<br />

PT_GLOBAL and PT_NODEL in flags, using the following syntax:<br />

PT_GLOBAL | PT_NODEL<br />

1-48 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

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

Saved successfully!

Ooh no, something went wrong!