<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/internal/io.h, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Introduce `Fiber::Scheduler#blocking_operation_wait`. (#12016)</title>
<updated>2024-11-20T06:40:17+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2024-11-20T06:40:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9c268302bfb4890d3757caa60981802a88bfbd89'/>
<id>9c268302bfb4890d3757caa60981802a88bfbd89</id>
<content type='text'>
Redirect `rb_nogvl` blocking operations to the fiber scheduler if possible
to prevent stalling the event loop.

[Feature #20876]</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Redirect `rb_nogvl` blocking operations to the fiber scheduler if possible
to prevent stalling the event loop.

[Feature #20876]</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce `rb_io_blocking_region` which takes `struct rb_io` argument. (#11795)</title>
<updated>2024-10-05T02:10:12+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2024-10-05T02:10:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c50298d7d4f8797963490f5679b1c481b89d4955'/>
<id>c50298d7d4f8797963490f5679b1c481b89d4955</id>
<content type='text'>
This does not change any actual behaviour, but provides a choke point for blocking IO operations.

* Update `IO::Buffer` to use `rb_io_blocking_region`.

* Update `File` to use `rb_io_blocking_region`.

* Update `IO` to use `rb_io_blocking_region`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This does not change any actual behaviour, but provides a choke point for blocking IO operations.

* Update `IO::Buffer` to use `rb_io_blocking_region`.

* Update `File` to use `rb_io_blocking_region`.

* Update `IO` to use `rb_io_blocking_region`.</pre>
</div>
</content>
</entry>
<entry>
<title>Define `IO_WITHOUT_GVL` macro</title>
<updated>2024-01-24T11:51:50+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-01-24T11:51:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d86c4e553ee8ff899a103a49db0b66c73c01135f'/>
<id>d86c4e553ee8ff899a103a49db0b66c73c01135f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>do not redefine a typedef</title>
<updated>2023-08-25T08:27:53+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2023-08-25T04:51:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=097b766b41d4d2faac8e8649a2ac40abef920272'/>
<id>097b766b41d4d2faac8e8649a2ac40abef920272</id>
<content type='text'>
duplicated typedef declaration was not allowed in C99.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
duplicated typedef declaration was not allowed in C99.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add deprecations for public `struct rb_io` members. (#7916)</title>
<updated>2023-06-08T11:22:43+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2023-06-08T11:22:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3fe09eba9d040d275d8305fe1b00f2f22218b6c8'/>
<id>3fe09eba9d040d275d8305fe1b00f2f22218b6c8</id>
<content type='text'>
* Add deprecations for public struct rb_io members.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add deprecations for public struct rb_io members.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Hide most of the implementation of `struct rb_io`. (#6511)"</title>
<updated>2023-05-31T23:43:22+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2023-05-31T23:43:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=85dcc4866d9ff29834596e9186cc97d622ee06f8'/>
<id>85dcc4866d9ff29834596e9186cc97d622ee06f8</id>
<content type='text'>
This reverts commit 18e55fc1e1ec20e8f3166e3059e76c885fc9f8f2.

fix [Bug #19704]
https://bugs.ruby-lang.org/issues/19704
This breaks compatibility for extension libraries. Such changes
need a discussion.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 18e55fc1e1ec20e8f3166e3059e76c885fc9f8f2.

fix [Bug #19704]
https://bugs.ruby-lang.org/issues/19704
This breaks compatibility for extension libraries. Such changes
need a discussion.
</pre>
</div>
</content>
</entry>
<entry>
<title>Hide most of the implementation of `struct rb_io`. (#6511)</title>
<updated>2023-05-30T01:02:40+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2023-05-30T01:02:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=18e55fc1e1ec20e8f3166e3059e76c885fc9f8f2'/>
<id>18e55fc1e1ec20e8f3166e3059e76c885fc9f8f2</id>
<content type='text'>
* Add rb_io_path and rb_io_open_descriptor.

* Use rb_io_open_descriptor to create PTY objects

* Rename FMODE_PREP -&gt; FMODE_EXTERNAL and expose it

FMODE_PREP I believe refers to the concept of a "pre-prepared" file, but
FMODE_EXTERNAL is clearer about what the file descriptor represents and
aligns with language in the IO::Buffer module.

* Ensure that rb_io_open_descriptor closes the FD if it fails

If FMODE_EXTERNAL is not set, then it's guaranteed that Ruby will be
responsible for closing your file, eventually, if you pass it to
rb_io_open_descriptor, even if it raises an exception.

* Rename IS_EXTERNAL_FD -&gt; RUBY_IO_EXTERNAL_P

* Expose `rb_io_closed_p`.

* Add `rb_io_mode` to get IO mode.

---------

Co-authored-by: KJ Tsanaktsidis &lt;ktsanaktsidis@zendesk.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add rb_io_path and rb_io_open_descriptor.

* Use rb_io_open_descriptor to create PTY objects

* Rename FMODE_PREP -&gt; FMODE_EXTERNAL and expose it

FMODE_PREP I believe refers to the concept of a "pre-prepared" file, but
FMODE_EXTERNAL is clearer about what the file descriptor represents and
aligns with language in the IO::Buffer module.

* Ensure that rb_io_open_descriptor closes the FD if it fails

If FMODE_EXTERNAL is not set, then it's guaranteed that Ruby will be
responsible for closing your file, eventually, if you pass it to
rb_io_open_descriptor, even if it raises an exception.

* Rename IS_EXTERNAL_FD -&gt; RUBY_IO_EXTERNAL_P

* Expose `rb_io_closed_p`.

* Add `rb_io_mode` to get IO mode.

---------

Co-authored-by: KJ Tsanaktsidis &lt;ktsanaktsidis@zendesk.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Move some function declaration to internal/io.h</title>
<updated>2021-09-28T05:08:08+00:00</updated>
<author>
<name>S-H-GAMELINKS</name>
<email>gamelinks007@gmail.com</email>
</author>
<published>2021-09-28T04:00:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1e9a688cd55d825d8c77c74c62d4b642ef492659'/>
<id>1e9a688cd55d825d8c77c74c62d4b642ef492659</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>internal/*.h: skip doxygen</title>
<updated>2021-09-10T11:00:06+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2021-06-08T00:40:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=daf0c04a47e5aaede2f2a3e3663148dff96ff770'/>
<id>daf0c04a47e5aaede2f2a3e3663148dff96ff770</id>
<content type='text'>
These contents are purely implementation details, not worth appearing in
CAPI documents. [ci skip]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These contents are purely implementation details, not worth appearing in
CAPI documents. [ci skip]
</pre>
</div>
</content>
</entry>
<entry>
<title>add #include guard hack</title>
<updated>2020-04-13T07:06:00+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2020-04-10T05:11:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4ff3f205408ff8bb413d69151105d301858136ba'/>
<id>4ff3f205408ff8bb413d69151105d301858136ba</id>
<content type='text'>
According to MSVC manual (*1), cl.exe can skip including a header file
when that:

- contains #pragma once, or
- starts with #ifndef, or
- starts with #if ! defined.

GCC has a similar trick (*2), but it acts more stricter (e. g. there
must be _no tokens_ outside of #ifndef...#endif).

Sun C lacked #pragma once for a looong time.  Oracle Developer Studio
12.5 finally implemented it, but we cannot assume such recent version.

This changeset modifies header files so that each of them include
strictly one #ifndef...#endif.  I believe this is the most portable way
to trigger compiler optimizations. [Bug #16770]

*1: https://docs.microsoft.com/en-us/cpp/preprocessor/once
*2: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to MSVC manual (*1), cl.exe can skip including a header file
when that:

- contains #pragma once, or
- starts with #ifndef, or
- starts with #if ! defined.

GCC has a similar trick (*2), but it acts more stricter (e. g. there
must be _no tokens_ outside of #ifndef...#endif).

Sun C lacked #pragma once for a looong time.  Oracle Developer Studio
12.5 finally implemented it, but we cannot assume such recent version.

This changeset modifies header files so that each of them include
strictly one #ifndef...#endif.  I believe this is the most portable way
to trigger compiler optimizations. [Bug #16770]

*1: https://docs.microsoft.com/en-us/cpp/preprocessor/once
*2: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
</pre>
</div>
</content>
</entry>
</feed>
