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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

138 CHAPTER 4. T-KERNEL/OS FUNCTIONS<br />

tk fwd por<br />

Forward Rendezvous to Other Port<br />

[C Language Interface]<br />

ER ercd = tk_fwd_por ( ID porid, UINT calptn, RNO rdvno, VP msg, INT cmsgsz ) ;<br />

[Parameters]<br />

ID porid Rendezvous port ID<br />

UINT calptn Call bit pattern (indicating conditions of the caller)<br />

RNO rdvno Rendezvous number before forwarding<br />

VP msg Message packet address<br />

INT cmsgsz Call message size (in bytes)<br />

[Return Parameters]<br />

ER ercd Error code<br />

[Error Codes]<br />

E OK<br />

E ID<br />

E NOEXS<br />

E PAR<br />

E OBJ<br />

E CTX<br />

E DISWAI<br />

Normal completion<br />

Invalid ID number (porid is invalid or cannot be used, or porid is a rendezvous port of<br />

another node)<br />

Object does not exist (the rendezvous port designated in porid does not exist)<br />

Parameter error (cmsgsz < 0, cmsgsz > maxcmsz after forwarding, cmsgsz > maxrmsz<br />

before forwarding, calptn = 0, or value that cannot be used in msg)<br />

Invalid object state (rdvno is invalid, or maxrmsz (after forwarding) > maxrmsz (before<br />

forwarding))<br />

Context error (issued from task-independent portion (implementation-dependent error))<br />

Wait released by wait disabled state<br />

[Description]<br />

Forwards an accepted rendezvous to another rendezvous port.<br />

The task issuing this system call (here “Task X”) must have accepted the rendezvous designated in<br />

porid; i.e., this system call can be issued only after executing tk acp por. In the discussion that follows,<br />

the rendezvous calling task is “Task Y”, and the rendezvous number passed in a return parameter by<br />

tk acp por is rdvno. After tk fwd por is issued in this situation, the rendezvous between Task X and<br />

Task Y is released, and all processing thereafter is the same as if Task Y had called for a rendezvous on<br />

another port (rendezvous port B) passed to this system call in porid.<br />

The specific operations of tk fwd por are as follows.<br />

1. The rendezvous designated in rdvno is released.<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!