Ruby: internal/scheduler.h Source File

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

scheduler.h
Go to the documentation of this file.
1#ifndef RUBY_SCHEDULER_H /*-*-C-*-vi:se ft=c:*/
2#define RUBY_SCHEDULER_H
12#include "ruby/ruby.h"
13#include "ruby/intern.h"
14
15 VALUE rb_scheduler_get();
16 VALUE rb_scheduler_set(VALUE scheduler);
17
18 VALUE rb_scheduler_current();
19 VALUE rb_thread_scheduler_current(VALUE thread);
20
21 VALUE rb_scheduler_timeout(struct timeval *timeout);
22
23 VALUE rb_scheduler_close(VALUE scheduler);
24
25 VALUE rb_scheduler_kernel_sleep(VALUE scheduler, VALUE duration);
26 VALUE rb_scheduler_kernel_sleepv(VALUE scheduler, int argc, VALUE * argv);
27
28int rb_scheduler_supports_process_wait(VALUE scheduler);
29 VALUE rb_scheduler_process_wait(VALUE scheduler, rb_pid_t pid, int flags);
30
31 VALUE rb_scheduler_block(VALUE scheduler, VALUE blocker, VALUE timeout);
32 VALUE rb_scheduler_unblock(VALUE scheduler, VALUE blocker, VALUE fiber);
33
34 VALUE rb_scheduler_io_wait(VALUE scheduler, VALUE io, VALUE events, VALUE timeout);
35 VALUE rb_scheduler_io_wait_readable(VALUE scheduler, VALUE io);
36 VALUE rb_scheduler_io_wait_writable(VALUE scheduler, VALUE io);
37
38int rb_scheduler_supports_io_read(VALUE scheduler);
39 VALUE rb_scheduler_io_read(VALUE scheduler, VALUE io, VALUE buffer, size_t offset, size_t length);
40
41int rb_scheduler_supports_io_write(VALUE scheduler);
42 VALUE rb_scheduler_io_write(VALUE scheduler, VALUE io, VALUE buffer, size_t offset, size_t length);
43
44#endif /* RUBY_SCHEDULER_H */
intern.h
offset
voidpf uLong offset
Definition: ioapi.h:144
ruby.h
argc
int argc
Definition: ruby.c:240
argv
char ** argv
Definition: ruby.c:241
rb_scheduler_io_wait_writable
VALUE rb_scheduler_io_wait_writable(VALUE scheduler, VALUE io)
Definition: scheduler.c:184
rb_scheduler_io_wait
VALUE rb_scheduler_io_wait(VALUE scheduler, VALUE io, VALUE events, VALUE timeout)
Definition: scheduler.c:172
rb_scheduler_block
VALUE rb_scheduler_block(VALUE scheduler, VALUE blocker, VALUE timeout)
Definition: scheduler.c:160
rb_scheduler_current
VALUE rb_scheduler_current()
Definition: scheduler.c:105
rb_scheduler_kernel_sleepv
VALUE rb_scheduler_kernel_sleepv(VALUE scheduler, int argc, VALUE *argv)
Definition: scheduler.c:142
rb_scheduler_process_wait
VALUE rb_scheduler_process_wait(VALUE scheduler, rb_pid_t pid, int flags)
Definition: scheduler.c:154
rb_scheduler_timeout
VALUE rb_scheduler_timeout(struct timeval *timeout)
Definition: scheduler.c:126
rb_scheduler_supports_process_wait
int rb_scheduler_supports_process_wait(VALUE scheduler)
Definition: scheduler.c:148
rb_scheduler_supports_io_read
int rb_scheduler_supports_io_read(VALUE scheduler)
Definition: scheduler.c:190
rb_scheduler_io_wait_readable
VALUE rb_scheduler_io_wait_readable(VALUE scheduler, VALUE io)
Definition: scheduler.c:178
rb_thread_scheduler_current
VALUE rb_thread_scheduler_current(VALUE thread)
Definition: scheduler.c:110
rb_scheduler_unblock
VALUE rb_scheduler_unblock(VALUE scheduler, VALUE blocker, VALUE fiber)
Definition: scheduler.c:166
rb_scheduler_get
VALUE rb_scheduler_get()
Definition: scheduler.c:44
rb_scheduler_supports_io_write
int rb_scheduler_supports_io_write(VALUE scheduler)
Definition: scheduler.c:202
rb_scheduler_close
VALUE rb_scheduler_close(VALUE scheduler)
Definition: scheduler.c:116
rb_scheduler_io_read
VALUE rb_scheduler_io_read(VALUE scheduler, VALUE io, VALUE buffer, size_t offset, size_t length)
Definition: scheduler.c:196
rb_scheduler_io_write
VALUE rb_scheduler_io_write(VALUE scheduler, VALUE io, VALUE buffer, size_t offset, size_t length)
Definition: scheduler.c:208
rb_scheduler_kernel_sleep
VALUE rb_scheduler_kernel_sleep(VALUE scheduler, VALUE duration)
Definition: scheduler.c:136
rb_scheduler_set
VALUE rb_scheduler_set(VALUE scheduler)
Definition: scheduler.c:73
timeval
Definition: missing.h:51
VALUE
unsigned long VALUE
Definition: value.h:38