Jump to content

Beginthread: Difference between revisions

From EDM2
m A link To Creating Threads
Ak120 (talk | contribs)
mNo edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:_beginthread}}
Prototype:
Prototype:
  #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 );


* thread_function is a pointer to the initial funcion.
* thread_function is a pointer to the initial funcion.
Line 9: Line 12:
* 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 ==
* [[UsingThreads#Creating Threads|Creating Threads]]
* [[C Library Reference]]


* [[UsingThreads#Creating Threads | UsingThreads: Creating Threads]]
[[Category:C Libraries]]
 
----
 
[[OS2_API:CLR | Back to C Library Reference]]

Latest revision as of 16:54, 4 October 2023

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.

See Also