CringeDB/tests/System Abstraction/5/threadsTest.c
2024-02-18 17:49:32 +01:00

16 lines
518 B
C

#include "../../../System Abstraction/cdb_system.h"
#include <stdio.h>
__attribute__ ((sysv_abi)) void testProc(void * arg){
printf("in testProc ... Going to sleep, %i\n", *(int *)arg);
sys_threadSleep(5);
printf("after sleeping in testProc\n");
}
int main(){
int amogus = 1234567;
printf("Thread creation succesfull? %i\n", sys_threadNew(&testProc, &amogus));
printf("Going to sleep in main Thread\n");
sys_threadSleep(10);
printf("After sleeping in main Thread\n");
}