Sha256: 77676b5c7d0fdd5973c5bee3062d8cdf42ec09d9871aa84ffaf961013a2b0b22

Contents?: true

Size: 894 Bytes

Versions: 12

Compression:

Stored size: 894 Bytes

Contents

#include <ruby.h>

#include "atomic_reference.h"

// module and class definitions

static VALUE rb_mConcurrent;
static VALUE rb_cAtomic;

// Init_concurrent_ruby_ext

void Init_concurrent_ruby_ext() {

  // define modules and classes
  rb_mConcurrent = rb_define_module("Concurrent");
  rb_cAtomic = rb_define_class_under(rb_mConcurrent, "CAtomic", rb_cObject);

  // CAtomic
  rb_define_alloc_func(rb_cAtomic, ir_alloc);
  rb_define_method(rb_cAtomic, "initialize", ir_initialize, -1);
  rb_define_method(rb_cAtomic, "get", ir_get, 0);
  rb_define_method(rb_cAtomic, "value", ir_get, 0);
  rb_define_method(rb_cAtomic, "set", ir_set, 1);
  rb_define_method(rb_cAtomic, "value=", ir_set, 1);
  rb_define_method(rb_cAtomic, "get_and_set", ir_get_and_set, 1);
  rb_define_method(rb_cAtomic, "swap", ir_get_and_set, 1);
  rb_define_method(rb_cAtomic, "_compare_and_set", ir_compare_and_set, 2);
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
concurrent-ruby-0.7.0.rc1-x86_64-linux ext/concurrent_ruby_ext/rb_concurrent.c
concurrent-ruby-0.7.0.rc1-x86_64-darwin-13 ext/concurrent_ruby_ext/rb_concurrent.c
concurrent-ruby-0.7.0.rc1-x86-solaris-2.11 ext/concurrent_ruby_ext/rb_concurrent.c
concurrent-ruby-0.7.0.rc1-x86-mingw32 ext/concurrent_ruby_ext/rb_concurrent.c
concurrent-ruby-0.7.0.rc1-x86-linux ext/concurrent_ruby_ext/rb_concurrent.c
concurrent-ruby-0.7.0.rc1-x64-mingw32 ext/concurrent_ruby_ext/rb_concurrent.c
concurrent-ruby-0.7.0.rc0-x86_64-linux ext/concurrent_ruby_ext/rb_concurrent.c
concurrent-ruby-0.7.0.rc0-x86_64-darwin-13 ext/concurrent_ruby_ext/rb_concurrent.c
concurrent-ruby-0.7.0.rc0-x86-solaris-2.11 ext/concurrent_ruby_ext/rb_concurrent.c
concurrent-ruby-0.7.0.rc0-x86-mingw32 ext/concurrent_ruby_ext/rb_concurrent.c
concurrent-ruby-0.7.0.rc0-x86-linux ext/concurrent_ruby_ext/rb_concurrent.c
concurrent-ruby-0.7.0.rc0-x64-mingw32 ext/concurrent_ruby_ext/rb_concurrent.c