mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Revert r52995
revert slow atomic operations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
303cd88d40
commit
b3377eaa13
6 changed files with 50 additions and 80 deletions
|
@ -42,7 +42,6 @@ typedef unsigned int rb_atomic_t; /* Anything OK */
|
|||
#pragma intrinsic(_InterlockedOr)
|
||||
#endif
|
||||
typedef LONG rb_atomic_t;
|
||||
#define SIZEOF_ATOMIC_T SIZEOF_LONG
|
||||
|
||||
# define ATOMIC_SET(var, val) InterlockedExchange(&(var), (val))
|
||||
# define ATOMIC_INC(var) InterlockedIncrement(&(var))
|
||||
|
@ -144,10 +143,6 @@ ruby_atomic_size_exchange(size_t *ptr, size_t val)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef SIZEOF_ATOMIC_T
|
||||
#define SIZEOF_ATOMIC_T SIZEOF_INT
|
||||
#endif
|
||||
|
||||
#ifndef ATOMIC_SIZE_INC
|
||||
# define ATOMIC_SIZE_INC(var) ATOMIC_INC(var)
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue