Re: [AD] (still) a race condition in mixer.c |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> Instead of patching mixer.c, what about creating wrappers (in a
> platform-specific file, say src/unix/upmixer.c) around the relevant
> _mixer_* functions which do the synchronisation as required, then making
> uoss.c, etc. refer to the wrappers if the pthreads are used?
I guess that if there is a race condition on Linux, there is probably the
same race condition on any multitasking OSes. So why not use the dormant
synchronization API (i.e re-enable ALLEGRO_MULTITHREADED in the various
configuration files and convert Sam's code to use this API)?
Are you sure that this synchronization won't open the same can of worms that
the timer synchronization did?
--
Eric Botcazou