3

Some years ago I wrote some open-source C using POSIX thread barriers, a user on OSX reported a compile failure since these were not implemented on their OS, so we collaborated and ported a primitive implementation into the code, they could then compile and run the code multithreaded.

I have occasion to to do the same thing again, on searching on the obvious terms (posix barrier osx missing and the like) I find that hits tend to be earlier than 2015. So my question: Do recent verisons of OSX support barriers? If so, what's the first version that did so?

John Bollinger
  • 160,171
  • 8
  • 81
  • 157
jjg
  • 907
  • 8
  • 18
  • 1
    Your question is a good one. It's likely to get more attention with an appropriate language tag. I've added "C" based on the question text, but if you happen to actually be using C++ instead then do switch the tag. (But in that case, be aware that you can expect recommendations to use `std::thread` and friends instead of calling pthreads functions.) – John Bollinger Jun 01 '23 at 17:45
  • Instead of searching specifically for information about pthreads barrier support being *missing* on macOS, I searched more generally, using terms "macos thread barrier". I got no hits about Mac providing pthreads barriers natively, but I got some pretty recent ones about working around their absence. This is not conclusive, but it does suggest that macOS still does not provide pthread barriers. – John Bollinger Jun 02 '23 at 13:31

0 Answers0