Re: [AD] Allegro on multi-processor machines

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> I had problems on my workstation (dual-xeon linux 2.4.9 ancient SMP
> kernel) running allegro programs. I'm not sure anymore, but I believe
> the problem is thread-safety and was solved if I build the library
> with pthreads disabled. Can you verify if that works for you too?

Confirmed. If I disable pthreads and recompile, Allegro programs run fine here.
Which is ironic, because the sigalrm version doesn't work at all for me at home.

> That doesn't really solve the problem of course, but it may give a
> hint as to what is going wrong exactly.

I think the problem is that Allegro is not using proper mutex locks. What I
don't understand is why this problem doesn't seem to show up on single processor
machines.
Also, can someone please explain again why with the following definitions

   #define XLOCK()                              \
      do {                                      \
         _xwin.lock_count++;                    \
      } while (0)

   #define XUNLOCK()                            \
      do {                                      \
         if (_xwin.lock_count == 1) {           \
            while(_xwin_missed_input) {         \
               if (_xwin_input_handler)         \
                  _xwin_input_handler();        \
               else                             \
                  _xwin_private_handle_input(); \
               --_xwin_missed_input;            \
            }                                   \
         }                                      \
         _xwin.lock_count--;                    \
      } while (0)

XLOCK() and XUNLOCK() don't block indefinatebly?

Evert




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/