Routine


 #include <cio/routine.h> 

Functions

int cio_routine (void(*routine)(void *), const void *arg, size_t argsize)

Function Documentation

int cio_routine ( void(*)(void *)  func,
const void *  arg,
size_t  argsize 
)

Create and schedule a new routine. The routine will receive a copy of the argument, allocated on its own stack.

Parameters:
func a function to execute
arg pointer to an argument for to the routine
argsize size of the argument
Return values:
0 on success
-1 on error with errno set