]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
refresh (create temporary patch)
authorSean Hefty <sean.hefty@intel.com>
Wed, 25 Aug 2010 23:49:51 +0000 (16:49 -0700)
committerSean Hefty <sean.hefty@intel.com>
Wed, 25 Aug 2010 23:49:51 +0000 (16:49 -0700)
meta
patches/refresh-temp [new file with mode: 0644]

diff --git a/meta b/meta
index 2195f5457a2b12c4be492d5df58604afb1878c3a..ffec739f3b676cbcde9c5749dcd864427e35c7bb 100644 (file)
--- a/meta
+++ b/meta
@@ -1,7 +1,8 @@
 Version: 1
-Previous: b75334f8dc2448d4cb9bbe148a65b1f19cf2f701
-Head: 7b8e47f55413b6756b2fa378c16f5e21b98f4690
+Previous: c7ff2c5ccd80c7ad711bcb4f0742963b63fefde5
+Head: 96a23da3a4b575a108d653346bc033c8bb4d4270
 Applied:
   atomic: 7b8e47f55413b6756b2fa378c16f5e21b98f4690
+  refresh-temp: 96a23da3a4b575a108d653346bc033c8bb4d4270
 Unapplied:
 Hidden:
diff --git a/patches/refresh-temp b/patches/refresh-temp
new file mode 100644 (file)
index 0000000..be5fd6a
--- /dev/null
@@ -0,0 +1,77 @@
+Bottom: 59952986bf11b417c6da864108e5278e0fbca08a
+Top:    b4ed043a0fc86707acda56000b3096e59867bfbe
+Author: Sean Hefty <sean.hefty@intel.com>
+Date:   2010-08-25 16:49:51 -0700
+
+Refresh of atomic
+
+---
+
+diff --git a/Makefile.am b/Makefile.am
+index 4bd4bd5..f443091 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2,10 +2,6 @@ INCLUDES = -I$(srcdir)/include -I$(srcdir)/linux
+ AM_CFLAGS = -g -Wall -D_GNU_SOURCE
+-if DEFINE_ATOMICS
+-      AM_CFLAGS += -DDEFINE_ATOMICS
+-endif
+-
+ bin_PROGRAMS = util/ib_acme
+ sbin_PROGRAMS = svc/ib_acm
+ svc_ib_acm_SOURCES = src/acm.c
+diff --git a/configure.in b/configure.in
+index ce55f75..dfddeac 100755
+--- a/configure.in
++++ b/configure.in
+@@ -41,15 +41,12 @@ fi
\r
+ dnl Check for gcc atomic intrinsics\r
+ AC_MSG_CHECKING(compiler support for atomics)\r
+-AC_TRY_LINK([],\r
++AC_TRY_LINK([int i = 0;],\r
++    [ return __sync_add_and_fetch(&i, 1) != __sync_sub_and_fetch(&i, 1); ],\r
++    [ AC_MSG_RESULT(yes) ],\r
+     [\r
+-        int i = 0;\r
+-        return __sync_add_and_fetch(&i, 1) == __sync_sub_and_fetch(&i, 1) + 1;\r
+-    ],\r
+-    AC_MSG_RESULT(yes),\r
+-    [\r
+-        AC_MSG_RESULT(no - defining atomics)\r
+-        AC_DEFINE(DEFINE_ATOMICS, [], [Set to 1 to implement atomics])\r
++        AC_MSG_RESULT(no)\r
++        AC_DEFINE(DEFINE_ATOMICS, 1, [Set to 1 to implement atomics])\r
+     ])\r
\r
+ AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script,\r
+diff --git a/linux/osd.h b/linux/osd.h
+index 9a167a7..9dacab9 100644
+--- a/linux/osd.h
++++ b/linux/osd.h
+@@ -68,17 +68,17 @@
+ #if DEFINE_ATOMICS\r
+ typedef struct { pthread_mutex_t mut; int val; } atomic_t;\r
+ #define atomic_inc(v) { \\r
+-      int v;\r
++      int x;\r
+       pthread_mutex_lock(&(v)->mut); \\r
+-      v = ++val; \\r
++      x = ++val; \\r
+       pthread_mutex_unlock(&(v)->mut); \\r
+-      return v; }\r
++      return x; }\r
+ #define atomic_dec(v) { \\r
+-      int v;\r
++      int x;\r
+       pthread_mutex_lock(&(v)->mut); \\r
+-      v = --val; \\r
++      x = --val; \\r
+       pthread_mutex_unlock(&(v)->mut); \\r
+-      return v; }\r
++      return x; }\r
+ #define atomic_init(v) { pthread_mutex_init(&(v)->mut, NULL); (v)->val = 0); }\r
+ #else\r
+ typedef struct { volatile int val; } atomic_t;