summaryrefslogtreecommitdiff
path: root/userspace/threading.c
blob: 2ceaad38f1b191c13b977e8ebbff40154f3cf836 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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");
    }

}