ext/kgio/accept.c in kgio-2.9.1 vs ext/kgio/accept.c in kgio-2.9.2
- old
+ new
@@ -11,11 +11,11 @@
static VALUE cClientSocket;
static VALUE cKgio_Socket;
static VALUE mSocketMethods;
static VALUE iv_kgio_addr;
-#if defined(__linux__) && defined(KGIO_HAVE_THREAD_CALL_WITHOUT_GVL)
+#if defined(__linux__) && defined(KGIO_WITHOUT_GVL)
static int accept4_flags = SOCK_CLOEXEC;
#else /* ! linux */
static int accept4_flags = SOCK_CLOEXEC | SOCK_NONBLOCK;
#endif /* ! linux */
@@ -77,21 +77,21 @@
}
return (VALUE)rv;
}
-#ifdef KGIO_HAVE_THREAD_CALL_WITHOUT_GVL
+#ifdef KGIO_WITHOUT_GVL
# include <time.h>
# include "blocking_io_region.h"
static int thread_accept(struct accept_args *a, int force_nonblock)
{
if (force_nonblock)
set_nonblocking(a->fd);
return (int)rb_thread_io_blocking_region(xaccept, a, a->fd);
}
-#else /* ! KGIO_HAVE_THREAD_CALL_WITHOUT_GVL */
+#else /* ! KGIO_WITHOUT_GVL */
# include <rubysig.h>
static int thread_accept(struct accept_args *a, int force_nonblock)
{
int rv;
@@ -104,10 +104,10 @@
TRAP_BEG;
rv = (int)xaccept(a);
TRAP_END;
return rv;
}
-#endif /* ! KGIO_HAVE_THREAD_CALL_WITHOUT_GVL */
+#endif /* ! KGIO_WITHOUT_GVL */
static void
prepare_accept(struct accept_args *a, VALUE self, int argc, const VALUE *argv)
{
a->fd = my_fileno(self);