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

[MiNT] Fpoll() in GEM programs (was: Re: Wheel support in XaAES)



Hi!
Since we wanna add fselect()/fpoll() functionality via evnt_multi() perhaps an extended version of evnt_mult() is in place?

I think I find a better way then the one with extending AES... We can create AES event_multi pipe (e.g. U:\pipe\$PID\event_multi) for each GEM application in XaAES so that the only thing the application needs to use is the Fpoll() to detect activity. Piece of pseudo code to explain:
# main application loop
while(1) {
  # wait for an event on several filedescriptors
Fpoll( /pipe/$PID/event_multi, /pipe/fsel, /pipe/xxx );
  # take an action according to the type of event
  switch ( which_pipe ) {
      case event_multi:
         use event_multi() as in every other GEM app.
      case fsel:
         handle pipe comunication
      case xxx:
         ...
  }
} This seems to me a better way to get the GEM applications capable of using UNIX sockets and other things without being forced to create separate child processes mainly because it would be backward compatible in terms of AES API. Opinions?
STanda