1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

8 commits

Author SHA1 Message Date
nobu
1058f20672 ruby_atomic.h: ATOMIC_SIZE_CAS
* ruby_atomic.h (ATOMIC_SIZE_CAS): new macro, compare and swap size_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 06:46:33 +00:00
nobu
9f9b476710 ruby_atomic.h: suppress a warning
* ruby_atomic.h (ATOMIC_SIZE_SUB): add cast to suppress a warning by VC++.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-18 14:23:50 +00:00
nobu
15d4450907 ruby_atomic.h: ATOMIC_CAS on VC6
* ruby_atomic.h (rb_w32_atomic_cas): call InterlockedCompareExchange
  directly.
* ruby_atomic.h (ATOMIC_CAS): fix missing function call.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-03 15:13:06 +00:00
nobu
b12ffcb15d ruby_atomic.h: suppress warnigns
* ruby_atomic.h (ATOMIC_CAS): suppress C4022 and C4047 warnings in
  VC6.  only InterlockedCompareExchange is declared using PVOID.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-03 14:47:42 +00:00
ngoto
f70a7cd20f * configure.in (AC_CHECK_HEADERS): atomic.h for Solaris atomic_ops.
* ruby_atomic.h: Skip using Solaris10 atomic_ops on Solaris 9 or earlier if atomic.h is not available. [ruby-dev:47229] [Bug #8228]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 15:00:44 +00:00
ngoto
5faf4cc77b * ruby_atomic.h (ATOMIC_CAS): added for Solaris and other platforms.
* ruby_atomic.h, signal.c (NEED_RUBY_ATOMIC_OPS): renamed from
  NEED_RUBY_ATOMIC_EXCHANGE.
* signal.c (ruby_atomic_compare_and_swap): naive, non-atomic
  compare-and-swap implementation only used for platforms without
  valid support for atomic operations.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27 10:21:59 +00:00
kosaki
6190bb4d8a * ruby_atomic.h (ATOMIC_CAS): new macro for compare-and-exchange.
* vm_core.h (struct rb_thread_struct): add interrupt_mask member.
* thread.c (thread_create_core, Init_Thread): initialize
  th->thread_mask.

* vm_core.h (RUBY_VM_INTERRUPTED_ANY): new macro for avoiding
  bare th->interrupt_flag.
* vm_core.h (RUBY_VM_INTERRUPTED, RUBY_VM_INTERRUPTED): check
  th->interrupt_mask.
* thread.c (set_unblock_function, rb_thread_schedule): replace
  th->interrupt_flag with RUBY_VM_INTERRUPTED_ANY()

* signal.c (signal_exec): set up thread->interrupt_mask for
  preventing recursive trap handler.
* vm_core.h (RUBY_VM_CHECK_INTS, RUBY_VM_CHECK_INTS_BLOCKING): ditto.

* thread.c (rb_threadptr_execute_interrupts):
  don't process interrupt if it is masked.
  [Bug #6009] [ruby-core:42524]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-26 10:57:39 +00:00
ngoto
05a05cc62b * ruby_atomic.h: renamed from atomic.h to avoid header file name conflict
on Solaris 10. [ruby-dev:46414] [Bug #7287]
* gc.c, signal.c, vm_core.h, common.mk: reflect the rename from atomic.h
  to ruby_atomic.h.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-09 16:05:07 +00:00
Renamed from atomic.h (Browse further)