summaryrefslogtreecommitdiff
path: root/ext/socket/ancdata.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/ancdata.c')
-rw-r--r--ext/socket/ancdata.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index 52f92a1..5af090c 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -1110,11 +1110,11 @@ struct sendmsg_args_struct {
int flags;
};
-static VALUE
+static void *
nogvl_sendmsg_func(void *ptr)
{
struct sendmsg_args_struct *args = ptr;
- return sendmsg(args->fd, args->msg, args->flags);
+ return (void *)sendmsg(args->fd, args->msg, args->flags);
}
static ssize_t
@@ -1124,7 +1124,7 @@ rb_sendmsg(int fd, const struct msghdr *msg, int flags)
args.fd = fd;
args.msg = msg;
args.flags = flags;
- return rb_thread_blocking_region(nogvl_sendmsg_func, &args, RUBY_UBF_IO, 0);
+ return (ssize_t)rb_thread_call_without_gvl(nogvl_sendmsg_func, &args, RUBY_UBF_IO, 0);
}
static VALUE
@@ -1368,12 +1368,12 @@ rsock_recvmsg(int socket, struct msghdr *message, int flags)
return recvmsg(socket, message, flags);
}
-static VALUE
+static void *
nogvl_recvmsg_func(void *ptr)
{
struct recvmsg_args_struct *args = ptr;
int flags = args->flags;
- return rsock_recvmsg(args->fd, args->msg, flags);
+ return (void *)rsock_recvmsg(args->fd, args->msg, flags);
}
static ssize_t
@@ -1383,7 +1383,7 @@ rb_recvmsg(int fd, struct msghdr *msg, int flags)
args.fd = fd;
args.msg = msg;
args.flags = flags;
- return rb_thread_blocking_region(nogvl_recvmsg_func, &args, RUBY_UBF_IO, 0);
+ return (ssize_t)rb_thread_call_without_gvl(nogvl_recvmsg_func, &args, RUBY_UBF_IO, 0);
}
#if defined(HAVE_ST_MSG_CONTROL)