Re: [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows

2014-05-07 Thread Stanislav Vorobiov
Hi, Yes it's probably the cause, thanks. On 05/07/2014 12:49 PM, Alex Bligh wrote: > > On 7 May 2014, at 09:36, Stanislav Vorobiov wrote: > >> Hi, >> >> Hm, but (int)res expression is not unsigned, it's signed. I've also had this >> warning, >> but with this expression: (res < WAIT_OBJECT_0),

Re: [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows

2014-05-07 Thread Alex Bligh
On 7 May 2014, at 09:36, Stanislav Vorobiov wrote: > Hi, > > Hm, but (int)res expression is not unsigned, it's signed. I've also had this > warning, > but with this expression: (res < WAIT_OBJECT_0), that's why I put (int) > there. Could it be that > for some reason your compiler treats "int"

Re: [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows

2014-05-07 Thread Stanislav Vorobiov
Hi, Hm, but (int)res expression is not unsigned, it's signed. I've also had this warning, but with this expression: (res < WAIT_OBJECT_0), that's why I put (int) there. Could it be that for some reason your compiler treats "int" and "unsigned int", that would be really strange though... On 05/

Re: [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows

2014-05-07 Thread Stefan Hajnoczi
On Fri, Apr 18, 2014 at 08:24:03PM +0400, Stanislav Vorobiov wrote: Please fix the following compiler warning with gcc 4.8.2: > +} else if ((res == WAIT_TIMEOUT) || (res == WAIT_IO_COMPLETION) || > + ((int)res < WAIT_OBJECT_0) || > + (res >= (WAIT_OBJEC

Re: [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows

2014-05-06 Thread Stefan Weil
Am 06.05.2014 17:49, schrieb Alex Bligh: > > On 6 May 2014, at 13:38, Paolo Bonzini wrote: > >> Il 06/05/2014 14:23, Stefan Hajnoczi ha scritto: > Signed-off-by: Stanislav Vorobiov > --- > include/glib-compat.h | 19 + > include/qemu-common.h | 12 -- > util/

Re: [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows

2014-05-06 Thread Alex Bligh
On 6 May 2014, at 13:38, Paolo Bonzini wrote: > Il 06/05/2014 14:23, Stefan Hajnoczi ha scritto: >>> > Signed-off-by: Stanislav Vorobiov >>> > --- >>> > include/glib-compat.h | 19 + >>> > include/qemu-common.h | 12 -- >>> > util/oslib-win32.c| 112 >>> > +

Re: [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows

2014-05-06 Thread Paolo Bonzini
Il 06/05/2014 14:23, Stefan Hajnoczi ha scritto: > Signed-off-by: Stanislav Vorobiov > --- > include/glib-compat.h | 19 + > include/qemu-common.h | 12 -- > util/oslib-win32.c| 112 + > 3 files changed, 131 insertions(+), 12

Re: [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows

2014-05-06 Thread Stefan Hajnoczi
On Fri, Apr 18, 2014 at 08:24:03PM +0400, Stanislav Vorobiov wrote: > From: Sangho Park > > g_poll has a problem on Windows when using > timeouts < 10ms, in glib/gpoll.c: > > /* If not, and we have a significant timeout, poll again with > * timeout then. Note that this will return indication fo

Re: [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows

2014-04-28 Thread Paolo Bonzini
Il 22/04/2014 11:41, Stanislav Vorobiov ha scritto: >m.b. it makes sense to move entire qemu_poll_ns to oslib then ? like >this patch to oslib-win32.c and the rest of the stuff to oslib-posix.c ? But Stefan proposed to make it this way (which is also reasonable, since we replace buggy g_poll wit

Re: [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows

2014-04-22 Thread Stanislav Vorobiov
Hi, see below On 04/22/2014 01:21 PM, Alex Bligh wrote: > > On 22 Apr 2014, at 10:03, Stanislav Vorobiov wrote: > >>> + */ >>> +#define g_poll(fds, nfds, timeout) g_poll_fixed(fds, nfds, timeout) >>> +gint g_poll_fixed(GPollFD *fds, guint nfds, gint timeout); > > I can't comment on the Windows

Re: [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows

2014-04-22 Thread Alex Bligh
On 22 Apr 2014, at 10:03, Stanislav Vorobiov wrote: >> + */ >> +#define g_poll(fds, nfds, timeout) g_poll_fixed(fds, nfds, timeout) >> +gint g_poll_fixed(GPollFD *fds, guint nfds, gint timeout); I can't comment on the Windows specific bits of this patch (though I have commented on what needs fix

Re: [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows

2014-04-22 Thread Stanislav Vorobiov
Hi everyone, Any comments on this v3 patch ? On 04/18/2014 08:24 PM, Stanislav Vorobiov wrote: > From: Sangho Park > > g_poll has a problem on Windows when using > timeouts < 10ms, in glib/gpoll.c: > > /* If not, and we have a significant timeout, poll again with > * timeout then. Note that t

[Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows

2014-04-18 Thread Stanislav Vorobiov
From: Sangho Park g_poll has a problem on Windows when using timeouts < 10ms, in glib/gpoll.c: /* If not, and we have a significant timeout, poll again with * timeout then. Note that this will return indication for only * one event, or only for messages. We ignore timeouts less than * ten mil