1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Add fiber scheduler hooks for pread/pwrite, and add support to IO::Buffer.

This commit is contained in:
Samuel Williams 2021-12-23 12:20:09 +13:00 committed by GitHub
parent 91c5c1c132
commit bed920f073
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2021-12-23 08:20:31 +09:00
Merged: https://github.com/ruby/ruby/pull/5249

Merged-By: ioquatix <samuel@codeotaku.com>
6 changed files with 288 additions and 2 deletions

View file

@ -80,6 +80,12 @@ VALUE rb_io_buffer_transfer(VALUE self);
void rb_io_buffer_resize(VALUE self, size_t size);
void rb_io_buffer_clear(VALUE self, uint8_t value, size_t offset, size_t length);
// The length is the minimum required length.
VALUE rb_io_buffer_read(VALUE self, VALUE io, size_t length);
VALUE rb_io_buffer_pread(VALUE self, VALUE io, size_t length, off_t offset);
VALUE rb_io_buffer_write(VALUE self, VALUE io, size_t length);
VALUE rb_io_buffer_pwrite(VALUE self, VALUE io, size_t length, off_t offset);
RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_IO_BUFFER_T */