From 8f12e060ce2a47f92b47d197f8daf7c094277bf3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 12 Mar 2011 08:51:11 +0000 Subject: inet_diag: do not set unblocking function netlink is fast and predictable in response times, so permitting interrupts would just complicate things and lead to errors. --- ext/raindrops/linux_inet_diag.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ext/raindrops/linux_inet_diag.c b/ext/raindrops/linux_inet_diag.c index eb0fa48..160f90b 100644 --- a/ext/raindrops/linux_inet_diag.c +++ b/ext/raindrops/linux_inet_diag.c @@ -14,7 +14,6 @@ /* partial emulation of the 1.9 rb_thread_blocking_region under 1.8 */ #ifndef HAVE_RB_THREAD_BLOCKING_REGION # include -# define RUBY_UBF_IO ((rb_unblock_function_t *)-1) typedef void rb_unblock_function_t(void *); typedef VALUE rb_blocking_function_t(void *); static VALUE @@ -420,7 +419,7 @@ static VALUE tcp_stats(struct nogvl_args *args, VALUE addr) gen_bytecode(&args->iov[2], &query_addr); memset(&args->stats, 0, sizeof(struct listen_stats)); - nl_errcheck(rb_thread_blocking_region(diag, args, RUBY_UBF_IO, 0)); + nl_errcheck(rb_thread_blocking_region(diag, args, 0, 0)); return rb_listen_stats(&args->stats); } @@ -508,7 +507,7 @@ static VALUE all_tcp_listener_stats(VALUE obj) args.table = st_init_strtable(); gen_bytecode_all(&args.iov[2], AF_INET); - nl_errcheck(rb_thread_blocking_region(diag, &args, RUBY_UBF_IO, 0)); + nl_errcheck(rb_thread_blocking_region(diag, &args, NULL, 0)); rv = rb_hash_new(); st_foreach(args.table, st_to_hash, rv); st_free_table(args.table); -- cgit v1.2.3-24-ge0c7