* however have to deal with this cleanly, so we try to detect the
* forks making sure all our calls fail cleanly after the fork. */
- pa_assert(sizeof(pa_atomic_t) >= sizeof(pid_t));
+ pa_assert_cc(sizeof(pa_atomic_t) >= sizeof(pid_t));
for (;;) {
pid_t stored_pid = (pid_t) pa_atomic_load(&pid);
/* First let's check whether the current pid matches the stored one */
if (stored_pid == getpid())
- return FALSE;
+ return false;
/* Does it contain a different PID than ours? Then the process got forked. */
if ((int) stored_pid != (int) -1)
- return TRUE;
+ return true;
/* Ok, it still contains no PID, then store it */
if (pa_atomic_cmpxchg(&pid, (int) -1, (int) getpid()))
- return FALSE;
+ return false;
}
}