void
This commit is contained in:
parent
a77346cc5a
commit
cc070b0598
@ -41,6 +41,6 @@ void sus_heapFree(void * memroy); // what should this function do, if an error o
|
|||||||
// Networking API -- coming soon, cuz idk
|
// Networking API -- coming soon, cuz idk
|
||||||
|
|
||||||
//Threads
|
//Threads
|
||||||
typedef __attribute__ ((sysv_abi)) int (*sus_threadProc)(void * arg);
|
typedef __attribute__ ((sysv_abi)) void (*sus_threadProc)(void * arg);
|
||||||
sus_Bool sus_threadNew(sus_threadProc proc, void * arg);
|
sus_Bool sus_threadNew(sus_threadProc proc, void * arg);
|
||||||
void sus_threadSleep(unsigned long seconds);
|
void sus_threadSleep(unsigned long seconds);
|
@ -10,7 +10,8 @@ DWORD WINAPI threadProc(void * tiarg){
|
|||||||
struct threadInfo * ti = tiarg;
|
struct threadInfo * ti = tiarg;
|
||||||
struct threadInfo currentTI = {.args = ti->args, .proc = ti->proc};
|
struct threadInfo currentTI = {.args = ti->args, .proc = ti->proc};
|
||||||
sus_heapFree(ti);
|
sus_heapFree(ti);
|
||||||
return currentTI.proc(currentTI.args);
|
currentTI.proc(currentTI.args);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sus_Bool sus_threadNew(sus_threadProc proc, void * arg){
|
sus_Bool sus_threadNew(sus_threadProc proc, void * arg){
|
||||||
|
Loading…
Reference in New Issue
Block a user