Svante Signell, le Wed 12 Dec 2012 20:11:55 +0100, a écrit : > --- hurdselect_orig.c 2012-10-21 22:55:26.000000000 +0200 > +++ hurdselect_step1.c 2012-12-12 19:29:26.000000000 +0100 > @@ -37,6 +37,13 @@ > each of READFDS, WRITEFDS, EXCEPTFDS that is nonnull. If TIMEOUT is not > NULL, time out after waiting the interval specified therein. Returns > the number of ready descriptors, or -1 for errors. */ > + > +enum { > + DELAY = -1, > + SELECT = 0, > + POLL = 1 > +} ispoll;
Urgl, a global variable?! (and world-visible!!) That won't ever work with threads. Make it a variable local to the function. > + /* FIXME: sigmask is only used for ppoll and pselect: not yet implemented > */ What do you mean by not yet implemented? > + /* FIXME: Only for ppoll */ > if (sigmask) > __sigprocmask (SIG_SETMASK, &oset, NULL); Well, poll provides sigmask==NULL, so I don't think there's anything to fix here. > + /* FIXME: Only for pselect */ > if (sigmask) > __sigprocmask (SIG_SETMASK, &oset, NULL); Ditto. > @@ -284,7 +614,7 @@ _hurd_select (int nfds, > /* Bogus answer; treat like an error, as a fake positive. */ > type = SELECT_ALL; > > - /* This port is already ready already. */ > + /* This port is already ready already. */ Please avoid such spurious whitespace change. I haven't (yet) read the rest of the details. Samuel