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.

pNA+ <strong>System</strong> <strong>Calls</strong> pna_esballoc<br />

pna_esballoc Attaches a message block to the data buffer.<br />

#include <br />

mblk_t *pna_esballoc(buffer, size, pri, frtn)<br />

unsigned char *buffer;<br />

int size;<br />

int pri;<br />

frtn_t *frtn;<br />

Description<br />

Arguments<br />

Return Value<br />

pna_esballoc allocates and attaches a message block to the user-supplied data<br />

buffer; it uses a zero-sized data block to attach the message block to the data buffer.<br />

buffer Points to the user-supplied data buffer.<br />

size Specifies the size of buffer.<br />

pri Unused by the pNA+ memory manager.<br />

frtn Points to the free_rtn structure, which specifies a free routine<br />

and an argument to the free routine. The free routine is called by<br />

the pNA+ memory manager when the user-specified data buffer is<br />

being freed. The free_rtn structure is defined in as follows:<br />

struct free_rtn {<br />

void (*free_func)(); /* User free routine */<br />

void *free_arg; /* Argument to free routine */<br />

};<br />

typedef struct free_rtn frtn_t;<br />

This system call returns a pointer to the message block if successful; otherwise, it<br />

returns a null pointer.<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 4-41<br />

4

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

Saved successfully!

Ooh no, something went wrong!