Possibly broken semaphores on OS X

Hello sdl,

Just tried latest CVS of SDL on MacOS X 10.4.5, built with gcc 4.0.1
and the 10.4u SDK. It seems that semaphores are broken, and just go
into a deadlock whenever used. My test case is SMPEG, which admittedly
is normally a b*** to make work, but nevertheless does so OK with SDL
1.2.9. The “testsem” program does work though.

Building SDL12 with ./configure --disable-pthread-sem makes SMPEG work
again.–
Best regards,
Peter mailto:@Peter_Mulholland

Hello sdl,

Just tried latest CVS of SDL on MacOS X 10.4.5, built with gcc 4.0.1
and the 10.4u SDK. It seems that semaphores are broken, and just go
into a deadlock whenever used. My test case is SMPEG, which admittedly
is normally a b*** to make work, but nevertheless does so OK with SDL
1.2.9. The “testsem” program does work though.

Building SDL12 with ./configure --disable-pthread-sem makes SMPEG work
again.

Ugh. I had hoped that we could ditch the MacOS X pthread workarounds.

Ryan, any thoughts?

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Hello sdl,

Just tried latest CVS of SDL on MacOS X 10.4.5, built with gcc 4.0.1
and the 10.4u SDK. It seems that semaphores are broken, and just go
into a deadlock whenever used. My test case is SMPEG, which admittedly
is normally a b*** to make work, but nevertheless does so OK with SDL
1.2.9. The “testsem” program does work though.
Building SDL12 with ./configure --disable-pthread-sem makes SMPEG work
again.
Ugh. I had hoped that we could ditch the MacOS X pthread workarounds.
Ryan, any thoughts?

What’s the mac pthread problem? If it’s non-posixness you can get
around some problems (for me, it was a lack of cancellation points)
by doing
#define _POSIX_C_SOURCE 1
before including pthread.hDate: Sun, 05 Mar 2006 17:25:37 -0800