<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/include/ruby/thread_native.h, branch v4.0.3</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Move rb_thread_cond_struct definition into thread_native.h</title>
<updated>2023-05-26T05:51:23+00:00</updated>
<author>
<name>KJ Tsanaktsidis</name>
<email>ktsanaktsidis@zendesk.com</email>
</author>
<published>2023-05-26T02:02:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=54a74c42033e42869e69e7dc9e67efa1faf225be'/>
<id>54a74c42033e42869e69e7dc9e67efa1faf225be</id>
<content type='text'>
On Win32, currently, rb_nativethread_cond_t is an incomplete type
because it's a typedef for `struct rb_thread_cond_struct`. That means
you can't actually allocate a rb_nativethread_cond_t unless you also
include THREAD_IMPL_H (since its defined in thread_win32.h)
(alternatively, including vm_core.h also works).

Move the definition of rb_thread_cond_struct into thread_native.h to
alleviate this.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Win32, currently, rb_nativethread_cond_t is an incomplete type
because it's a typedef for `struct rb_thread_cond_struct`. That means
you can't actually allocate a rb_nativethread_cond_t unless you also
include THREAD_IMPL_H (since its defined in thread_win32.h)
(alternatively, including vm_core.h also works).

Move the definition of rb_thread_cond_struct into thread_native.h to
alleviate this.
</pre>
</div>
</content>
</entry>
<entry>
<title>[wasm] add no thread variant for freestanding environment</title>
<updated>2022-01-19T02:19:06+00:00</updated>
<author>
<name>Yuta Saito</name>
<email>kateinoigakukun@gmail.com</email>
</author>
<published>2022-01-15T15:37:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=420622b5a793186dfa533e7702913fd5e4764e0f'/>
<id>420622b5a793186dfa533e7702913fd5e4764e0f</id>
<content type='text'>
This implementation does nothing around preemptive context switching
because there is no native thread.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implementation does nothing around preemptive context switching
because there is no native thread.
</pre>
</div>
</content>
</entry>
<entry>
<title>include/ruby/thread_native.h: add doxygen</title>
<updated>2021-09-10T11:00:06+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2021-06-08T08:58:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=53e0d7eec71302eacd370426d0af29f8adcfe19d'/>
<id>53e0d7eec71302eacd370426d0af29f8adcfe19d</id>
<content type='text'>
Must not be a bad idea to improve documents. [ci skip]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Must not be a bad idea to improve documents. [ci skip]
</pre>
</div>
</content>
</entry>
<entry>
<title>Protoized old pre-ANSI K&amp;R style declarations and definitions</title>
<updated>2021-05-06T15:04:36+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2021-05-06T15:04:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0bbab1e5151c3396ebe544d09cad997cd9cb5e3b'/>
<id>0bbab1e5151c3396ebe544d09cad997cd9cb5e3b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix public interface</title>
<updated>2020-11-17T18:52:41+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2020-11-17T07:40:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5e3259ea7490a2542d78c433eb8c9d44c7819e61'/>
<id>5e3259ea7490a2542d78c433eb8c9d44c7819e61</id>
<content type='text'>
To make some kind of Ractor related extensions, some functions
should be exposed.

* include/ruby/thread_native.h
  * rb_native_mutex_*
  * rb_native_cond_*
* include/ruby/ractor.h
  * RB_OBJ_SHAREABLE_P(obj)
  * rb_ractor_shareable_p(obj)
  * rb_ractor_std*()
  * rb_cRactor

and rm ractor_pub.h
and rename srcdir/ractor.h to srcdir/ractor_core.h
    (to avoid conflict with include/ruby/ractor.h)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To make some kind of Ractor related extensions, some functions
should be exposed.

* include/ruby/thread_native.h
  * rb_native_mutex_*
  * rb_native_cond_*
* include/ruby/ractor.h
  * RB_OBJ_SHAREABLE_P(obj)
  * rb_ractor_shareable_p(obj)
  * rb_ractor_std*()
  * rb_cRactor

and rm ractor_pub.h
and rename srcdir/ractor.h to srcdir/ractor_core.h
    (to avoid conflict with include/ruby/ractor.h)
</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>
<entry>
<title>fix typo in documentation</title>
<updated>2020-04-05T23:29:12+00:00</updated>
<author>
<name>Derek Argueta</name>
<email>deargueta@tesla.com</email>
</author>
<published>2020-04-05T20:56:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ba3eccd9b5e99ce893ae06bada5c279962c5c232'/>
<id>ba3eccd9b5e99ce893ae06bada5c279962c5c232</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>* ext/openssl/depend: remove dependency from internal headers.</title>
<updated>2014-05-14T10:55:38+00:00</updated>
<author>
<name>ko1</name>
<email>ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2014-05-14T10:55:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7093a2cb5bdd85f84601815d08da90ef71c3322f'/>
<id>7093a2cb5bdd85f84601815d08da90ef71c3322f</id>
<content type='text'>
  [Feature #9612]
* ext/openssl/ossl.c (ossl_fips_mode_set): ditto.
* ext/coverage/depend: ditto.
* include/ruby/thread_native.h: added.
  This header file only provides wrapper functions to control
  native threads. These wrapper functions are used by MRI
  implementation.
* vm_core.h: use include/ruby/thread_native.h.
* thread.c: ditto.
* thread_pthread.h: ditto.
* thread_win32.h: ditto.
* thread_native.h: removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  [Feature #9612]
* ext/openssl/ossl.c (ossl_fips_mode_set): ditto.
* ext/coverage/depend: ditto.
* include/ruby/thread_native.h: added.
  This header file only provides wrapper functions to control
  native threads. These wrapper functions are used by MRI
  implementation.
* vm_core.h: use include/ruby/thread_native.h.
* thread.c: ditto.
* thread_pthread.h: ditto.
* thread_win32.h: ditto.
* thread_native.h: removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
</feed>
