This code works fine on linux (2.6 kernel GCC v 3.3.3):
The anticipated behavior is blocking till pthread_cond_signal() from another thread obviously.
Under FreeBSD 6.0 (gcc 3.4.4) this same code (event loop) results in non-blocking behavior.
Any ideas?
Code:
while (1) {
pthread_cond_wait(&waited_on,¬ify_mutex);
printf("%d: Sent or received timequery from client thread %d at %d.\n",getpid(),seen,time(NULL));
seen = 0;
}
The anticipated behavior is blocking till pthread_cond_signal() from another thread obviously.
Under FreeBSD 6.0 (gcc 3.4.4) this same code (event loop) results in non-blocking behavior.
Any ideas?