[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] [bug] async signal queue can miss events
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] [bug] async signal queue can miss events |
Date: |
Wed, 29 Aug 2012 13:06:30 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 |
Il 28/08/2012 23:10, Holger Hans Peter Freyther ha scritto:
> Issue status update for http://smalltalk.gnu.org/project/issue/651
> Post a follow up: http://smalltalk.gnu.org/project/comments/add/651
>
> Project: GNU Smalltalk
> Version: <none>
> Component: VM
> Category: bug reports
> Priority: normal
> Assigned to: Unassigned
> Reported by: zecke
> Updated by: zecke
> Status: active
>
> The 23:00 analysis... and hypothesis...
>
> _gst_async_file_polling
> 1.) check for polling...
> 2.) new data arrives
> 3.) re-alloc
> 4.) set_filter_interrupt...
>
> It has been some time bit SIGIO/fasync is just edge triggered? isn't it?
Yes. Does this fix it?
diff --git a/libgst/sysdep/posix/events.c b/libgst/sysdep/posix/events.c
index da3a784..8c864ec 100644
--- a/libgst/sysdep/posix/events.c
+++ b/libgst/sysdep/posix/events.c
@@ -395,6 +395,8 @@ _gst_async_file_polling (int fd,
polling_queue *new;
index = num_used_pollfds++;
+ set_file_interrupt (fd, file_polling_handler);
+
result = _gst_sync_file_polling (fd, cond);
if (result != 0)
{
@@ -431,8 +433,6 @@ _gst_async_file_polling (int fd,
}
pollfds[index].revents = 0;
- set_file_interrupt (fd, file_polling_handler);
-
/* Even if I/O was made possible while setting up our machinery,
the list will only be walked before the next bytecode, so there
is no race. We incremented num_used_pollfds very early so that
Paolo