Re: [AD] Bug in MMX linear_clear_to_color8 with asynchronous usage |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> To me it is a 'bit' unclear if that retriction is applied to interrupts or
> just djgpp interrupts.
Allegro provides its own IRQ code, which has the big advantage that the
interrupts are reentrants. The restriction applies to this code.
> In fact, it is applied to djgpp or every system? Since right now I am
> clueless :)
Here are the two complete relevant paragraphes:
"Under DOS it will constantly reprogram the clock to make sure they are all
called at the correct times. Because they alter the low level timer chip
settings, these routines should not be used together with other DOS timer
functions like the djgpp uclock() routine. Moreover, the FPU state is not
preserved across Allegro interrupts so you ought not to use floating point
or MMX code inside timer interrupt handlers.
Under other platforms, they are usually implemented using threads, which run
parallel to the main thread. Therefore timer callbacks on such platforms
will not block the main thread when called, so you may need to use
appropriate synchronisation devices (eg. mutexes, semaphores, etc.) when
accessing data that is shared by a callback and the main thread. (Currently
Allegro does not provide such devices.)"
--
Eric Botcazou