diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-03-12 08:51:11 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-03-12 08:51:11 +0000 |
commit | 8f12e060ce2a47f92b47d197f8daf7c094277bf3 (patch) | |
tree | 8f071bdd932205ed563e7b01601842d63c9f8bb4 | |
parent | 3a2fe1f1330899c42deb5e714db1d5799e50a292 (diff) | |
download | raindrops-8f12e060ce2a47f92b47d197f8daf7c094277bf3.tar.gz |
netlink is fast and predictable in response times, so permitting interrupts would just complicate things and lead to errors.
-rw-r--r-- | ext/raindrops/linux_inet_diag.c | 5 |
1 files 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 <rubysig.h> -# 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); |