Re: [PATCH,HURD] hurdselect: Step1, code split preparations

2013-01-24 Thread Richard Braun
On Tue, Jan 22, 2013 at 09:15:06PM +0100, Pino Toscano wrote: > Actually, from my reading the poll documentation (unlike the select one) > does not say what to do when nfds=0; on Linux, the timeout seems ignored > and 0 is returned right away, with no delay. On my system (Debian squeeze), poll a

Re: [PATCH,HURD] hurdselect: Step1, code split preparations (version 3)

2013-01-24 Thread Richard Braun
On Thu, Jan 24, 2013 at 12:10:05PM +0100, Svante Signell wrote: > Introduced another helper function: _io_select_request() > The patch does the following: > 1) Create another helper function: _io_select_request() (good enough name?) > 2) Sets got to -1 in case of errors and always return got in bot

Re: [PATCH,HURD] hurdselect: Step1, code split preparations (version 3)

2013-01-24 Thread Svante Signell
On Wed, 2013-01-23 at 17:52 +0100, Svante Signell wrote: > On Wed, 2013-01-23 at 00:52 +0100, Samuel Thibault wrote: > > Svante Signell, le Tue 22 Jan 2013 20:53:06 +0100, a écrit : > Since there was a lot of concerns about code duplication I introduced a > helper function _wait_for_replies(), spl

Re: [PATCH,HURD] hurdselect: Step1, code split preparations

2013-01-23 Thread Svante Signell
On Wed, 2013-01-23 at 00:52 +0100, Samuel Thibault wrote: > Svante Signell, le Tue 22 Jan 2013 20:53:06 +0100, a écrit : > > Updated patch attached (not reindented). Shall I continue sending > > patches or not? > > Well, this one doesn't actually do much, so we need to see the others to > be able

Re: [PATCH,HURD] hurdselect: Step1, code split preparations

2013-01-22 Thread Samuel Thibault
Svante Signell, le Tue 22 Jan 2013 20:53:06 +0100, a écrit : > Updated patch attached (not reindented). Shall I continue sending > patches or not? Well, this one doesn't actually do much, so we need to see the others to be able to say anything. > And what about submitting to debian-hurd instead o

Re: [PATCH,HURD] hurdselect: Step1, code split preparations

2013-01-22 Thread Svante Signell
On Tue, 2013-01-22 at 20:37 +0100, Svante Signell wrote: > On Tue, 2013-01-22 at 19:01 +0100, Samuel Thibault wrote: > > Svante Signell, le Tue 22 Jan 2013 18:53:43 +0100, a écrit : > > > Attached is the first patch for a 3-way split of hurdselect.c into three > > > cases: DELAY, POLL, SELECT leadi

Re: [PATCH,HURD] hurdselect: Step1, code split preparations

2013-01-22 Thread Pino Toscano
Alle martedì 22 gennaio 2013, Svante Signell ha scritto: > On Tue, 2013-01-22 at 19:15 +0100, Pino Toscano wrote: > > Alle martedì 22 gennaio 2013, Svante Signell ha scritto: > > > Attached is the first patch for a 3-way split of hurdselect.c > > > into three cases: DELAY, POLL, SELECT > > > > Wha

Re: [PATCH,HURD] hurdselect: Step1, code split preparations

2013-01-22 Thread Richard Braun
On Tue, Jan 22, 2013 at 08:40:11PM +0100, Svante Signell wrote: > > theorically, poll could be fixed also without restructing hurdselect... > > We have discussed this issue before. Let's see what others say. Minimizing the amount of code change looks better to me. We could however isolate the res

Re: [PATCH,HURD] hurdselect: Step1, code split preparations

2013-01-22 Thread Svante Signell
On Tue, 2013-01-22 at 19:01 +0100, Samuel Thibault wrote: > Svante Signell, le Tue 22 Jan 2013 18:53:43 +0100, a écrit : > > Attached is the first patch for a 3-way split of hurdselect.c into three > > cases: DELAY, POLL, SELECT leading to a more POSIX conforming POLL. > > It is way more readable

Re: [PATCH,HURD] hurdselect: Step1, code split preparations

2013-01-22 Thread Svante Signell
On Tue, 2013-01-22 at 19:15 +0100, Pino Toscano wrote: > Hi, > > Alle martedì 22 gennaio 2013, Svante Signell ha scritto: > > Attached is the first patch for a 3-way split of hurdselect.c into > > three cases: DELAY, POLL, SELECT > > What's the use of of the separate DELAY case? > Basically, it s

Re: [PATCH,HURD] hurdselect: Step1, code split preparations

2013-01-22 Thread Samuel Thibault
Pino Toscano, le Tue 22 Jan 2013 19:15:38 +0100, a écrit : > > Starting point is the hurdselect.c created by all Debian patches > > applied up to eglibc-2.13-38 + 3 additional patches: > > Note that if you want to send patches upstream, your code must apply > on master branch of glibc.git, not on

Re: [PATCH,HURD] hurdselect: Step1, code split preparations

2013-01-22 Thread Svante Signell
On Tue, 2013-01-22 at 19:15 +0100, Pino Toscano wrote: > Hi, > > Alle martedì 22 gennaio 2013, Svante Signell ha scritto: ... > > const int fd = (int) d[i].io_port; > > > > - if (fd < _hurd_dtablesize) > > - { > > d[i].cell = _hurd_dtable[fd]; >

Re: [PATCH,HURD] hurdselect: Step1, code split preparations

2013-01-22 Thread Pino Toscano
Hi, Alle martedì 22 gennaio 2013, Svante Signell ha scritto: > Attached is the first patch for a 3-way split of hurdselect.c into > three cases: DELAY, POLL, SELECT What's the use of of the separate DELAY case? Basically, it seems to be optimizing just a very specific case, i.e.: select(0, ...,

Re: [PATCH,HURD] hurdselect: Step1, code split preparations

2013-01-22 Thread Samuel Thibault
Svante Signell, le Tue 22 Jan 2013 18:53:43 +0100, a écrit : > Attached is the first patch for a 3-way split of hurdselect.c into three > cases: DELAY, POLL, SELECT leading to a more POSIX conforming POLL. It is way more readable that the previous versions :) > + if (nfds > _hurd_dtablesize) > +

[PATCH,HURD] hurdselect: Step1, code split preparations

2013-01-22 Thread Svante Signell
Hi, Attached is the first patch for a 3-way split of hurdselect.c into three cases: DELAY, POLL, SELECT leading to a more POSIX conforming POLL. The Hurd servers pflocal and pfinet are already prepared for this update. Starting point is the hurdselect.c created by all Debian patches applied up to