io-event 0.2.6 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/IO_Event.bundle +0 -0
- data/ext/Makefile +1 -1
- data/ext/extconf.rb +1 -1
- data/ext/io/event/event.c +1 -1
- data/ext/io/event/event.h +1 -1
- data/ext/io/event/selector/epoll.c +19 -20
- data/ext/io/event/selector/kqueue.c +46 -21
- data/ext/io/event/selector/selector.h +5 -0
- data/ext/io/event/selector/uring.c +26 -21
- data/ext/kqueue.o +0 -0
- data/ext/mkmf.log +13 -13
- data/lib/io/event/selector/select.rb +32 -11
- data/lib/io/event/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 889604c87afea8f1d84e1ee40ada077792e84cfa77d074d695bf6cc1f27b69e1
|
4
|
+
data.tar.gz: c46aada520c6a8ba41918c7c3f794922befc5012fc9fe5954be6a4b15b920a20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98050d505cf276b82824ab4c4371f632609c24fa06249feffbce10eeb8a3d8f45760c4472d4046b473a3da61ab75c60ddbbe93f0e9671d9bd5411abc705558a9
|
7
|
+
data.tar.gz: dc127c772d0f48fd2710e399aa5f59150724c37f5599b63c2aaba45804fdf1d68075b7808c679158ff7579fc85f5d7e987f7ee92e02493342dd7d2f29b2f5cb8
|
data/ext/IO_Event.bundle
CHANGED
Binary file
|
data/ext/Makefile
CHANGED
@@ -85,7 +85,7 @@ debugflags = -ggdb3
|
|
85
85
|
warnflags = -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef
|
86
86
|
cppflags =
|
87
87
|
CCDLFLAGS = -fno-common
|
88
|
-
CFLAGS = $(CCDLFLAGS) $(cflags) -pipe -Wall $(ARCH_FLAG)
|
88
|
+
CFLAGS = $(CCDLFLAGS) $(cflags) -pipe -Wall -std=c99 $(ARCH_FLAG)
|
89
89
|
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
|
90
90
|
DEFS =
|
91
91
|
CPPFLAGS = -DRUBY_EXTCONF_H=\"$(RUBY_EXTCONF_H)\" -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT $(DEFS) $(cppflags)
|
data/ext/extconf.rb
CHANGED
data/ext/io/event/event.c
CHANGED
data/ext/io/event/event.h
CHANGED
@@ -370,27 +370,24 @@ VALUE io_read_loop(VALUE _arguments) {
|
|
370
370
|
size_t offset = 0;
|
371
371
|
size_t length = arguments->length;
|
372
372
|
|
373
|
-
while (
|
373
|
+
while (true) {
|
374
374
|
size_t maximum_size = size - offset;
|
375
375
|
ssize_t result = read(arguments->descriptor, (char*)base+offset, maximum_size);
|
376
376
|
|
377
|
-
if (result
|
378
|
-
break;
|
379
|
-
} else if (result > 0) {
|
377
|
+
if (result > 0) {
|
380
378
|
offset += result;
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
} else if (errno == EAGAIN || errno == EWOULDBLOCK) {
|
379
|
+
if ((size_t)result >= length) break;
|
380
|
+
length -= result;
|
381
|
+
} else if (result == 0) {
|
382
|
+
break;
|
383
|
+
} else if (length > 0 && IO_Event_try_again(errno)) {
|
387
384
|
IO_Event_Selector_EPoll_io_wait(arguments->self, arguments->fiber, arguments->io, RB_INT2NUM(IO_EVENT_READABLE));
|
388
385
|
} else {
|
389
|
-
|
386
|
+
return rb_fiber_scheduler_io_result(-1, errno);
|
390
387
|
}
|
391
388
|
}
|
392
389
|
|
393
|
-
return
|
390
|
+
return rb_fiber_scheduler_io_result(offset, 0);
|
394
391
|
}
|
395
392
|
|
396
393
|
static
|
@@ -449,22 +446,24 @@ VALUE io_write_loop(VALUE _arguments) {
|
|
449
446
|
rb_raise(rb_eRuntimeError, "Length exceeds size of buffer!");
|
450
447
|
}
|
451
448
|
|
452
|
-
while (
|
453
|
-
|
449
|
+
while (true) {
|
450
|
+
size_t maximum_size = size - offset;
|
451
|
+
ssize_t result = write(arguments->descriptor, (char*)base+offset, maximum_size);
|
454
452
|
|
455
|
-
if (result
|
453
|
+
if (result > 0) {
|
456
454
|
offset += result;
|
457
|
-
|
458
|
-
// Result must always be <= than length:
|
455
|
+
if ((size_t)result >= length) break;
|
459
456
|
length -= result;
|
460
|
-
} else if (
|
457
|
+
} else if (result == 0) {
|
458
|
+
break;
|
459
|
+
} else if (length > 0 && IO_Event_try_again(errno)) {
|
461
460
|
IO_Event_Selector_EPoll_io_wait(arguments->self, arguments->fiber, arguments->io, RB_INT2NUM(IO_EVENT_WRITABLE));
|
462
461
|
} else {
|
463
|
-
|
462
|
+
return rb_fiber_scheduler_io_result(-1, errno);
|
464
463
|
}
|
465
464
|
}
|
466
465
|
|
467
|
-
return
|
466
|
+
return rb_fiber_scheduler_io_result(offset, 0);
|
468
467
|
};
|
469
468
|
|
470
469
|
static
|
@@ -26,6 +26,13 @@
|
|
26
26
|
#include <time.h>
|
27
27
|
#include <errno.h>
|
28
28
|
|
29
|
+
enum {
|
30
|
+
DEBUG = 0,
|
31
|
+
DEBUG_IO_READ = 0,
|
32
|
+
DEBUG_IO_WRITE = 0,
|
33
|
+
DEBUG_IO_WAIT = 0
|
34
|
+
};
|
35
|
+
|
29
36
|
static VALUE IO_Event_Selector_KQueue = Qnil;
|
30
37
|
|
31
38
|
enum {KQUEUE_MAX_EVENTS = 64};
|
@@ -363,6 +370,8 @@ VALUE IO_Event_Selector_KQueue_io_wait(VALUE self, VALUE fiber, VALUE io, VALUE
|
|
363
370
|
.descriptor = descriptor,
|
364
371
|
};
|
365
372
|
|
373
|
+
if (DEBUG_IO_WAIT) fprintf(stderr, "IO_Event_Selector_KQueue_io_wait descriptor=%d\n", descriptor);
|
374
|
+
|
366
375
|
return rb_rescue(io_wait_transfer, (VALUE)&io_wait_arguments, io_wait_rescue, (VALUE)&io_wait_arguments);
|
367
376
|
}
|
368
377
|
|
@@ -392,27 +401,31 @@ VALUE io_read_loop(VALUE _arguments) {
|
|
392
401
|
size_t offset = 0;
|
393
402
|
size_t length = arguments->length;
|
394
403
|
|
395
|
-
|
404
|
+
if (DEBUG_IO_READ) fprintf(stderr, "io_read_loop(fd=%d, length=%zu)\n", arguments->descriptor, length);
|
405
|
+
|
406
|
+
while (true) {
|
396
407
|
size_t maximum_size = size - offset;
|
408
|
+
if (DEBUG_IO_READ) fprintf(stderr, "read(%d, +%ld, %ld)\n", arguments->descriptor, offset, maximum_size);
|
397
409
|
ssize_t result = read(arguments->descriptor, (char*)base+offset, maximum_size);
|
410
|
+
if (DEBUG_IO_READ) fprintf(stderr, "read(%d, +%ld, %ld) -> %zd\n", arguments->descriptor, offset, maximum_size, result);
|
398
411
|
|
399
|
-
if (result
|
400
|
-
break;
|
401
|
-
} else if (result > 0) {
|
412
|
+
if (result > 0) {
|
402
413
|
offset += result;
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
414
|
+
if ((size_t)result >= length) break;
|
415
|
+
length -= result;
|
416
|
+
} else if (result == 0) {
|
417
|
+
break;
|
418
|
+
} else if (length > 0 && IO_Event_try_again(errno)) {
|
419
|
+
if (DEBUG_IO_READ) fprintf(stderr, "IO_Event_Selector_KQueue_io_wait(fd=%d, length=%zu)\n", arguments->descriptor, length);
|
409
420
|
IO_Event_Selector_KQueue_io_wait(arguments->self, arguments->fiber, arguments->io, RB_INT2NUM(IO_EVENT_READABLE));
|
410
421
|
} else {
|
411
|
-
|
422
|
+
if (DEBUG_IO_READ) fprintf(stderr, "io_read_loop(fd=%d, length=%zu) -> errno=%d\n", arguments->descriptor, length, errno);
|
423
|
+
return rb_fiber_scheduler_io_result(-1, errno);
|
412
424
|
}
|
413
425
|
}
|
414
426
|
|
415
|
-
|
427
|
+
if (DEBUG_IO_READ) fprintf(stderr, "io_read_loop(fd=%d, length=%zu) -> %zu\n", arguments->descriptor, length, offset);
|
428
|
+
return rb_fiber_scheduler_io_result(offset, 0);
|
416
429
|
}
|
417
430
|
|
418
431
|
static
|
@@ -474,22 +487,31 @@ VALUE io_write_loop(VALUE _arguments) {
|
|
474
487
|
rb_raise(rb_eRuntimeError, "Length exceeds size of buffer!");
|
475
488
|
}
|
476
489
|
|
477
|
-
|
478
|
-
|
490
|
+
if (DEBUG_IO_WRITE) fprintf(stderr, "io_write_loop(fd=%d, length=%zu)\n", arguments->descriptor, length);
|
491
|
+
|
492
|
+
while (true) {
|
493
|
+
size_t maximum_size = size - offset;
|
494
|
+
if (DEBUG_IO_WRITE) fprintf(stderr, "write(%d, +%ld, %ld, length=%zu)\n", arguments->descriptor, offset, maximum_size, length);
|
495
|
+
ssize_t result = write(arguments->descriptor, (char*)base+offset, maximum_size);
|
496
|
+
if (DEBUG_IO_WRITE) fprintf(stderr, "write(%d, +%ld, %ld) -> %zd\n", arguments->descriptor, offset, maximum_size, result);
|
479
497
|
|
480
|
-
if (result
|
498
|
+
if (result > 0) {
|
481
499
|
offset += result;
|
482
|
-
|
483
|
-
// Result must always be <= than length:
|
500
|
+
if ((size_t)result >= length) break;
|
484
501
|
length -= result;
|
485
|
-
} else if (
|
486
|
-
|
502
|
+
} else if (result == 0) {
|
503
|
+
break;
|
504
|
+
} else if (length > 0 && IO_Event_try_again(errno)) {
|
505
|
+
if (DEBUG_IO_WRITE) fprintf(stderr, "IO_Event_Selector_KQueue_io_wait(fd=%d, length=%zu)\n", arguments->descriptor, length);
|
506
|
+
IO_Event_Selector_KQueue_io_wait(arguments->self, arguments->fiber, arguments->io, RB_INT2NUM(IO_EVENT_READABLE));
|
487
507
|
} else {
|
488
|
-
|
508
|
+
if (DEBUG_IO_WRITE) fprintf(stderr, "io_write_loop(fd=%d, length=%zu) -> errno=%d\n", arguments->descriptor, length, errno);
|
509
|
+
return rb_fiber_scheduler_io_result(-1, errno);
|
489
510
|
}
|
490
511
|
}
|
491
512
|
|
492
|
-
|
513
|
+
if (DEBUG_IO_READ) fprintf(stderr, "io_write_loop(fd=%d, length=%zu) -> %zu\n", arguments->descriptor, length, offset);
|
514
|
+
return rb_fiber_scheduler_io_result(offset, 0);
|
493
515
|
};
|
494
516
|
|
495
517
|
static
|
@@ -620,7 +642,9 @@ VALUE IO_Event_Selector_KQueue_select(VALUE self, VALUE duration) {
|
|
620
642
|
// Non-comprehensive testing shows this gives a 1.5x speedup.
|
621
643
|
|
622
644
|
// First do the syscall with no timeout to get any immediately available events:
|
645
|
+
if (DEBUG) fprintf(stderr, "\r\nselect_internal_with_gvl timeout=" PRINTF_TIMESPEC "\r\n", PRINTF_TIMESPEC_ARGS(arguments.storage));
|
623
646
|
select_internal_with_gvl(&arguments);
|
647
|
+
if (DEBUG) fprintf(stderr, "\r\nselect_internal_with_gvl done\r\n");
|
624
648
|
|
625
649
|
// If we:
|
626
650
|
// 1. Didn't process any ready fibers, and
|
@@ -633,6 +657,7 @@ VALUE IO_Event_Selector_KQueue_select(VALUE self, VALUE duration) {
|
|
633
657
|
if (!timeout_nonblocking(arguments.timeout)) {
|
634
658
|
arguments.count = KQUEUE_MAX_EVENTS;
|
635
659
|
|
660
|
+
if (DEBUG) fprintf(stderr, "IO_Event_Selector_KQueue_select timeout=" PRINTF_TIMESPEC "\n", PRINTF_TIMESPEC_ARGS(arguments.storage));
|
636
661
|
select_internal_without_gvl(&arguments);
|
637
662
|
}
|
638
663
|
}
|
@@ -26,6 +26,7 @@
|
|
26
26
|
|
27
27
|
#ifdef HAVE_RUBY_IO_BUFFER_H
|
28
28
|
#include <ruby/io/buffer.h>
|
29
|
+
#include <ruby/fiber/scheduler.h>
|
29
30
|
#endif
|
30
31
|
|
31
32
|
#include <time.h>
|
@@ -40,6 +41,10 @@ enum IO_Event {
|
|
40
41
|
|
41
42
|
void Init_IO_Event_Selector();
|
42
43
|
|
44
|
+
static inline int IO_Event_try_again(int error) {
|
45
|
+
return error == EAGAIN || error == EWOULDBLOCK;
|
46
|
+
}
|
47
|
+
|
43
48
|
VALUE IO_Event_Selector_fiber_transfer(VALUE fiber, int argc, VALUE *argv);
|
44
49
|
|
45
50
|
#ifdef HAVE__RB_FIBER_RAISE
|
@@ -27,7 +27,10 @@
|
|
27
27
|
|
28
28
|
#include "pidfd.c"
|
29
29
|
|
30
|
-
|
30
|
+
enum {
|
31
|
+
DEBUG = 0,
|
32
|
+
DEBUG_IO_READ = 0,
|
33
|
+
};
|
31
34
|
|
32
35
|
static VALUE IO_Event_Selector_URing = Qnil;
|
33
36
|
|
@@ -373,7 +376,7 @@ static int io_read(struct IO_Event_Selector_URing *data, VALUE fiber, int descri
|
|
373
376
|
|
374
377
|
if (DEBUG) fprintf(stderr, "io_read:io_uring_prep_read(fiber=%p)\n", (void*)fiber);
|
375
378
|
|
376
|
-
io_uring_prep_read(sqe, descriptor, buffer, length,
|
379
|
+
io_uring_prep_read(sqe, descriptor, buffer, length, -1);
|
377
380
|
io_uring_sqe_set_data(sqe, (void*)fiber);
|
378
381
|
io_uring_submit_now(data);
|
379
382
|
|
@@ -396,27 +399,26 @@ VALUE IO_Event_Selector_URing_io_read(VALUE self, VALUE fiber, VALUE io, VALUE b
|
|
396
399
|
size_t offset = 0;
|
397
400
|
size_t length = NUM2SIZET(_length);
|
398
401
|
|
399
|
-
while (
|
402
|
+
while (true) {
|
400
403
|
size_t maximum_size = size - offset;
|
404
|
+
if (DEBUG_IO_READ) fprintf(stderr, "io_read(%d, +%ld, %ld)\n", descriptor, offset, maximum_size);
|
401
405
|
int result = io_read(data, fiber, descriptor, (char*)base+offset, maximum_size);
|
406
|
+
if (DEBUG_IO_READ) fprintf(stderr, "io_read(%d, +%ld, %ld) -> %d\n", descriptor, offset, maximum_size, result);
|
402
407
|
|
403
|
-
if (result
|
404
|
-
break;
|
405
|
-
} else if (result > 0) {
|
408
|
+
if (result > 0) {
|
406
409
|
offset += result;
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
} else if (-result == EAGAIN || -result == EWOULDBLOCK) {
|
410
|
+
if ((size_t)result >= length) break;
|
411
|
+
length -= result;
|
412
|
+
} else if (result == 0) {
|
413
|
+
break;
|
414
|
+
} else if (length > 0 && IO_Event_try_again(-result)) {
|
413
415
|
IO_Event_Selector_URing_io_wait(self, fiber, io, RB_INT2NUM(IO_EVENT_READABLE));
|
414
416
|
} else {
|
415
|
-
|
417
|
+
return rb_fiber_scheduler_io_result(-1, -result);
|
416
418
|
}
|
417
419
|
}
|
418
420
|
|
419
|
-
return
|
421
|
+
return rb_fiber_scheduler_io_result(offset, 0);
|
420
422
|
}
|
421
423
|
|
422
424
|
static
|
@@ -425,7 +427,7 @@ int io_write(struct IO_Event_Selector_URing *data, VALUE fiber, int descriptor,
|
|
425
427
|
|
426
428
|
if (DEBUG) fprintf(stderr, "io_write:io_uring_prep_write(fiber=%p)\n", (void*)fiber);
|
427
429
|
|
428
|
-
io_uring_prep_write(sqe, descriptor, buffer, length,
|
430
|
+
io_uring_prep_write(sqe, descriptor, buffer, length, -1);
|
429
431
|
io_uring_sqe_set_data(sqe, (void*)fiber);
|
430
432
|
io_uring_submit_pending(data);
|
431
433
|
|
@@ -452,21 +454,24 @@ VALUE IO_Event_Selector_URing_io_write(VALUE self, VALUE fiber, VALUE io, VALUE
|
|
452
454
|
rb_raise(rb_eRuntimeError, "Length exceeds size of buffer!");
|
453
455
|
}
|
454
456
|
|
455
|
-
while (
|
456
|
-
|
457
|
+
while (true) {
|
458
|
+
size_t maximum_size = size - offset;
|
459
|
+
int result = io_write(data, fiber, descriptor, (char*)base+offset, maximum_size);
|
457
460
|
|
458
|
-
if (result
|
461
|
+
if (result > 0) {
|
459
462
|
offset += result;
|
460
463
|
if ((size_t)result >= length) break;
|
461
464
|
length -= result;
|
462
|
-
} else if (
|
465
|
+
} else if (result == 0) {
|
466
|
+
break;
|
467
|
+
} else if (length > 0 && IO_Event_try_again(-result)) {
|
463
468
|
IO_Event_Selector_URing_io_wait(self, fiber, io, RB_INT2NUM(IO_EVENT_WRITABLE));
|
464
469
|
} else {
|
465
|
-
|
470
|
+
return rb_fiber_scheduler_io_result(-1, -result);
|
466
471
|
}
|
467
472
|
}
|
468
473
|
|
469
|
-
return
|
474
|
+
return rb_fiber_scheduler_io_result(offset, 0);
|
470
475
|
}
|
471
476
|
|
472
477
|
#endif
|
data/ext/kqueue.o
CHANGED
Binary file
|
data/ext/mkmf.log
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
have_func: checking for rb_ext_ractor_safe()... -------------------- yes
|
2
2
|
|
3
|
-
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
|
3
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
|
4
4
|
checked program was:
|
5
5
|
/* begin */
|
6
6
|
1: #include "ruby.h"
|
@@ -11,7 +11,7 @@ checked program was:
|
|
11
11
|
6: }
|
12
12
|
/* end */
|
13
13
|
|
14
|
-
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
|
14
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
|
15
15
|
checked program was:
|
16
16
|
/* begin */
|
17
17
|
1: #include "ruby.h"
|
@@ -34,7 +34,7 @@ checked program was:
|
|
34
34
|
|
35
35
|
have_func: checking for &rb_fiber_transfer()... -------------------- yes
|
36
36
|
|
37
|
-
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
|
37
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
|
38
38
|
checked program was:
|
39
39
|
/* begin */
|
40
40
|
1: #include "ruby.h"
|
@@ -57,7 +57,7 @@ checked program was:
|
|
57
57
|
|
58
58
|
have_library: checking for -luring... -------------------- no
|
59
59
|
|
60
|
-
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc -luring "
|
60
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc -luring "
|
61
61
|
ld: library not found for -luring
|
62
62
|
clang: error: linker command failed with exit code 1 (use -v to see invocation)
|
63
63
|
checked program was:
|
@@ -83,7 +83,7 @@ checked program was:
|
|
83
83
|
|
84
84
|
have_header: checking for sys/epoll.h... -------------------- no
|
85
85
|
|
86
|
-
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -c conftest.c"
|
86
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -std=c99 -c conftest.c"
|
87
87
|
conftest.c:3:10: fatal error: 'sys/epoll.h' file not found
|
88
88
|
#include <sys/epoll.h>
|
89
89
|
^~~~~~~~~~~~~
|
@@ -99,7 +99,7 @@ checked program was:
|
|
99
99
|
|
100
100
|
have_header: checking for sys/event.h... -------------------- yes
|
101
101
|
|
102
|
-
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -c conftest.c"
|
102
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -std=c99 -c conftest.c"
|
103
103
|
checked program was:
|
104
104
|
/* begin */
|
105
105
|
1: #include "ruby.h"
|
@@ -111,7 +111,7 @@ checked program was:
|
|
111
111
|
|
112
112
|
have_header: checking for sys/eventfd.h... -------------------- no
|
113
113
|
|
114
|
-
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -c conftest.c"
|
114
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -std=c99 -c conftest.c"
|
115
115
|
conftest.c:3:10: fatal error: 'sys/eventfd.h' file not found
|
116
116
|
#include <sys/eventfd.h>
|
117
117
|
^~~~~~~~~~~~~~~
|
@@ -127,7 +127,7 @@ checked program was:
|
|
127
127
|
|
128
128
|
have_func: checking for rb_io_descriptor()... -------------------- yes
|
129
129
|
|
130
|
-
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
|
130
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
|
131
131
|
conftest.c:14:57: error: use of undeclared identifier 'rb_io_descriptor'
|
132
132
|
int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_io_descriptor; return !p; }
|
133
133
|
^
|
@@ -150,7 +150,7 @@ checked program was:
|
|
150
150
|
14: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_io_descriptor; return !p; }
|
151
151
|
/* end */
|
152
152
|
|
153
|
-
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
|
153
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
|
154
154
|
checked program was:
|
155
155
|
/* begin */
|
156
156
|
1: #include "ruby.h"
|
@@ -174,7 +174,7 @@ checked program was:
|
|
174
174
|
|
175
175
|
have_func: checking for &rb_process_status_wait()... -------------------- no
|
176
176
|
|
177
|
-
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
|
177
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
|
178
178
|
conftest.c:14:76: error: use of undeclared identifier 'rb_process_status_wait'
|
179
179
|
int t(void) { const volatile void *volatile p; p = (const volatile void *)&rb_process_status_wait; return !p; }
|
180
180
|
^
|
@@ -201,7 +201,7 @@ checked program was:
|
|
201
201
|
|
202
202
|
have_func: checking for rb_fiber_current()... -------------------- yes
|
203
203
|
|
204
|
-
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
|
204
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
|
205
205
|
checked program was:
|
206
206
|
/* begin */
|
207
207
|
1: #include "ruby.h"
|
@@ -224,7 +224,7 @@ checked program was:
|
|
224
224
|
|
225
225
|
have_func: checking for &rb_fiber_raise()... -------------------- yes
|
226
226
|
|
227
|
-
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
|
227
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-head/lib -L. -fstack-protector-strong -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
|
228
228
|
checked program was:
|
229
229
|
/* begin */
|
230
230
|
1: #include "ruby.h"
|
@@ -247,7 +247,7 @@ checked program was:
|
|
247
247
|
|
248
248
|
have_header: checking for ruby/io/buffer.h... -------------------- yes
|
249
249
|
|
250
|
-
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -c conftest.c"
|
250
|
+
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-head/lib "clang -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/arm64-darwin21 -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0/ruby/backward -I/Users/samuel/.rubies/ruby-head/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -Wall -std=c99 -c conftest.c"
|
251
251
|
checked program was:
|
252
252
|
/* begin */
|
253
253
|
1: #include "ruby.h"
|
@@ -134,25 +134,36 @@ module IO::Event
|
|
134
134
|
end
|
135
135
|
|
136
136
|
if IO.const_defined?(:Buffer)
|
137
|
+
EAGAIN = Errno::EAGAIN::Errno
|
138
|
+
|
137
139
|
def io_read(fiber, io, buffer, length)
|
138
140
|
offset = 0
|
139
141
|
|
140
|
-
while
|
141
|
-
# The maximum size we can read:
|
142
|
+
while true
|
142
143
|
maximum_size = buffer.size - offset
|
143
144
|
|
144
145
|
case result = blocking{io.read_nonblock(maximum_size, exception: false)}
|
145
146
|
when :wait_readable
|
146
|
-
|
147
|
+
if length > 0
|
148
|
+
self.io_wait(fiber, io, IO::READABLE)
|
149
|
+
else
|
150
|
+
return -EAGAIN
|
151
|
+
end
|
147
152
|
when :wait_writable
|
148
|
-
|
153
|
+
if length > 0
|
154
|
+
self.io_wait(fiber, io, IO::WRITABLE)
|
155
|
+
else
|
156
|
+
return -EAGAIN
|
157
|
+
end
|
149
158
|
else
|
150
159
|
break unless result
|
151
160
|
|
152
161
|
buffer.copy(result, offset)
|
153
162
|
|
154
|
-
|
155
|
-
|
163
|
+
size = result.bytesize
|
164
|
+
offset += size
|
165
|
+
break if size >= length
|
166
|
+
length -= size
|
156
167
|
end
|
157
168
|
end
|
158
169
|
|
@@ -162,16 +173,26 @@ module IO::Event
|
|
162
173
|
def io_write(fiber, io, buffer, length)
|
163
174
|
offset = 0
|
164
175
|
|
165
|
-
while
|
166
|
-
|
167
|
-
|
176
|
+
while true
|
177
|
+
maximum_size = buffer.size - offset
|
178
|
+
|
179
|
+
chunk = buffer.to_str(offset, maximum_size)
|
168
180
|
case result = blocking{io.write_nonblock(chunk, exception: false)}
|
169
181
|
when :wait_readable
|
170
|
-
|
182
|
+
if length > 0
|
183
|
+
self.io_wait(fiber, io, IO::READABLE)
|
184
|
+
else
|
185
|
+
return -EAGAIN
|
186
|
+
end
|
171
187
|
when :wait_writable
|
172
|
-
|
188
|
+
if length > 0
|
189
|
+
self.io_wait(fiber, io, IO::WRITABLE)
|
190
|
+
else
|
191
|
+
return -EAGAIN
|
192
|
+
end
|
173
193
|
else
|
174
194
|
offset += result
|
195
|
+
break if result >= length
|
175
196
|
length -= result
|
176
197
|
end
|
177
198
|
end
|
data/lib/io/event/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: io-event
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bake
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.6'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
68
|
+
version: '0.6'
|
69
69
|
description:
|
70
70
|
email:
|
71
71
|
executables: []
|