Problem with generic cond, sem and mutex

Hello,
I now know why threads tests programs do not work on Atari:

  • in SDL_ThreadsInit, there is a call to SDL_CreateMutex
  • SDL_CreateMutex (generic) calls SDL_CreateSemaphore
  • SDL_CreateSemaphore (generic) calls SDL_CreateMutex
    and SDL_CreateCond
  • SDL_CreateMutex (generic) calls SDL_CreateSemaphore
    -> recursive call
  • SDL_CreateCond (generic) calls SDL_CreateMutex and
    SDL_CreateSemaphore -> recursive call

So I have a recursive dead end, that lasts till I do not have any memory
left. The Irix port is the other one who uses the generic implementation,
so I suppose it works, or it has not been tested ? Can I avoid this
dead-end ?–
Patrice Mandin
WWW: http://membres.lycos.fr/pmandin/
Programmeur Linux, Atari
Sp?cialit?: D?veloppement, jeux

Hello,
I now know why threads tests programs do not work on Atari:

  • in SDL_ThreadsInit, there is a call to SDL_CreateMutex
  • SDL_CreateMutex (generic) calls SDL_CreateSemaphore
  • SDL_CreateSemaphore (generic) calls SDL_CreateMutex
    and SDL_CreateCond
  • SDL_CreateMutex (generic) calls SDL_CreateSemaphore
    -> recursive call
  • SDL_CreateCond (generic) calls SDL_CreateMutex and
    SDL_CreateSemaphore -> recursive call

So I have a recursive dead end, that lasts till I do not have any memory
left. The Irix port is the other one who uses the generic implementation,
so I suppose it works, or it has not been tested ? Can I avoid this
dead-end ?

One or more of those generic calls need to resolve into system-dependent
code. Either you need a native semaphore, or you need a native mutex and
condition variable, to get all the SDL locking functionality.

If you look at the files that are copied in configure.in, you’ll see
what various platforms do.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment