cothreads
userspace threads
Cothreads are a simple user-space method for switching between
subtasks. They're based on setjmp()/longjmp() in their current form.
Cothreads are used for loop-based elements that pull data instead
of being fed with data. They can also be used to pull a specific region
of data out of their src element.
The default stack size of a cothread.
The maximum number of cothreads we are going to support.
@ctx:
@threadnum:
@func:
@argc:
@argv:
@flags:
@sp:
@jmp:
@top_sp:
@pc:
@threads:
@nthreads:
@current:
@data:
the function that will be called when the cothread starts. The function
prototype is like a main() function, so you can do whatever you want with
it.
@argc: a main-like argument count
@argv: a main-like array of arguments
@Returns: a return code
Indicates the cothread is started.
@Returns:
@ctx:
@Returns:
@thread:
@func:
@argc:
@argv:
@thread:
@Returns:
@ctx:
@Returns:
@thread:
@key:
@data:
@thread:
@key:
@Returns: