[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Fpoll() in GEM programs



On Wednesday 27 October 2004 19:53, Olivier Landemarre wrote:

> If I understand it's only to know if there is already a message in
> queue? Because I not see any other type of event able to be manage like
> this (how AES can know for example that you wan't to wait for a click
> button?). So if it's for this, there is already a way to do this since
> AES 4.0, just replace evnt_message() by
> appl_read(-1,16,message) it will return immediatly with 0 if no message
> is waiting.
> Notice you can do an event_multi with timer 0 (not recommand), but it
> will be probably slower, but for this XAAES is very fast
>

A good AES application should have only 1 waiting point,
which is its central evnt_multi.

My suggestion would be another event bit: MU_SELECT
and a direct response mode bit: MU_DIRECT_RESPONSE.
if the bit is set and there are no events, evnt_multi exits with
zero event. !!! Unless a timer event is set, in which case the app
is suspended until any event occurs (including of course timer).

With MU_SELECT you have a way of getting filehandle or socket events
the AES way.

Now there might be problems with space in the evnt_multi
parameter list. Perhaps a displacer pointer could be used
when any of MU_SELECT or newer is specified.
Programs that use such newer events are naturally aware.

Such a pointer would displace existing event data and make room
for data for new events. A good choice is displacing the timer 
event data. If I remember well Fselect has a timer option as well.

Just a suggestion, hope I did understand what it was about.


-- 
Groeten; Regards.
Henk Robbers.    mailto:h.robbers@chello.nl
                   http://members.ams.chello.nl/h.robbers/Home.html
Interactive disassembler:     TT-Digger;  http://digger.atari.org
A Home Cooked teXt editor:    AHCX