Wolfgang Rohdewald wrote: > On Mittwoch 08 Juni 2005 11:56, Dr. Werner Fink wrote: > > > My idea would be: on entry of OSDSetBlock: if there is a current transfer, > > > wait for it to finish, call ReleaseBitmap and start all over. > > > > This does not work. The OSD commands are queued by the > > firmware upto the point where the data load is done. > > so ReleaseBitmap triggers the data load from the queue to > the OSD image? Can I download a description of the firmware > API somewhere? Afaik there is no API spec. > would this be better: > > remember how much has been done: add a counter to struct av7110 > which is incremented in relevant places like in LoadBitmap, > BlitBitmap, SetFont, FlushText, WriteText etc. On next try, > dry-run these places (i.e. do not pass anything to the firmware) > until the counter is reached. This mechanism could be used by > OSD_Setblock, OSD_Text and others. > > in case of a result other than -ERESTARTSYS (success, timeout, > other errors) the counter would be reset to 0. > > or could there be a simpler solution? Introducing another state variable would make the code even more complicatated and harder to debug. If you add a counter you have to make sure that the right ioctl will be continued. I wonder whether this scenario may happen: - task A issues SetBlock ioctl (1) which is interrupted (-ERESTARTSYS) - task B isues a different SetBlock ioctl at the same time (2) You have to make sure that (1) is resumed, not (2). Oliver -- -------------------------------------------------------- VDR Remote Plugin available at http://www.escape-edv.de/endriss/vdr/ --------------------------------------------------------