home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
FSGFX.ZIP
/
SPWNTHRD.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-03-07
|
351b
|
18 lines
#include <os2.h>
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <myproc.h>
int spawnthread(int *threadid, void (*fxn)(void))
{
char *threadstack;
if((threadstack = malloc(64000)) == NULL)
{
printf("Unable to allocate stacks");
return(2);
}
return(DosCreateThread(fxn,threadid,
threadstack+64001));
}