Re: [AD] minor fix

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


> I wonder how far it should be thread-safe. Like, should it be allowed
> that two threads draw to the screen at the same time? Should Allegro
> block one in that case? Or should all drawing functions have a return
> value telling if the target bitmap is currently locked by another
> thread? But I guess, this todo item is more for things like the string
> functions. Or maybe just specify in the docs what may be done at the
> same time from different threads, which functions are reentrant, where
> the user should do their own locking, and what should maybe only be done
> in the main thread (guess this last one isn't relevant with Allegro).

I think string, file and config functions are the most obvious choices. Blitting
and reading input should normally be done from one thread anyway. Not saying
that it shouldn't be thread-safe in those areas, just that I would fix the other
things first - assuming they need fixing at all.
Unfortunately, I don't really know how Allegro's threads are currently
distributed or managed. 
I know there was some discussion on providing an (internal) Allegro-specific
thread API, but I don't remember if any conclusions about what it should look
like were reached at that time?

> I wonder how far the state of this is. I remember some report that
> Allegro works on 64-bit platforms with only some minor problems..

In native 64 bit mode too, or just in 32 bit compatibility mode?
I guess we can't switch to C99's int32 etc. types, but sometimes I do think
using those would be a good idea...

> > - memory leaks in ljoy.c (search for malloc)
> 
> That should be checked.

Which reminds me I still need to look at the answer I got about that patch on
the SF tracker.

> > - play nice with WindowMaker (there's no appicon, for one)
> > - ufixicon (generate src file that when linked, automatically sets icon)
> 
> I guess, your latest patch takes care of those two.

I'm not completely sure about the first, because I'm not sure if Allegro is
playing not nice with WindowMaker in some other way.

> Yeah, I agree. I attached a patch how I think the TODO could be updated
> right now, given my comments above. Things like removing dga_mouse would
> need to be done first of course.

Looks good. :) One note though:
+- Speed up the X11 driver, so it is comparable to SDL in performance.
should go under X11 todos (it is under Unix todos currently).

Evert




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