aboutsummaryrefslogtreecommitdiffstats
path: root/include/ruby/thread_native.h
Commit message (Collapse)AuthorAgeFilesLines
* Move rb_thread_cond_struct definition into thread_native.hKJ Tsanaktsidis2023-05-261-0/+5
| | | | | | | | | | | 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.
* [wasm] add no thread variant for freestanding environmentYuta Saito2022-01-191-0/+6
| | | | | This implementation does nothing around preemptive context switching because there is no native thread.
* include/ruby/thread_native.h: add doxygen卜部昌平2021-09-101-7/+134
| | | | Must not be a bad idea to improve documents. [ci skip]
* Protoized old pre-ANSI K&R style declarations and definitionsNobuyoshi Nakada2021-05-071-1/+1
|
* fix public interfaceKoichi Sasada2020-11-181-0/+17
| | | | | | | | | | | | | | | | | | 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)
* add #include guard hack卜部昌平2020-04-131-12/+11
| | | | | | | | | | | | | | | | | | | | | | 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
* fix typo in documentationDerek Argueta2020-04-061-1/+1
|
* * ext/openssl/depend: remove dependency from internal headers.ko12014-05-141-0/+56
[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