From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS47066 71.19.144.0/20 X-Spam-Status: No, score=-1.9 required=3.0 tests=AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: normalperson@yhbt.net Received: from zedshaw2.xen.prgmr.com (zedshaw2.xen.prgmr.com [71.19.156.177]) by dcvr.yhbt.net (Postfix) with ESMTP id 8A3211F6BD for ; Tue, 30 Apr 2013 02:40:19 +0000 (UTC) Received: from zedshaw2.xen.prgmr.com (unknown [IPv6:::1]) by zedshaw2.xen.prgmr.com (Postfix) with ESMTP id 084E373E06 for ; Tue, 30 Apr 2013 02:42:17 +0000 (UTC) MIME-Version: 1.0 Date: Tue, 30 Apr 2013 02:39:25 +0000 From: Eric Wong In-Reply-To: <1367289582-31293-1-git-send-email-normalperson@yhbt.net> List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Message-Id: <1367289582-31293-1-git-send-email-normalperson@yhbt.net> Precedence: list References: <1367289582-31293-1-git-send-email-normalperson@yhbt.net> Sender: sleepy.penguin@librelist.org Subject: [sleepy.penguin] [PATCH 0/17] kqueue and epoll fixes To: sleepy.penguin@librelist.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I'm slowly fleshing out kqueue support and also fixing some timing-related bugs in the test suite. kqueue support is tested on FreeBSD 9.1 The kqueue code should also be compatible with Rubinius, (tested against the stable libkqueue branch under Linux) (diffstat against "master") ext/sleepy_penguin/epoll.c | 15 +- ext/sleepy_penguin/extconf.rb | 6 +- ext/sleepy_penguin/init.c | 11 + ext/sleepy_penguin/kqueue.c | 643 ++++++++++++++++++++++++++++++++++++ ext/sleepy_penguin/sleepy_penguin.h | 12 + ext/sleepy_penguin/value2timespec.h | 2 +- lib/sleepy_penguin.rb | 1 - lib/sleepy_penguin/epoll.rb | 53 +-- lib/sleepy_penguin/kevent.rb | 3 + lib/sleepy_penguin/kqueue.rb | 115 +++++++ lib/sleepy_penguin/kqueue/io.rb | 30 ++ pkg.mk | 2 +- test/test_epoll.rb | 89 +++-- test/test_epoll_io.rb | 3 +- test/test_epoll_optimizations.rb | 1 - test/test_inotify.rb | 2 +- test/test_kqueue.rb | 75 +++++ test/test_kqueue_io.rb | 107 ++++++ test/test_timerfd.rb | 4 +- 19 files changed, 1078 insertions(+), 96 deletions(-) Eric Wong (17): test_epoll: remove assert_nothing_raised test: remove Rubinius-specific checks and skips test_epoll: avoid sleeping inside a signal handler fork-safe "to_io" in high-level epoll/kqueue test_kqueue: join thread after test test_kqueue_io: test for multiple event return test_timerfd: relax timing-sensitive test kqueue: set zero timeout if not retrieving events test_epoll: workaround MRI 1.8 threading bug test_kqueue_io: join thread in test when done using test_kqueue: only test if IO#autoclose= exists kqueue/io: fix MRI 1.8 support code for event retrieval kqueue: workaround lack of RSTRUCT* macros on Rubinius test_epoll: join thread before return from test test_epoll: increase delay between signal spamming epoll: clear FD marks snapshot before returning test_epoll: workaround race condition in test_close