Explain DosCreateThread Functions Used in the OS/2
DosCreateThread(&threadID,MyThreadFunction,arg,flags,stackSize)
DosCreateThread creates a thread within the context of the currently executing process. This function call returns the thread ID of the newly created thread in &threadID.The developer must pass a function pointer (MyThreadFunction), a stack size (stack Size), and an optional 32-bit argument (arg).
When the DosCreateThread( ) is called, OS/2 allocates a stack, (sackSize)size and places an asynchronous unit of execution on the runqueue. OS/2 will manage all aspects of the stack, including expansion and deletion. The 32-bit argument will be passed to the MyThreadFunction when initiated. OS/2 also allows the thread to be started in a suspended state with use of the flags parameter.