diff --git a/tests/System Abstraction/5/compile.bat b/tests/System Abstraction/5/compile.bat new file mode 100644 index 0000000..683c47a --- /dev/null +++ b/tests/System Abstraction/5/compile.bat @@ -0,0 +1 @@ +gcc.exe threadsTest.c "../../../System Abstraction/win32/cdb_thread.c" "../../../System Abstraction/win32/cdb_memroy.c" -o threadTests.exe \ No newline at end of file diff --git a/tests/System Abstraction/5/threadTests.exe b/tests/System Abstraction/5/threadTests.exe new file mode 100644 index 0000000..2e802ab Binary files /dev/null and b/tests/System Abstraction/5/threadTests.exe differ diff --git a/tests/System Abstraction/5/threadsTest.c b/tests/System Abstraction/5/threadsTest.c new file mode 100644 index 0000000..b8bd3a6 --- /dev/null +++ b/tests/System Abstraction/5/threadsTest.c @@ -0,0 +1,16 @@ +#include "../../../System Abstraction/cdb_sustem.h" +#include + +sus_threadProc testProc(void * arg){ + printf("in testProc ... Going to sleep, %i\n", *(int *)arg); + sus_threadSleep(5); + printf("after sleeping in testProc\n"); +} + +int main(){ + int amogus = 1234567; + printf("Thread creation succesfull? %i\n", sus_threadNew(testProc, &amogus)); + printf("Going to sleep in main Thread\n"); + sus_threadSleep(10); + printf("After sleeping in main Thread\n"); +} \ No newline at end of file