On Donnerstag 16 Juni 2005 06:48, Oliver Endriss wrote: > Looks ok if OSDSetBlock is _never_ used by more than one thread at the > same time. Otherwise, some race conditions might occur. > > Anyway, as the OSD interface has state variables like av7110->osdwin > it is not thread-safe 'by design'. would something like this help: have the first LoadBitmap return a uint identifier which must then be used by following LoadBitmap/BlitBitmap calls and the terminating ReleaseBitmap? Calls with a wrong identifier would be rejected with something like -EAGAIN -- Wolfgang