atomic 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/atomic.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{atomic}
5
- s.version = "0.0.3"
5
+ s.version = "0.0.4"
6
6
  s.authors = ["Charles Oliver Nutter", "MenTaLguY"]
7
7
  s.date = Time.now.strftime('YYYY-MM-DD')
8
8
  s.description = "An atomic reference implementation for JRuby and green or GIL-threaded impls"
data/ext/Makefile ADDED
@@ -0,0 +1,162 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ #### Start of system configuration section. ####
5
+
6
+ srcdir = .
7
+ topdir = /usr/local/rubinius/1.0.0/include
8
+ hdrdir = $(topdir)
9
+ VPATH = $(srcdir):$(topdir):$(hdrdir)
10
+ prefix = $(DESTDIR)/usr/local/rubinius/1.0.0
11
+ exec_prefix = $(prefix)
12
+ install_prefix = $(DESTDIR)
13
+ includedir = $(prefix)/include
14
+ bindir = $(DESTDIR)/usr/local/rubinius/1.0.0/bin
15
+ sysconfdir = $(prefix)/etc
16
+ localedir = $(datarootdir)/locale
17
+ rubylibdir = $(DESTDIR)/usr/local/rubinius/1.0.0/site
18
+ sitedir = $(DESTDIR)/usr/local/rubinius/1.0.0/site
19
+ oldincludedir = $(DESTDIR)/usr/include
20
+ libexecdir = $(exec_prefix)/libexec
21
+ rubyhdrdir = $(DESTDIR)/usr/local/rubinius/1.0.0/include
22
+ libdir = $(exec_prefix)/lib
23
+ dvidir = $(docdir)
24
+ docdir = $(datarootdir)/doc/$(PACKAGE)
25
+ psdir = $(docdir)
26
+ infodir = $(datarootdir)/info
27
+ datadir = $(datarootdir)
28
+ archdir = $(DESTDIR)/usr/local/rubinius/1.0.0/site/x86_64-darwin10.3.0
29
+ sharedstatedir = $(prefix)/com
30
+ localstatedir = $(prefix)/var
31
+ pdfdir = $(docdir)
32
+ htmldir = $(docdir)
33
+ datarootdir = $(prefix)/share
34
+ sbindir = $(exec_prefix)/sbin
35
+ sitelibdir = $(DESTDIR)/usr/local/rubinius/1.0.0/site
36
+ mandir = $(datarootdir)/man
37
+ sitearchdir = $(DESTDIR)/usr/local/rubinius/1.0.0/site/x86_64-darwin10.3.0
38
+
39
+ CC = gcc
40
+ LIBRUBY = $(LIBRUBY_SO)
41
+ LIBRUBY_A =
42
+ LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
43
+ LIBRUBYARG_STATIC =
44
+
45
+ RUBY_EXTCONF_H =
46
+ cflags =
47
+ optflags =
48
+ debugflags =
49
+ warnflags =
50
+ CFLAGS = -ggdb3 -O2 -fPIC
51
+ INCFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir)
52
+ DEFS =
53
+ CPPFLAGS =
54
+ CXXFLAGS = $(CFLAGS)
55
+ ldflags =
56
+ dldflags =
57
+ archflag =
58
+ DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
59
+ LDSHARED = cc -dynamic -bundle -undefined suppress -flat_namespace
60
+ AR = ar
61
+ EXEEXT =
62
+
63
+ RUBY_INSTALL_NAME = rbx
64
+ RUBY_SO_NAME = rubinius-1.0.0
65
+ arch = x86_64-darwin10.3.0
66
+ sitearch = x86_64-darwin10.3.0
67
+ ruby_version = 1.8
68
+ ruby = /usr/local/rubinius/1.0.0/bin/rbx
69
+ RUBY = $(ruby)
70
+ RM = rm -f
71
+ MAKEDIRS = mkdir -p
72
+ INSTALL = install -c
73
+ INSTALL_PROG = $(INSTALL) -m 0755
74
+ INSTALL_DATA = $(INSTALL) -m 644
75
+ COPY = cp
76
+
77
+ #### End of system configuration section. ####
78
+
79
+ preload =
80
+
81
+ libpath = . $(libdir)
82
+ LIBPATH = -L. -L$(libdir)
83
+ DEFFILE =
84
+
85
+ CLEANFILES = mkmf.log
86
+ DISTCLEANFILES =
87
+
88
+ extout =
89
+ extout_prefix =
90
+ target_prefix =
91
+ LOCAL_LIBS =
92
+ LIBS = $(LIBRUBYARG_STATIC)
93
+ SRCS = atomic_reference.c
94
+ OBJS = atomic_reference.o
95
+ TARGET = atomic_reference
96
+ DLLIB = $(TARGET).bundle
97
+ EXTSTATIC =
98
+ STATIC_LIB =
99
+
100
+ BINDIR = $(bindir)
101
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
102
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
103
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
104
+
105
+ TARGET_SO = $(DLLIB)
106
+ CLEANLIBS = $(TARGET).bundle
107
+ CLEANOBJS = *.o *.bak
108
+
109
+ all: $(DLLIB)
110
+ static: $(STATIC_LIB)
111
+ .PHONY: all install static install-so install-rb
112
+ .PHONY: clean clean-so clean-rb
113
+
114
+ clean:
115
+ @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
116
+
117
+ distclean: clean
118
+ @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
119
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
120
+
121
+ realclean: distclean
122
+ install: install-so install-rb
123
+
124
+ install-so: $(RUBYARCHDIR)
125
+ install-so: $(RUBYARCHDIR)/$(DLLIB)
126
+ $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
127
+ $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
128
+ install-rb: pre-install-rb install-rb-default
129
+ install-rb-default: pre-install-rb-default
130
+ pre-install-rb: Makefile
131
+ pre-install-rb-default: Makefile
132
+ $(RUBYARCHDIR):
133
+ $(MAKEDIRS) $@
134
+
135
+ site-install: site-install-so site-install-rb
136
+ site-install-so: install-so
137
+ site-install-rb: install-rb
138
+
139
+ .SUFFIXES: .c .m .cc .cxx .cpp .C .o
140
+
141
+ .cc.o:
142
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
143
+
144
+ .cxx.o:
145
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
146
+
147
+ .cpp.o:
148
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
149
+
150
+ .C.o:
151
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
152
+
153
+ .c.o:
154
+ $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
155
+
156
+ $(DLLIB): $(OBJS) Makefile
157
+ @-$(RM) $@
158
+ $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
159
+
160
+
161
+
162
+ $(OBJS): ruby.h defines.h
Binary file
@@ -0,0 +1,57 @@
1
+ #include <ruby.h>
2
+
3
+ static void ir_mark(void *value) {
4
+ rb_mark((VALUE)value);
5
+ }
6
+
7
+ static VALUE ir_alloc(VALUE klass) {
8
+ return rb_data_object_alloc(klass, (void *)Qnil, ir_mark, NULL);
9
+ }
10
+
11
+ static VALUE ir_initialize(VALUE self, VALUE value) {
12
+ DATA_PTR(self) = (void *)value;
13
+ return Qnil;
14
+ }
15
+
16
+ static VALUE ir_get(VALUE self) {
17
+ return (VALUE)DATA_PTR(self);
18
+ }
19
+
20
+ static VALUE ir_set(VALUE self, VALUE new_value) {
21
+ DATA_PTR(self) = (void *)new_value;
22
+ return new_value;
23
+ }
24
+
25
+ static VALUE ir_get_and_set(VALUE self, VALUE new_value) {
26
+ VALUE old_value;
27
+ old_value = (VALUE)DATA_PTR(self);
28
+ DATA_PTR(self) = (void *)new_value;
29
+ return old_value;
30
+ }
31
+
32
+ static VALUE ir_compare_and_set(VALUE self, VALUE expect_value, VALUE new_value) {
33
+ VALUE old_value;
34
+ old_value = (VALUE)DATA_PTR(self);
35
+ if (old_value == expect_value) {
36
+ DATA_PTR(self) = (void *)new_value;
37
+ return Qtrue;
38
+ } else {
39
+ return Qfalse;
40
+ }
41
+ }
42
+
43
+ void Init_atomic_reference() {
44
+ VALUE cAtomic;
45
+ VALUE cInternalReference;
46
+
47
+ cAtomic = rb_const_get(rb_cObject, rb_intern("Atomic"));
48
+ cInternalReference = rb_define_class_under(cAtomic, "InternalReference",
49
+ rb_cObject);
50
+ rb_define_alloc_func(cAtomic, ir_alloc);
51
+
52
+ rb_define_method(cInternalReference, "initialize", ir_initialize, 1);
53
+ rb_define_method(cInternalReference, "get", ir_get, 0);
54
+ rb_define_method(cInternalReference, "set", ir_set, 1);
55
+ rb_define_method(cInternalReference, "get_and_set", ir_get_and_set, 1);
56
+ rb_define_method(cInternalReference, "compare_and_set", ir_compare_and_set, 2);
57
+ }
Binary file
data/ext/extconf.rb ADDED
@@ -0,0 +1,4 @@
1
+ require 'mkmf'
2
+ extension_name = 'atomic_reference'
3
+ dir_config(extension_name)
4
+ create_makefile(extension_name)
data/ext/extconf.rbc ADDED
@@ -0,0 +1,99 @@
1
+ !RBIX
2
+ 0
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 33
13
+ 5
14
+ 7
15
+ 0
16
+ 64
17
+ 47
18
+ 49
19
+ 1
20
+ 1
21
+ 15
22
+ 7
23
+ 2
24
+ 64
25
+ 19
26
+ 0
27
+ 15
28
+ 5
29
+ 20
30
+ 0
31
+ 47
32
+ 49
33
+ 3
34
+ 1
35
+ 15
36
+ 5
37
+ 20
38
+ 0
39
+ 47
40
+ 49
41
+ 4
42
+ 1
43
+ 15
44
+ 2
45
+ 11
46
+ I
47
+ 3
48
+ I
49
+ 1
50
+ I
51
+ 0
52
+ I
53
+ 0
54
+ n
55
+ p
56
+ 5
57
+ s
58
+ 4
59
+ mkmf
60
+ x
61
+ 7
62
+ require
63
+ s
64
+ 16
65
+ atomic_reference
66
+ x
67
+ 10
68
+ dir_config
69
+ x
70
+ 15
71
+ create_makefile
72
+ p
73
+ 9
74
+ I
75
+ 0
76
+ I
77
+ 1
78
+ I
79
+ 9
80
+ I
81
+ 2
82
+ I
83
+ f
84
+ I
85
+ 3
86
+ I
87
+ 17
88
+ I
89
+ 4
90
+ I
91
+ 21
92
+ x
93
+ 45
94
+ /Users/headius/projects/atomic/ext/extconf.rb
95
+ p
96
+ 1
97
+ x
98
+ 14
99
+ extension_name
data/lib/atomic.rb CHANGED
@@ -42,20 +42,26 @@ class Atomic
42
42
  end
43
43
  end
44
44
 
45
- if defined? RUBY_ENGINE && RUBY_ENGINE == "jruby"
45
+ begin
46
46
  require 'atomic_reference'
47
- else
48
- class Atomic::InternalReference
49
- attr_accessor :value
50
- alias_method :get, :value
51
- alias_method :set, :value=
52
-
47
+ rescue LoadError
48
+ # Portable/generic (but not very memory or scheduling-efficient) fallback
49
+ class Atomic::InternalReference #:nodoc: all
53
50
  def initialize(value)
51
+ @mutex = Mutex.new
54
52
  @value = value
55
53
  end
56
54
 
55
+ def get
56
+ @mutex.synchronize { @value }
57
+ end
58
+
59
+ def set(new_value)
60
+ @mutex.synchronize { @value = new_value }
61
+ end
62
+
57
63
  def get_and_set(new_value)
58
- Thread.exclusive do
64
+ @mutex.synchronize do
59
65
  old_value = @value
60
66
  @value = new_value
61
67
  old_value
@@ -63,9 +69,12 @@ else
63
69
  end
64
70
 
65
71
  def compare_and_set(old_value, new_value)
66
- Thread.exclusive do
72
+ return false unless @mutex.try_lock
73
+ begin
67
74
  return false unless @value.equal? old_value
68
75
  @value = new_value
76
+ ensure
77
+ @mutex.unlock
69
78
  end
70
79
  true
71
80
  end
data/lib/atomic.rbc ADDED
@@ -0,0 +1,1655 @@
1
+ !RBIX
2
+ 0
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 120
13
+ 5
14
+ 7
15
+ 0
16
+ 64
17
+ 47
18
+ 49
19
+ 1
20
+ 1
21
+ 15
22
+ 45
23
+ 2
24
+ 3
25
+ 7
26
+ 4
27
+ 1
28
+ 65
29
+ 49
30
+ 5
31
+ 3
32
+ 13
33
+ 45
34
+ 2
35
+ 6
36
+ 12
37
+ 7
38
+ 7
39
+ 12
40
+ 7
41
+ 8
42
+ 12
43
+ 65
44
+ 12
45
+ 49
46
+ 9
47
+ 4
48
+ 15
49
+ 48
50
+ 7
51
+ 15
52
+ 26
53
+ 93
54
+ 0
55
+ 15
56
+ 29
57
+ 57
58
+ 0
59
+ 5
60
+ 7
61
+ 10
62
+ 64
63
+ 47
64
+ 49
65
+ 1
66
+ 1
67
+ 30
68
+ 8
69
+ 114
70
+ 26
71
+ 93
72
+ 1
73
+ 15
74
+ 24
75
+ 13
76
+ 45
77
+ 11
78
+ 12
79
+ 12
80
+ 49
81
+ 13
82
+ 1
83
+ 10
84
+ 74
85
+ 8
86
+ 109
87
+ 15
88
+ 45
89
+ 2
90
+ 14
91
+ 7
92
+ 15
93
+ 1
94
+ 45
95
+ 4
96
+ 16
97
+ 49
98
+ 17
99
+ 3
100
+ 13
101
+ 45
102
+ 2
103
+ 18
104
+ 12
105
+ 7
106
+ 7
107
+ 12
108
+ 7
109
+ 19
110
+ 12
111
+ 65
112
+ 12
113
+ 49
114
+ 9
115
+ 4
116
+ 15
117
+ 48
118
+ 7
119
+ 25
120
+ 8
121
+ 114
122
+ 15
123
+ 92
124
+ 1
125
+ 27
126
+ 34
127
+ 92
128
+ 0
129
+ 27
130
+ 15
131
+ 2
132
+ 11
133
+ I
134
+ 8
135
+ I
136
+ 0
137
+ I
138
+ 0
139
+ I
140
+ 0
141
+ n
142
+ p
143
+ 20
144
+ s
145
+ 6
146
+ thread
147
+ x
148
+ 7
149
+ require
150
+ x
151
+ 8
152
+ Rubinius
153
+ n
154
+ x
155
+ 6
156
+ Atomic
157
+ x
158
+ 10
159
+ open_class
160
+ n
161
+ x
162
+ 14
163
+ __class_init__
164
+ M
165
+ 1
166
+ n
167
+ n
168
+ x
169
+ 6
170
+ Atomic
171
+ i
172
+ 107
173
+ 5
174
+ 66
175
+ 45
176
+ 0
177
+ 1
178
+ 7
179
+ 2
180
+ 45
181
+ 3
182
+ 4
183
+ 65
184
+ 49
185
+ 5
186
+ 3
187
+ 15
188
+ 1
189
+ 15
190
+ 45
191
+ 0
192
+ 6
193
+ 7
194
+ 7
195
+ 7
196
+ 8
197
+ 65
198
+ 67
199
+ 48
200
+ 9
201
+ 49
202
+ 10
203
+ 4
204
+ 15
205
+ 45
206
+ 0
207
+ 11
208
+ 7
209
+ 12
210
+ 7
211
+ 13
212
+ 65
213
+ 67
214
+ 48
215
+ 9
216
+ 49
217
+ 10
218
+ 4
219
+ 15
220
+ 45
221
+ 0
222
+ 14
223
+ 7
224
+ 15
225
+ 7
226
+ 16
227
+ 65
228
+ 67
229
+ 48
230
+ 9
231
+ 49
232
+ 10
233
+ 4
234
+ 15
235
+ 45
236
+ 0
237
+ 17
238
+ 7
239
+ 18
240
+ 7
241
+ 19
242
+ 65
243
+ 67
244
+ 48
245
+ 9
246
+ 49
247
+ 10
248
+ 4
249
+ 15
250
+ 45
251
+ 0
252
+ 20
253
+ 7
254
+ 21
255
+ 7
256
+ 22
257
+ 65
258
+ 67
259
+ 48
260
+ 9
261
+ 49
262
+ 10
263
+ 4
264
+ 15
265
+ 45
266
+ 0
267
+ 23
268
+ 7
269
+ 24
270
+ 7
271
+ 25
272
+ 65
273
+ 67
274
+ 48
275
+ 9
276
+ 49
277
+ 10
278
+ 4
279
+ 11
280
+ I
281
+ 5
282
+ I
283
+ 0
284
+ I
285
+ 0
286
+ I
287
+ 0
288
+ n
289
+ p
290
+ 26
291
+ x
292
+ 8
293
+ Rubinius
294
+ n
295
+ x
296
+ 21
297
+ ConcurrentUpdateError
298
+ x
299
+ 11
300
+ ThreadError
301
+ n
302
+ x
303
+ 10
304
+ open_class
305
+ n
306
+ x
307
+ 10
308
+ initialize
309
+ M
310
+ 1
311
+ n
312
+ n
313
+ x
314
+ 10
315
+ initialize
316
+ i
317
+ 38
318
+ 23
319
+ 0
320
+ 10
321
+ 8
322
+ 1
323
+ 19
324
+ 0
325
+ 15
326
+ 45
327
+ 0
328
+ 1
329
+ 13
330
+ 71
331
+ 2
332
+ 47
333
+ 9
334
+ 30
335
+ 47
336
+ 48
337
+ 3
338
+ 13
339
+ 20
340
+ 0
341
+ 47
342
+ 49
343
+ 4
344
+ 1
345
+ 15
346
+ 8
347
+ 35
348
+ 20
349
+ 0
350
+ 49
351
+ 2
352
+ 1
353
+ 38
354
+ 5
355
+ 11
356
+ I
357
+ 4
358
+ I
359
+ 1
360
+ I
361
+ 0
362
+ I
363
+ 1
364
+ n
365
+ p
366
+ 6
367
+ x
368
+ 17
369
+ InternalReference
370
+ n
371
+ x
372
+ 3
373
+ new
374
+ x
375
+ 8
376
+ allocate
377
+ x
378
+ 10
379
+ initialize
380
+ x
381
+ 4
382
+ @ref
383
+ p
384
+ 5
385
+ I
386
+ 0
387
+ I
388
+ 7
389
+ I
390
+ 8
391
+ I
392
+ 8
393
+ I
394
+ 26
395
+ x
396
+ 44
397
+ /Users/headius/projects/atomic/lib/atomic.rb
398
+ p
399
+ 1
400
+ x
401
+ 5
402
+ value
403
+ x
404
+ 17
405
+ method_visibility
406
+ x
407
+ 15
408
+ add_defn_method
409
+ n
410
+ x
411
+ 5
412
+ value
413
+ M
414
+ 1
415
+ n
416
+ n
417
+ x
418
+ 5
419
+ value
420
+ i
421
+ 5
422
+ 39
423
+ 0
424
+ 48
425
+ 1
426
+ 11
427
+ I
428
+ 1
429
+ I
430
+ 0
431
+ I
432
+ 0
433
+ I
434
+ 0
435
+ n
436
+ p
437
+ 2
438
+ x
439
+ 4
440
+ @ref
441
+ x
442
+ 3
443
+ get
444
+ p
445
+ 5
446
+ I
447
+ 0
448
+ I
449
+ b
450
+ I
451
+ 0
452
+ I
453
+ c
454
+ I
455
+ 5
456
+ x
457
+ 44
458
+ /Users/headius/projects/atomic/lib/atomic.rb
459
+ p
460
+ 0
461
+ n
462
+ x
463
+ 6
464
+ value=
465
+ M
466
+ 1
467
+ n
468
+ n
469
+ x
470
+ 6
471
+ value=
472
+ i
473
+ 11
474
+ 39
475
+ 0
476
+ 20
477
+ 0
478
+ 49
479
+ 1
480
+ 1
481
+ 15
482
+ 20
483
+ 0
484
+ 11
485
+ I
486
+ 3
487
+ I
488
+ 1
489
+ I
490
+ 1
491
+ I
492
+ 1
493
+ n
494
+ p
495
+ 2
496
+ x
497
+ 4
498
+ @ref
499
+ x
500
+ 3
501
+ set
502
+ p
503
+ 7
504
+ I
505
+ 0
506
+ I
507
+ f
508
+ I
509
+ 0
510
+ I
511
+ 10
512
+ I
513
+ 8
514
+ I
515
+ 11
516
+ I
517
+ b
518
+ x
519
+ 44
520
+ /Users/headius/projects/atomic/lib/atomic.rb
521
+ p
522
+ 1
523
+ x
524
+ 9
525
+ new_value
526
+ n
527
+ x
528
+ 4
529
+ swap
530
+ M
531
+ 1
532
+ n
533
+ n
534
+ x
535
+ 4
536
+ swap
537
+ i
538
+ 8
539
+ 39
540
+ 0
541
+ 20
542
+ 0
543
+ 49
544
+ 1
545
+ 1
546
+ 11
547
+ I
548
+ 3
549
+ I
550
+ 1
551
+ I
552
+ 1
553
+ I
554
+ 1
555
+ n
556
+ p
557
+ 2
558
+ x
559
+ 4
560
+ @ref
561
+ x
562
+ 11
563
+ get_and_set
564
+ p
565
+ 5
566
+ I
567
+ 0
568
+ I
569
+ 14
570
+ I
571
+ 0
572
+ I
573
+ 15
574
+ I
575
+ 8
576
+ x
577
+ 44
578
+ /Users/headius/projects/atomic/lib/atomic.rb
579
+ p
580
+ 1
581
+ x
582
+ 9
583
+ new_value
584
+ n
585
+ x
586
+ 6
587
+ update
588
+ M
589
+ 1
590
+ n
591
+ n
592
+ x
593
+ 6
594
+ update
595
+ i
596
+ 49
597
+ 26
598
+ 93
599
+ 0
600
+ 15
601
+ 29
602
+ 17
603
+ 0
604
+ 5
605
+ 56
606
+ 0
607
+ 47
608
+ 50
609
+ 1
610
+ 0
611
+ 30
612
+ 8
613
+ 45
614
+ 26
615
+ 93
616
+ 1
617
+ 15
618
+ 24
619
+ 13
620
+ 45
621
+ 2
622
+ 3
623
+ 12
624
+ 49
625
+ 4
626
+ 1
627
+ 10
628
+ 34
629
+ 8
630
+ 40
631
+ 15
632
+ 8
633
+ 4
634
+ 25
635
+ 8
636
+ 45
637
+ 15
638
+ 92
639
+ 1
640
+ 27
641
+ 34
642
+ 92
643
+ 0
644
+ 27
645
+ 11
646
+ I
647
+ 5
648
+ I
649
+ 0
650
+ I
651
+ 0
652
+ I
653
+ 0
654
+ n
655
+ p
656
+ 5
657
+ M
658
+ 1
659
+ p
660
+ 2
661
+ x
662
+ 9
663
+ for_block
664
+ t
665
+ n
666
+ x
667
+ 6
668
+ update
669
+ i
670
+ 9
671
+ 57
672
+ 19
673
+ 0
674
+ 15
675
+ 20
676
+ 0
677
+ 60
678
+ 1
679
+ 11
680
+ I
681
+ 3
682
+ I
683
+ 1
684
+ I
685
+ 1
686
+ I
687
+ 1
688
+ n
689
+ p
690
+ 0
691
+ p
692
+ 3
693
+ I
694
+ 0
695
+ I
696
+ 1d
697
+ I
698
+ 9
699
+ x
700
+ 44
701
+ /Users/headius/projects/atomic/lib/atomic.rb
702
+ p
703
+ 1
704
+ x
705
+ 1
706
+ v
707
+ x
708
+ 10
709
+ try_update
710
+ x
711
+ 21
712
+ ConcurrentUpdateError
713
+ n
714
+ x
715
+ 3
716
+ ===
717
+ p
718
+ 9
719
+ I
720
+ 0
721
+ I
722
+ 1b
723
+ I
724
+ 0
725
+ I
726
+ 1d
727
+ I
728
+ 16
729
+ I
730
+ 1e
731
+ I
732
+ 23
733
+ I
734
+ 1f
735
+ I
736
+ 31
737
+ x
738
+ 44
739
+ /Users/headius/projects/atomic/lib/atomic.rb
740
+ p
741
+ 0
742
+ n
743
+ x
744
+ 10
745
+ try_update
746
+ M
747
+ 1
748
+ n
749
+ n
750
+ x
751
+ 10
752
+ try_update
753
+ i
754
+ 43
755
+ 39
756
+ 0
757
+ 48
758
+ 1
759
+ 19
760
+ 0
761
+ 15
762
+ 20
763
+ 0
764
+ 60
765
+ 1
766
+ 19
767
+ 1
768
+ 15
769
+ 39
770
+ 0
771
+ 20
772
+ 0
773
+ 20
774
+ 1
775
+ 49
776
+ 2
777
+ 2
778
+ 9
779
+ 28
780
+ 1
781
+ 8
782
+ 39
783
+ 5
784
+ 45
785
+ 3
786
+ 4
787
+ 7
788
+ 5
789
+ 64
790
+ 47
791
+ 49
792
+ 6
793
+ 2
794
+ 15
795
+ 20
796
+ 1
797
+ 11
798
+ I
799
+ 5
800
+ I
801
+ 2
802
+ I
803
+ 0
804
+ I
805
+ 0
806
+ n
807
+ p
808
+ 7
809
+ x
810
+ 4
811
+ @ref
812
+ x
813
+ 3
814
+ get
815
+ x
816
+ 15
817
+ compare_and_set
818
+ x
819
+ 21
820
+ ConcurrentUpdateError
821
+ n
822
+ s
823
+ 13
824
+ Update failed
825
+ x
826
+ 5
827
+ raise
828
+ p
829
+ 13
830
+ I
831
+ 0
832
+ I
833
+ 23
834
+ I
835
+ 0
836
+ I
837
+ 24
838
+ I
839
+ 7
840
+ I
841
+ 25
842
+ I
843
+ e
844
+ I
845
+ 26
846
+ I
847
+ 1c
848
+ I
849
+ 27
850
+ I
851
+ 28
852
+ I
853
+ 29
854
+ I
855
+ 2b
856
+ x
857
+ 44
858
+ /Users/headius/projects/atomic/lib/atomic.rb
859
+ p
860
+ 2
861
+ x
862
+ 9
863
+ old_value
864
+ x
865
+ 9
866
+ new_value
867
+ p
868
+ 15
869
+ I
870
+ 2
871
+ I
872
+ 4
873
+ I
874
+ 11
875
+ I
876
+ 7
877
+ I
878
+ 20
879
+ I
880
+ b
881
+ I
882
+ 2f
883
+ I
884
+ f
885
+ I
886
+ 3e
887
+ I
888
+ 14
889
+ I
890
+ 4d
891
+ I
892
+ 1b
893
+ I
894
+ 5c
895
+ I
896
+ 23
897
+ I
898
+ 6b
899
+ x
900
+ 44
901
+ /Users/headius/projects/atomic/lib/atomic.rb
902
+ p
903
+ 0
904
+ x
905
+ 13
906
+ attach_method
907
+ s
908
+ 16
909
+ atomic_reference
910
+ x
911
+ 9
912
+ LoadError
913
+ n
914
+ x
915
+ 3
916
+ ===
917
+ n
918
+ x
919
+ 17
920
+ InternalReference
921
+ n
922
+ x
923
+ 16
924
+ open_class_under
925
+ n
926
+ M
927
+ 1
928
+ n
929
+ n
930
+ x
931
+ 17
932
+ InternalReference
933
+ i
934
+ 77
935
+ 5
936
+ 66
937
+ 45
938
+ 0
939
+ 1
940
+ 7
941
+ 2
942
+ 7
943
+ 3
944
+ 65
945
+ 67
946
+ 48
947
+ 4
948
+ 49
949
+ 5
950
+ 4
951
+ 15
952
+ 45
953
+ 0
954
+ 6
955
+ 7
956
+ 7
957
+ 7
958
+ 8
959
+ 65
960
+ 67
961
+ 48
962
+ 4
963
+ 49
964
+ 5
965
+ 4
966
+ 15
967
+ 45
968
+ 0
969
+ 9
970
+ 7
971
+ 10
972
+ 7
973
+ 11
974
+ 65
975
+ 67
976
+ 48
977
+ 4
978
+ 49
979
+ 5
980
+ 4
981
+ 15
982
+ 45
983
+ 0
984
+ 12
985
+ 7
986
+ 13
987
+ 7
988
+ 14
989
+ 65
990
+ 67
991
+ 48
992
+ 4
993
+ 49
994
+ 5
995
+ 4
996
+ 15
997
+ 45
998
+ 0
999
+ 15
1000
+ 7
1001
+ 16
1002
+ 7
1003
+ 17
1004
+ 65
1005
+ 67
1006
+ 48
1007
+ 4
1008
+ 49
1009
+ 5
1010
+ 4
1011
+ 11
1012
+ I
1013
+ 5
1014
+ I
1015
+ 0
1016
+ I
1017
+ 0
1018
+ I
1019
+ 0
1020
+ n
1021
+ p
1022
+ 18
1023
+ x
1024
+ 8
1025
+ Rubinius
1026
+ n
1027
+ x
1028
+ 10
1029
+ initialize
1030
+ M
1031
+ 1
1032
+ n
1033
+ n
1034
+ x
1035
+ 10
1036
+ initialize
1037
+ i
1038
+ 29
1039
+ 45
1040
+ 0
1041
+ 1
1042
+ 13
1043
+ 71
1044
+ 2
1045
+ 47
1046
+ 9
1047
+ 19
1048
+ 47
1049
+ 48
1050
+ 3
1051
+ 13
1052
+ 47
1053
+ 48
1054
+ 4
1055
+ 15
1056
+ 8
1057
+ 21
1058
+ 48
1059
+ 2
1060
+ 38
1061
+ 5
1062
+ 15
1063
+ 20
1064
+ 0
1065
+ 38
1066
+ 6
1067
+ 11
1068
+ I
1069
+ 3
1070
+ I
1071
+ 1
1072
+ I
1073
+ 1
1074
+ I
1075
+ 1
1076
+ n
1077
+ p
1078
+ 7
1079
+ x
1080
+ 5
1081
+ Mutex
1082
+ n
1083
+ x
1084
+ 3
1085
+ new
1086
+ x
1087
+ 8
1088
+ allocate
1089
+ x
1090
+ 10
1091
+ initialize
1092
+ x
1093
+ 6
1094
+ @mutex
1095
+ x
1096
+ 6
1097
+ @value
1098
+ p
1099
+ 7
1100
+ I
1101
+ 0
1102
+ I
1103
+ 32
1104
+ I
1105
+ 0
1106
+ I
1107
+ 33
1108
+ I
1109
+ 18
1110
+ I
1111
+ 34
1112
+ I
1113
+ 1d
1114
+ x
1115
+ 44
1116
+ /Users/headius/projects/atomic/lib/atomic.rb
1117
+ p
1118
+ 1
1119
+ x
1120
+ 5
1121
+ value
1122
+ x
1123
+ 17
1124
+ method_visibility
1125
+ x
1126
+ 15
1127
+ add_defn_method
1128
+ n
1129
+ x
1130
+ 3
1131
+ get
1132
+ M
1133
+ 1
1134
+ n
1135
+ n
1136
+ x
1137
+ 3
1138
+ get
1139
+ i
1140
+ 8
1141
+ 39
1142
+ 0
1143
+ 56
1144
+ 1
1145
+ 50
1146
+ 2
1147
+ 0
1148
+ 11
1149
+ I
1150
+ 2
1151
+ I
1152
+ 0
1153
+ I
1154
+ 0
1155
+ I
1156
+ 0
1157
+ n
1158
+ p
1159
+ 3
1160
+ x
1161
+ 6
1162
+ @mutex
1163
+ M
1164
+ 1
1165
+ p
1166
+ 2
1167
+ x
1168
+ 9
1169
+ for_block
1170
+ t
1171
+ n
1172
+ x
1173
+ 3
1174
+ get
1175
+ i
1176
+ 3
1177
+ 39
1178
+ 0
1179
+ 11
1180
+ I
1181
+ 2
1182
+ I
1183
+ 0
1184
+ I
1185
+ 0
1186
+ I
1187
+ 0
1188
+ I
1189
+ -2
1190
+ p
1191
+ 1
1192
+ x
1193
+ 6
1194
+ @value
1195
+ p
1196
+ 3
1197
+ I
1198
+ 0
1199
+ I
1200
+ 38
1201
+ I
1202
+ 3
1203
+ x
1204
+ 44
1205
+ /Users/headius/projects/atomic/lib/atomic.rb
1206
+ p
1207
+ 0
1208
+ x
1209
+ 11
1210
+ synchronize
1211
+ p
1212
+ 5
1213
+ I
1214
+ 0
1215
+ I
1216
+ 37
1217
+ I
1218
+ 0
1219
+ I
1220
+ 38
1221
+ I
1222
+ 8
1223
+ x
1224
+ 44
1225
+ /Users/headius/projects/atomic/lib/atomic.rb
1226
+ p
1227
+ 0
1228
+ n
1229
+ x
1230
+ 3
1231
+ set
1232
+ M
1233
+ 1
1234
+ n
1235
+ n
1236
+ x
1237
+ 3
1238
+ set
1239
+ i
1240
+ 8
1241
+ 39
1242
+ 0
1243
+ 56
1244
+ 1
1245
+ 50
1246
+ 2
1247
+ 0
1248
+ 11
1249
+ I
1250
+ 3
1251
+ I
1252
+ 1
1253
+ I
1254
+ 1
1255
+ I
1256
+ 1
1257
+ n
1258
+ p
1259
+ 3
1260
+ x
1261
+ 6
1262
+ @mutex
1263
+ M
1264
+ 1
1265
+ p
1266
+ 2
1267
+ x
1268
+ 9
1269
+ for_block
1270
+ t
1271
+ n
1272
+ x
1273
+ 3
1274
+ set
1275
+ i
1276
+ 6
1277
+ 21
1278
+ 1
1279
+ 0
1280
+ 38
1281
+ 0
1282
+ 11
1283
+ I
1284
+ 2
1285
+ I
1286
+ 0
1287
+ I
1288
+ 0
1289
+ I
1290
+ 0
1291
+ I
1292
+ -2
1293
+ p
1294
+ 1
1295
+ x
1296
+ 6
1297
+ @value
1298
+ p
1299
+ 3
1300
+ I
1301
+ 0
1302
+ I
1303
+ 3c
1304
+ I
1305
+ 6
1306
+ x
1307
+ 44
1308
+ /Users/headius/projects/atomic/lib/atomic.rb
1309
+ p
1310
+ 0
1311
+ x
1312
+ 11
1313
+ synchronize
1314
+ p
1315
+ 5
1316
+ I
1317
+ 0
1318
+ I
1319
+ 3b
1320
+ I
1321
+ 0
1322
+ I
1323
+ 3c
1324
+ I
1325
+ 8
1326
+ x
1327
+ 44
1328
+ /Users/headius/projects/atomic/lib/atomic.rb
1329
+ p
1330
+ 1
1331
+ x
1332
+ 9
1333
+ new_value
1334
+ n
1335
+ x
1336
+ 11
1337
+ get_and_set
1338
+ M
1339
+ 1
1340
+ n
1341
+ n
1342
+ x
1343
+ 11
1344
+ get_and_set
1345
+ i
1346
+ 8
1347
+ 39
1348
+ 0
1349
+ 56
1350
+ 1
1351
+ 50
1352
+ 2
1353
+ 0
1354
+ 11
1355
+ I
1356
+ 3
1357
+ I
1358
+ 1
1359
+ I
1360
+ 1
1361
+ I
1362
+ 1
1363
+ n
1364
+ p
1365
+ 3
1366
+ x
1367
+ 6
1368
+ @mutex
1369
+ M
1370
+ 1
1371
+ p
1372
+ 2
1373
+ x
1374
+ 9
1375
+ for_block
1376
+ t
1377
+ n
1378
+ x
1379
+ 11
1380
+ get_and_set
1381
+ i
1382
+ 14
1383
+ 39
1384
+ 0
1385
+ 19
1386
+ 0
1387
+ 15
1388
+ 21
1389
+ 1
1390
+ 0
1391
+ 38
1392
+ 0
1393
+ 15
1394
+ 20
1395
+ 0
1396
+ 11
1397
+ I
1398
+ 3
1399
+ I
1400
+ 1
1401
+ I
1402
+ 0
1403
+ I
1404
+ 0
1405
+ I
1406
+ -2
1407
+ p
1408
+ 1
1409
+ x
1410
+ 6
1411
+ @value
1412
+ p
1413
+ 9
1414
+ I
1415
+ 0
1416
+ I
1417
+ 40
1418
+ I
1419
+ 0
1420
+ I
1421
+ 41
1422
+ I
1423
+ 5
1424
+ I
1425
+ 42
1426
+ I
1427
+ b
1428
+ I
1429
+ 43
1430
+ I
1431
+ e
1432
+ x
1433
+ 44
1434
+ /Users/headius/projects/atomic/lib/atomic.rb
1435
+ p
1436
+ 1
1437
+ x
1438
+ 9
1439
+ old_value
1440
+ x
1441
+ 11
1442
+ synchronize
1443
+ p
1444
+ 5
1445
+ I
1446
+ 0
1447
+ I
1448
+ 3f
1449
+ I
1450
+ 0
1451
+ I
1452
+ 40
1453
+ I
1454
+ 8
1455
+ x
1456
+ 44
1457
+ /Users/headius/projects/atomic/lib/atomic.rb
1458
+ p
1459
+ 1
1460
+ x
1461
+ 9
1462
+ new_value
1463
+ n
1464
+ x
1465
+ 15
1466
+ compare_and_set
1467
+ M
1468
+ 1
1469
+ n
1470
+ n
1471
+ x
1472
+ 15
1473
+ compare_and_set
1474
+ i
1475
+ 57
1476
+ 39
1477
+ 0
1478
+ 48
1479
+ 1
1480
+ 9
1481
+ 9
1482
+ 1
1483
+ 8
1484
+ 11
1485
+ 3
1486
+ 11
1487
+ 15
1488
+ 29
1489
+ 41
1490
+ 1
1491
+ 26
1492
+ 93
1493
+ 0
1494
+ 15
1495
+ 39
1496
+ 2
1497
+ 20
1498
+ 0
1499
+ 49
1500
+ 3
1501
+ 1
1502
+ 9
1503
+ 31
1504
+ 1
1505
+ 8
1506
+ 33
1507
+ 3
1508
+ 32
1509
+ 15
1510
+ 20
1511
+ 1
1512
+ 38
1513
+ 2
1514
+ 30
1515
+ 8
1516
+ 49
1517
+ 26
1518
+ 39
1519
+ 0
1520
+ 48
1521
+ 4
1522
+ 15
1523
+ 27
1524
+ 34
1525
+ 39
1526
+ 0
1527
+ 48
1528
+ 4
1529
+ 15
1530
+ 15
1531
+ 2
1532
+ 11
1533
+ I
1534
+ 5
1535
+ I
1536
+ 2
1537
+ I
1538
+ 2
1539
+ I
1540
+ 2
1541
+ n
1542
+ p
1543
+ 5
1544
+ x
1545
+ 6
1546
+ @mutex
1547
+ x
1548
+ 8
1549
+ try_lock
1550
+ x
1551
+ 6
1552
+ @value
1553
+ x
1554
+ 6
1555
+ equal?
1556
+ x
1557
+ 6
1558
+ unlock
1559
+ p
1560
+ 13
1561
+ I
1562
+ 0
1563
+ I
1564
+ 47
1565
+ I
1566
+ 0
1567
+ I
1568
+ 48
1569
+ I
1570
+ c
1571
+ I
1572
+ 4a
1573
+ I
1574
+ 22
1575
+ I
1576
+ 4b
1577
+ I
1578
+ 2a
1579
+ I
1580
+ 4d
1581
+ I
1582
+ 37
1583
+ I
1584
+ 4f
1585
+ I
1586
+ 39
1587
+ x
1588
+ 44
1589
+ /Users/headius/projects/atomic/lib/atomic.rb
1590
+ p
1591
+ 2
1592
+ x
1593
+ 9
1594
+ old_value
1595
+ x
1596
+ 9
1597
+ new_value
1598
+ p
1599
+ 11
1600
+ I
1601
+ 2
1602
+ I
1603
+ 32
1604
+ I
1605
+ 11
1606
+ I
1607
+ 37
1608
+ I
1609
+ 20
1610
+ I
1611
+ 3b
1612
+ I
1613
+ 2f
1614
+ I
1615
+ 3f
1616
+ I
1617
+ 3e
1618
+ I
1619
+ 47
1620
+ I
1621
+ 4d
1622
+ x
1623
+ 44
1624
+ /Users/headius/projects/atomic/lib/atomic.rb
1625
+ p
1626
+ 0
1627
+ p
1628
+ 11
1629
+ I
1630
+ 0
1631
+ I
1632
+ 1
1633
+ I
1634
+ 9
1635
+ I
1636
+ 3
1637
+ I
1638
+ 27
1639
+ I
1640
+ 2e
1641
+ I
1642
+ 3e
1643
+ I
1644
+ 2f
1645
+ I
1646
+ 4b
1647
+ I
1648
+ 31
1649
+ I
1650
+ 78
1651
+ x
1652
+ 44
1653
+ /Users/headius/projects/atomic/lib/atomic.rb
1654
+ p
1655
+ 0