Beginthread: Difference between revisions
Appearance
Myrkraverk (talk | contribs) m A link To Creating Threads |
Myrkraverk (talk | contribs) Add return value |
||
Line 2: | Line 2: | ||
#include <process.h> | #include <process.h> | ||
int _beginthread( void (*thread_function)( void* ), void *stack, unsigned int stack_size, void *arg ); | int _beginthread( void (*thread_function)( void* ), void *stack, unsigned int stack_size, void *arg ); | ||
Line 9: | Line 9: | ||
* stack_size is the size of the stack for the thread. | * stack_size is the size of the stack for the thread. | ||
* arg is passed to thread_funcion. | * arg is passed to thread_funcion. | ||
Returns the thread ID of the newly created thread. | |||
== See Also == | == See Also == |
Revision as of 05:12, 5 November 2007
Prototype:
#include <process.h> int _beginthread( void (*thread_function)( void* ), void *stack, unsigned int stack_size, void *arg );
- thread_function is a pointer to the initial funcion.
- stack is ignored; left for compatibility.
- stack_size is the size of the stack for the thread.
- arg is passed to thread_funcion.
Returns the thread ID of the newly created thread.