All pastes #2069600 Raw Edit

Miscellany

public text v1 · immutable
#2069600 ·published 2011-05-26 19:44 UTC
rendered paste body
#include <stdio.h>
#include <pthread.h>

int *thr(void*i);
int main(void){
        int i = 0;
        pthread_t t0,t1;
        pthread_create(&t0,NULL,thr,&i);
        i++;
        pthread_create(&t1,NULL,thr,&i);
        sleep(2);
        return;
}

int *thr(void *i){
        sleep(1);
        printf("\t %d",*(int*)i);
}