CringeDB/tests/System Abstraction/5/threadsTest.c

16 lines
518 B
C
Raw Normal View History

2022-08-30 13:28:21 +02:00
#include "../../../System Abstraction/cdb_sustem.h"
#include <stdio.h>
2022-08-30 13:42:25 +02:00
__attribute__ ((sysv_abi)) void testProc(void * arg){
2022-08-30 13:28:21 +02:00
printf("in testProc ... Going to sleep, %i\n", *(int *)arg);
sus_threadSleep(5);
printf("after sleeping in testProc\n");
}
int main(){
int amogus = 1234567;
2022-08-30 13:37:16 +02:00
printf("Thread creation succesfull? %i\n", sus_threadNew(&testProc, &amogus));
2022-08-30 13:28:21 +02:00
printf("Going to sleep in main Thread\n");
sus_threadSleep(10);
printf("After sleeping in main Thread\n");
}