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 too many arguments to a function

Other Parts Discussed in Thread: SYSBIOS

We are using sysbios 6.33.6.50. To word around the problem that only 2 argument can be passed to a new task, we created a wrapper to pass in a fixed number (currently 10) of arguments, which are passed directly to the task entry. The task entry function mostly have less than 10 arguments. Could this be a problem? We could pass in number of arguments as in the wrapper and use the appropriate format as well. Just want to know if this presents any risk.

From the C66 c-compiler calling convention, it seems ok, because these arguments (all in int) are passed in registers. As long as caller does not assume and reuse any of those registers, called function can use them at will, right?

thanks

Weichun

  • Weichun,

    My recommendation is to create a struct object that will contain all of the arguments for the new task. Then you can pass the address of that struct as one of the 2 arguments. This can then be interpreted correctly by the new task and there will be no compiler problem.

    Regards,
    RandyP