| Age | Commit message (Collapse) | Author |
|
My previous pass missed these atomic operations using operators.
|
|
This only adds the rbimpl_ version to include/ruby/atomic.h so that it
is not a new public interface.
We were already using RUBY_ATOMIC_VALUE_LOAD in a few locations. This
will allow us to use other memory orders internally when desired.
|
|
|
|
"store" is the terminology the C11 standard uses, which allows us to use
this as a fallback.
This only changes the private rbimpl_ version of the method,
RUBY_ATOMIC_SET et al. keep the same name.
|
|
The implementation is only active if `HAVE_STDATOMIC_H` is defined,
and only after the compiler fails to match all currently supported
systems.
|
|
These branches are only active for 32-bit Windows and Solaris platforms,
codify the fact by changing `#else` to `#elif`'s that explicitly include
those targets and `#error`-out otherwise.
|
|
If the object isn't shareable and already has a object_id
we can access it without a lock.
If we need to generate an ID, we may need to lock to find
the child shape.
We also generate the next `object_id` using atomics.
Notes:
Merged: https://github.com/ruby/ruby/pull/13298
|
|
If the shape has only one child, we check it lock-free without
compromising thread safety.
I haven't computed hard data as to how often that it the case,
but we can assume that it's not too rare for shapes to have
a single child that is often requested, typically when freezing
and object.
Notes:
Merged: https://github.com/ruby/ruby/pull/13191
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12921
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11985
|
|
As well as `RUBY_ATOMIC_PTR_EXCHANGE` and `RUBY_ATOMIC_PTR_LOAD`.
|
|
Use `_WIN64` for word-size, `_M_AMD64` for CPU-specific feature.
|
|
This can already be emulated by doing an atomic fetch_add of zero, but
this is more explicit.
[Bug #19994]
|
|
On MinGW, where both of Win32 API and GCC built-ins are available,
the mismatch of implementations to the definition caused lots of
warnings.
|
|
Reduce macros to do the same things in inline functions instead. This
way assertions can be made granular.
Notes:
Merged: https://github.com/ruby/ruby/pull/4848
|
|
Must not be a bad idea to improve documents. [ci skip]
Notes:
Merged: https://github.com/ruby/ruby/pull/4835
|
|
|
|
Pointed out by @shyouhei.
NOTE: Already we have dropped the support for older MSVCs,
probably prior to 1300 or 1400. Remove the conditional code,
especially in win32/Makefile.sub.
|
|
Now we need atomic operations, which are lighter than mutex, more
widely for extension libraries because of Ractor.
Notes:
Merged: https://github.com/ruby/ruby/pull/3983
|