Implementing pthread barrier for Mac OS/X
No problems found
As they say, &quot;no news is good news&quot;.  I read your code all the way through with an eye towards finding any possible errors, but I didn't find anything to criticize.
Instead I'll point out the things I liked about your code.
Use of restrict keyword
I must admit, I don't use restrict but I should learn to, as it can only help the compiler.  I already advocate using const when appropriate, and this is similar.
Proper error checking
You check for errors and set errno appropriately.
Correct barrier operation
I tried to find any concurrency flaw in your barrier wait function but it looked correct.
The one weird thing
The one thing I thought was strange was that you used a do {} while loop without the curly braces:
    do
        pthread_cond_wait(&amp;barrier-&gt;cond, &amp;barrier-&gt;mutex);
    while (phase == barrier-&gt;phase);

I've never seen that before but I guess if you like to do that it's fine.  I think people throw in the curlies because it doesn't waste any lines, whereas with a while loop or an if block it would add an extra line:
    while (condition) {
        foo();
    }                       // &lt;-- Wasted line

    do {
        foo();
    } while (condition);    // &lt;-- No waste