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

rn_create Creates a memory region.<br />

#include <br />

unsigned long rn_create(<br />

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

void *saddr, /* starting address */<br />

unsigned long length, /* region's size in bytes */<br />

unsigned long unit_size, /* region's unit of allocation */<br />

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

unsigned long *rnid, /* region ID */<br />

unsigned long *asiz /* allocatable size */<br />

)<br />

Description<br />

Arguments<br />

This service call enables a task to create a memory region, from which variable-sized<br />

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

takes a portion from the beginning of this region to use as its Region Control Block<br />

(RNCB.) All relevant region arguments such as unit size and whether tasks will wait<br />

by FIFO or task priority order are established using this call.<br />

name Specifies the user-assigned name of the new region.<br />

saddr Specifies the starting address of the region's memory area. saddr<br />

must be on a long word boundary.<br />

length Specifies the region's size, in bytes.<br />

unit_size Specifies the region's unit of allocation in bytes. unit_size must<br />

be a power of 2 and greater than or equal to 16. All allocation will be<br />

in multiples of unit_size.<br />

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

1

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

Saved successfully!

Ooh no, something went wrong!