From 58b325366dbc5c84be12fb336ee5e68f208d9365 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 12 Feb 2011 05:44:23 +0000 Subject: * thread.c (rb_thread_io_blocking_region): new function to run blocking region with GIL released, for fd. * thread.c (rb_thread_fd_close): implement. [ruby-core:35203] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/socket/unixsocket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/socket/unixsocket.c') diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c index 25a2c1e331..5a8641acc2 100644 --- a/ext/socket/unixsocket.c +++ b/ext/socket/unixsocket.c @@ -249,7 +249,7 @@ unix_send_io(VALUE sock, VALUE val) arg.fd = fptr->fd; rb_thread_fd_writable(arg.fd); - if ((int)BLOCKING_REGION(sendmsg_blocking, &arg) == -1) + if ((int)BLOCKING_REGION_FD(sendmsg_blocking, &arg) == -1) rb_sys_fail("sendmsg(2)"); return Qnil; @@ -335,7 +335,7 @@ unix_recv_io(int argc, VALUE *argv, VALUE sock) arg.fd = fptr->fd; rb_thread_wait_fd(arg.fd); - if ((int)BLOCKING_REGION(recvmsg_blocking, &arg) == -1) + if ((int)BLOCKING_REGION_FD(recvmsg_blocking, &arg) == -1) rb_sys_fail("recvmsg(2)"); #if FD_PASSING_BY_MSG_CONTROL -- cgit v1.2.3