Jump to content

DosCreateThread: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
=== DosCreateThread ===
Creates an asynchronous thread of processing under the current process.
; DosCreaeThread( tid, function, parameter, flags, stacksize ) : Create another thread that runs function.
 
==Syntax==
DosCreateThread ( tid, function, parameter, flags, stacksize )


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


=== Prototype ===
=== Prototype ===
Line 20: Line 17:
                         ULONG flags,
                         ULONG flags,
                         ULONG stack_size );
                         ULONG stack_size );
=== Module ===


=== Define C/C++ ===
=== Define C/C++ ===
INCL_DOSPROCESS
INCL_DOSPROCESS
 
=== Export Name/Ordinal ===
 
=== Calling Convention ===
 
=== Example Code ===
 
=== Relater Functions ===
[[OS2 API:DosExit|DosExit]]


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


=== OS Version Introduced ===
See Also:
OS/2 1.0
*[[DosExit]]
 
*[[UsingThreads#Creating Threads | UsingThreads: Creating Threads]]
== See Also ==
 
* [[UsingThreads#Creating Threads | UsingThreads: Creating Threads]]
 
----
 
[[OS2 API:CPI | Back to Control Programming]]


[[Category:The OS/2 API Project]]
[[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: