30.12.2013 Views

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

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.

4.5. EXTENDED SYNCHRONIZATION AND COMMUNICATION FUNCTIONS 129<br />

tk cre por<br />

Create Port for Rendezvous<br />

[C Language Interface]<br />

ID porid = tk_cre_por ( T_CPOR *pk_cpor ) ;<br />

[Parameters]<br />

T CPOR* pk cpor Information about the rendezvous port to be created<br />

pk cpor detail:<br />

VP exinf Extended information<br />

ATR poratr Rendezvous port attributes<br />

INT maxcmsz Maximum call message size (in bytes)<br />

INT maxrmsz Maximum reply message size (in bytes)<br />

(Other implementation-dependent parameters may be added beyond this point.)<br />

[Return Parameters]<br />

ID porid Port ID<br />

or Error Code<br />

[Error Codes]<br />

E OK<br />

E NOMEM<br />

E LIMIT<br />

E RSATR<br />

E PAR<br />

Normal completion<br />

Insufficient memory (memory for control block cannot be allocated)<br />

Number of rendezvous ports exceeds the system limit<br />

Reserved attribute (poratr is invalid or cannot be used)<br />

Parameter error (pk cpor is invalid; maxcmsz or maxrmsz is negative or invalid)<br />

[Description]<br />

Creates a rendezvous port, assigning to it a rendezvous port ID number.<br />

This specification allocates a control block to the created rendezvous port. A rendezvous port is an<br />

object used as an OS primitive for implementing a rendezvous capability.<br />

exinf can be used freely by the user to set miscellaneous information about the created rendezvous<br />

port. The information set in this parameter can be referenced by tk ref por. If a larger area is needed<br />

for indicating user information, or if the information may need to be changed after the rendezvous port<br />

is created, this can be done by allocating separate memory for this purpose and putting the memory<br />

packet address in exinf. The OS pays no attention to the contents of exinf.<br />

poratr indicates system attributes in its low bits and implementation-dependent information in the high<br />

bits. Designation in the system attributes part of poratr is as follows.<br />

Copyright c○ 2002, 2003 by T-Engine Forum<br />

T-<strong>Kernel</strong> <strong>1.B0.02</strong>

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

Saved successfully!

Ooh no, something went wrong!