summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-06-19 13:47:16 +1200
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-06-22 22:48:57 +1200
commit45e65f302b663b2c6ab69df06d3b6f219c1797b2 (patch)
treeadf0ed3b3b9c92626f2c21a320ecdf66998b4c27 /thread.c
parent3deb5d7113e1fd6e4b468e09464d524d390d811e (diff)
Deprecate and rework old (fd) centric functions.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4592
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/thread.c b/thread.c
index 1511977d4d..ed771166e6 100644
--- a/thread.c
+++ b/thread.c
@@ -4296,39 +4296,6 @@ do_select(VALUE p)
return (VALUE)result;
}
-static void
-rb_thread_wait_fd_rw(int fd, int read)
-{
- int result = 0;
- int events = read ? RB_WAITFD_IN : RB_WAITFD_OUT;
-
- thread_debug("rb_thread_wait_fd_rw(%d, %s)\n", fd, read ? "read" : "write");
-
- if (fd < 0) {
- rb_raise(rb_eIOError, "closed stream");
- }
-
- result = rb_wait_for_single_fd(fd, events, NULL);
- if (result < 0) {
- rb_sys_fail(0);
- }
-
- thread_debug("rb_thread_wait_fd_rw(%d, %s): done\n", fd, read ? "read" : "write");
-}
-
-void
-rb_thread_wait_fd(int fd)
-{
- rb_thread_wait_fd_rw(fd, 1);
-}
-
-int
-rb_thread_fd_writable(int fd)
-{
- rb_thread_wait_fd_rw(fd, 0);
- return TRUE;
-}
-
static rb_fdset_t *
init_set_fd(int fd, rb_fdset_t *fds)
{