diff options
Diffstat (limited to 'userspace')
| -rw-r--r-- | userspace/threading.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/userspace/threading.c b/userspace/threading.c new file mode 100644 index 0000000..2ceaad3 --- /dev/null +++ b/userspace/threading.c @@ -0,0 +1,18 @@ +#include <stdio.h> +#include "newcalls.h" + +int main() +{ + int thread=_clone(); // we want two threads + + if(thread!=0) // thread 1 + { + while(1) printf("a\n"); + } + else // thread2 + { + while(1) printf("b\n"); + } + +} + |
