atomic 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/atomic.gemspec +2 -2
- data/ext/atomic_reference.c +1 -1
- data/ext/extconf.rb +8 -0
- metadata +5 -8
data/atomic.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
3
|
# Update these to get proper version and commit history
|
4
|
-
new_version = "1.1.
|
5
|
-
old_version = "1.1.
|
4
|
+
new_version = "1.1.5"
|
5
|
+
old_version = "1.1.4"
|
6
6
|
|
7
7
|
git_lines = `git log --oneline #{old_version}...#{new_version}`.lines.map {|str| "* #{str}"}.join
|
8
8
|
doc_lines = File.readlines("README.rdoc")
|
data/ext/atomic_reference.c
CHANGED
@@ -50,7 +50,7 @@ static VALUE ir_compare_and_set(volatile VALUE self, VALUE expect_value, VALUE n
|
|
50
50
|
if (OSAtomicCompareAndSwap64(expect_value, new_value, &DATA_PTR(self))) {
|
51
51
|
return Qtrue;
|
52
52
|
}
|
53
|
-
#elif
|
53
|
+
#elif HAVE_GCC_CAS
|
54
54
|
if (__sync_bool_compare_and_swap(&DATA_PTR(self), expect_value, new_value)) {
|
55
55
|
return Qtrue;
|
56
56
|
}
|
data/ext/extconf.rb
CHANGED
@@ -14,6 +14,14 @@ require 'mkmf'
|
|
14
14
|
extension_name = 'atomic_reference'
|
15
15
|
dir_config(extension_name)
|
16
16
|
|
17
|
+
try_run(<<CODE) && ($defs << '-DHAVE_GCC_CAS')
|
18
|
+
int main() {
|
19
|
+
int i = 1;
|
20
|
+
__sync_bool_compare_and_swap(&i, 1, 4);
|
21
|
+
return (i != 4);
|
22
|
+
}
|
23
|
+
CODE
|
24
|
+
|
17
25
|
case CONFIG["arch"]
|
18
26
|
when /mswin32|mingw/
|
19
27
|
$CFLAGS += " -march=i686"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atomic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,14 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-04-
|
14
|
+
date: 2013-04-06 00:00:00.000000000 Z
|
15
15
|
dependencies: []
|
16
16
|
description: ! "= An atomic reference implementation for JRuby, Rubinius, and MRI.\n\n\n==
|
17
|
-
Changes since 1.1.
|
18
|
-
|
19
|
-
on rubygems.org.\n* 2c5ab6c Include README and oneline logs in gem description.\n*
|
20
|
-
6aeb053 Add @funny-falcon to authors.\n* aa24d4d Bump version to 1.1.1.\n* dc327eb
|
21
|
-
Merge pull request #16 from funny-falcon/patch-1\n* 1b68767 Fix JRUBYREFERENCE8_ALLOCATOR\n\n==
|
17
|
+
Changes since 1.1.4\n\n* e269463 Fix #15 by explicitly testing for GCC's CAS.\n*
|
18
|
+
b8858f9 More formatting for description.\n* a574b34 More formatting for description.\n\n==
|
22
19
|
Summary\n\n\n\nThis library provides:\n\n\n\n* an Atomic class that guarantees atomic
|
23
20
|
updates to its contained value\n\n\n\nThe Atomic class provides accessors for the
|
24
21
|
contained \"value\" plus two update methods:\n\n\n\n* update will run the provided
|
@@ -98,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
95
|
version: '0'
|
99
96
|
requirements: []
|
100
97
|
rubyforge_project:
|
101
|
-
rubygems_version: 1.8.
|
98
|
+
rubygems_version: 1.8.24
|
102
99
|
signing_key:
|
103
100
|
specification_version: 3
|
104
101
|
summary: An atomic reference implementation for JRuby, Rubinius, and MRI
|