(a)
taskLed (g_in, rotation);
(b)
// SynthOS: begin generated code
// original statement: taskLed (g_in, rotation);
// Create a new TCB.
{
struct SYNTHOS_TCB *stcpNewTcb;
stcpNewTcb = getFreeTcb(g_stcpTcbQ__taskLed);
// make sure we get a free TCB
ASSERT (stcpNewTcb != NULL);
stcpNewTcb->u32TaskState = 1;
stcpNewTcb->pTaskId = NULL;
stcpNewTcb->u32Params[0] = g_in;
stcpNewTcb->u32Params[1] = rotation;
(taskLed__type *)stcpNewTcb->u32pRetVal = &taskLed__dummy;
}
// SynthOS: end generated code
Example 1: (a) SynthOS primitive; (b) resulting synthesized C source code.
Back to Article