This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Passing parameters to a Clock function in SYS/BIOS

I am trying to build a program that uses SYS/BIOS (aka BIOS 6) with CCS 4.2.  The BIOS "Clock" module can be set up to run a function either periodically or only once ("one-shot"). In my case, I need to run it only once. Setting up and initializing the clock is not a problem:

 

Clock_Handle clk;

Clock_Params clkParams;

Clock_Params_init(&clkParams);

clkParams.period = 0;

clkParams.startFlag = FALSE;

clk = Clock_create(myFunc, 1, &clkParams, NULL);

Clock_start(clk);

 

In Clock_create, I am setting up the clock to execute "myFunc". What I don't know how to do is pass parameters into myFunc. From BIOS documentation, the only way I saw is to define the optional clock argument:

clkParams.arg = (UArg)0x1234;   /* set up a flag for the clock */

However, that's just a single 32-bit value. What I need is to pass arbitrary parameters, which might include different primitive types, pointers, and structures, into myFunc. Suppose myFunc is defined as:

void myFunc(int* x, size_t x_len);

Is there a way to do it? It seems that not being able to pass parameters to functions, either periodic or one-shot, would be a significant restriction. I am sure it can be done, I just lack knowledge on SYS/BIOS.