Displaying 2 results from an estimated 2 matches for "watch_count".
Did you mean:
match_count
2009 Mar 18
3
[LLVMdev] Status of LLVM's atomic intrinsics
...//free(data);
//if (!__sync_bool_compare_and_swap(&count, oldval, newval))
/* Do some "work" so threads can alternate on mutex lock */
//fflush(stdout);
//usleep(1);
}
printf("inc_count(): thread %ld exit\n", my_id);
pthread_exit(NULL);
}
void *watch_count(void *t)
{
long my_id = (long)t;
printf("Starting watch_count(): thread %ld\n", my_id);
/*
Lock mutex and wait for signal. Note that the pthread_cond_wait
routine will automatically and atomically unlock mutex while it waits.
Also, note that if COUNT_LIMIT is reached bef...
2009 Mar 18
0
[LLVMdev] Status of LLVM's atomic intrinsics
...and_swap(&count, oldval, newval))
>
> /* Do some "work" so threads can alternate on mutex lock */
> //fflush(stdout);
> //usleep(1);
> }
> printf("inc_count(): thread %ld exit\n", my_id);
> pthread_exit(NULL);
> }
>
> void *watch_count(void *t)
> {
> long my_id = (long)t;
>
> printf("Starting watch_count(): thread %ld\n", my_id);
>
> /*
> Lock mutex and wait for signal. Note that the pthread_cond_wait
> routine will automatically and atomically unlock mutex while it waits.
>...