Jump to content

DosCreateThread: Difference between revisions

From EDM2
m Added links
Ak120 (talk | contribs)
mNo edit summary
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Prototype:
Creates an asynchronous thread of processing under the current process.


#define INCL_DOSPROCESS
==Syntax==
#include <os2.h>
  DosCreateThread ( tid, function, parameter, flags, stacksize )
  APIRET DosCreateThread( PTID ptid, PFNTHREAD start_function, ULONG parameter, ULONG flags, ULONG stack_size );


----
=== Parameters ===
;tid (PTID) output : Thread ID
;function (PFNTHREAD) input : Function to run in new thread
;parameter ([[ULONG]]) input : Parameter passed to function
;flags (ULONG) input : Flags for the new thread
;stacksize (ULONG) input : Stack size for the new thread


== See Also ==
=== Prototype ===
APIRET DosCreateThread( PTID tid,
                        PFNTHREAD function,
                        ULONG parameter,
                        ULONG flags,
                        ULONG stack_size );


* [[UsingThreads#Creating Threads | UsingThreads: Creating Threads]]
=== Define C/C++ ===
INCL_DOSPROCESS


----
=== Notes ===
;OS Version Introduced: OS/2 1.0


[[OS2 API:CPI | Back to Control Programming]]
See Also:
*[[DosExit]]
*[[UsingThreads#Creating Threads | UsingThreads: Creating Threads]]
 
[[Category:Dos]]

Latest revision as of 21:48, 26 September 2017

Creates an asynchronous thread of processing under the current process.

Syntax

DosCreateThread ( tid, function, parameter, flags, stacksize )

Parameters

tid (PTID) output
Thread ID
function (PFNTHREAD) input
Function to run in new thread
parameter (ULONG) input
Parameter passed to function
flags (ULONG) input
Flags for the new thread
stacksize (ULONG) input
Stack size for the new thread

Prototype

APIRET DosCreateThread( PTID tid, 
                        PFNTHREAD function,
                        ULONG parameter,
                        ULONG flags,
                        ULONG stack_size );

Define C/C++

INCL_DOSPROCESS

Notes

OS Version Introduced
OS/2 1.0

See Also: