beautypg.com

Renesas Stub Generator V.1.00 User Manual

Page 115

background image

Section 8 Application Interface

Rev. 1.01 Mar. 17, 2008 Page 103 of 128

REJ10J1822-0101

• Example of implementation (for the HI7200/MP)

#define MAXTSKID 10 /* Maximum task ID */

static INT32 retval[MAXTSKID+1]; /* Array to hold the return */

/* value in the context */

/* [0]: Non-task context */

/* [1] to [MAXTSKID]: Task ID */

INT32

*rpc_retval_adr(void)

{

INT32 *retval_adr;

ID myid;

if(sns_ctx() == TRUE)

{

/* In a non-task context */

retval_adr = retval;

}

else

{

/* In a task context */

get_tid(%myid);

retval_adr = &retval[GET_LOCALID(myid)];

}

return retval_adr;

}

This manual is related to the following products: