How to start a c-function in another cog
in the help-file of flexprop, it says:
int _cogstart_C(void (*func)(void *), void *arg, void *stack_base, uint32_t stack_size)
Starts C code in another COG. func is the address of a C function which expects one argument, and which will run in another COG (cpu core). arg is the argument to pass to the function for this invocation. stack_base is the base address of a block of memory to use for the stack. stack_size is the size in bytes of the memory.
I don't know, what a 'void *arg' is. My code does crash invoking:
_cogstart_C(func, arg, stack_base, stack_size);
But that does crash too.
Where can I find a working example?
Edit: Even more confusing:
error: Expected pointer to stack as last parameter to coginit/cogid