]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
refresh
authorSean Hefty <sean.hefty@intel.com>
Thu, 10 May 2012 17:42:22 +0000 (10:42 -0700)
committerSean Hefty <sean.hefty@intel.com>
Thu, 10 May 2012 17:42:22 +0000 (10:42 -0700)
meta
patches/refresh-temp [deleted file]
patches/rs-locking

diff --git a/meta b/meta
index dfad6d314707e1562d402dd53834afcdc0a82016..cf37ab71551805d4c7debae9d850ddfa9080b14f 100644 (file)
--- a/meta
+++ b/meta
@@ -1,9 +1,8 @@
 Version: 1
-Previous: ee30fe5ba87986586d9ca37dc81903f748408e98
-Head: bb33098ac80751921e3ee56270b6ae11a7bccdd8
+Previous: a937c02e3e54b740c4e9ecb039ec14fed0475662
+Head: ec6a8efe211b0dc98548443c2e0d67e2c355351f
 Applied:
-  rs-locking: e69294e4ca7fb71f62ca32fc9f0ab385813cfe58
-  refresh-temp: bb33098ac80751921e3ee56270b6ae11a7bccdd8
+  rs-locking: ec6a8efe211b0dc98548443c2e0d67e2c355351f
 Unapplied:
   comp_locks: b89aab130b4619806557e11e6b9c10964f00743f
   preload: 5dfe7abc07064485c5100e04e5412279244c2bc3
diff --git a/patches/refresh-temp b/patches/refresh-temp
deleted file mode 100644 (file)
index cf5cf6f..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-Bottom: b2e4cd7d670a626fa22b05cff6a1dccc973e9f0d
-Top:    3fcdf48082614bb29c44242534cfeecb47e07114
-Author: Sean Hefty <sean.hefty@intel.com>
-Date:   2012-05-10 10:42:21 -0700
-
-Refresh of rs-locking
-
----
-
-diff --git a/configure.in b/configure.in
-index 238ee59..fa90fcb 100644
---- a/configure.in
-+++ b/configure.in
-@@ -48,6 +48,16 @@ AC_CHECK_MEMBER(struct ibv_path_record.service_id, [],
-     AC_DEFINE(DEFINE_PATH_RECORD, 1, [adding path record definition]),
-     [#include <infiniband/sa.h>])
-+dnl Check for gcc atomic intrinsics
-+AC_MSG_CHECKING(compiler support for atomics)
-+AC_TRY_LINK([int i = 0;],
-+    [ return __sync_add_and_fetch(&i, 1) != __sync_sub_and_fetch(&i, 1); ],
-+    [ AC_MSG_RESULT(yes) ],
-+    [
-+        AC_MSG_RESULT(no)
-+        AC_DEFINE(DEFINE_ATOMICS, 1, [Set to 1 to implement atomics])
-+    ])
-+
- dnl Checks for header files.
- AC_HEADER_STDC
- if test "$disable_libcheck" != "yes"; then
-diff --git a/src/cma.h b/src/cma.h
-index f28020e..7703fe8 100644
---- a/src/cma.h
-+++ b/src/cma.h
-@@ -72,6 +72,13 @@ static inline uint64_t ntohll(uint64_t x) { return x; }
- /*
-  * Fast synchronization for low contention locking.
-  */
-+#if DEFINE_ATOMICS
-+#define fastlock_t pthread_mutex_t
-+#define fastlock_init(lock) pthread_mutex_init(lock, NULL)
-+#define fastlock_destroy(lock) pthread_mutex_destroy(lock)
-+#define fastlock_acquire(lock) pthread_mutex_lock(lock)
-+#define fastlock_release(lock) pthread_mutex_unlock(lock)
-+#else
- typedef struct {
-       sem_t sem;
-       volatile int cnt;
-@@ -95,6 +102,7 @@ static inline void fastlock_release(fastlock_t *lock)
-       if (__sync_sub_and_fetch(&lock->cnt, 1) > 0)
-               sem_post(&lock->sem);
- }
-+#endif /* DEFINE_ATOMICS */
- int ucma_complete(struct rdma_cm_id *id);
- static inline int ERR(int err)
index b037eeae1682a5a151e625f77944d74a30686b37..aa3a2ba5a15f90228990e0818c9bbd4bb25bf717 100644 (file)
@@ -1,5 +1,5 @@
 Bottom: de666c51520c9988ea3a07e332fa0402fdef6010
-Top:    b2e4cd7d670a626fa22b05cff6a1dccc973e9f0d
+Top:    3fcdf48082614bb29c44242534cfeecb47e07114
 Author: Sean Hefty <sean.hefty@intel.com>
 Date:   2012-05-07 17:16:47 -0700
 
@@ -29,8 +29,29 @@ Signed-off-by: Sean Hefty <sean.hefty@intel.com>
 
 ---
 
+diff --git a/configure.in b/configure.in
+index 238ee59..fa90fcb 100644
+--- a/configure.in
++++ b/configure.in
+@@ -48,6 +48,16 @@ AC_CHECK_MEMBER(struct ibv_path_record.service_id, [],
+     AC_DEFINE(DEFINE_PATH_RECORD, 1, [adding path record definition]),
+     [#include <infiniband/sa.h>])
++dnl Check for gcc atomic intrinsics
++AC_MSG_CHECKING(compiler support for atomics)
++AC_TRY_LINK([int i = 0;],
++    [ return __sync_add_and_fetch(&i, 1) != __sync_sub_and_fetch(&i, 1); ],
++    [ AC_MSG_RESULT(yes) ],
++    [
++        AC_MSG_RESULT(no)
++        AC_DEFINE(DEFINE_ATOMICS, 1, [Set to 1 to implement atomics])
++    ])
++
+ dnl Checks for header files.
+ AC_HEADER_STDC
+ if test "$disable_libcheck" != "yes"; then
 diff --git a/src/cma.h b/src/cma.h
-index 91528c0..f28020e 100644
+index 91528c0..7703fe8 100644
 --- a/src/cma.h
 +++ b/src/cma.h
 @@ -42,6 +42,7 @@
@@ -41,13 +62,20 @@ index 91528c0..f28020e 100644
  
  #include <rdma/rdma_cma.h>
  
-@@ -68,6 +69,33 @@ static inline uint64_t ntohll(uint64_t x) { return x; }
+@@ -68,6 +69,41 @@ static inline uint64_t ntohll(uint64_t x) { return x; }
  
  #define min(a, b) (a < b ? a : b)
  
 +/*
 + * Fast synchronization for low contention locking.
 + */
++#if DEFINE_ATOMICS
++#define fastlock_t pthread_mutex_t
++#define fastlock_init(lock) pthread_mutex_init(lock, NULL)
++#define fastlock_destroy(lock) pthread_mutex_destroy(lock)
++#define fastlock_acquire(lock) pthread_mutex_lock(lock)
++#define fastlock_release(lock) pthread_mutex_unlock(lock)
++#else
 +typedef struct {
 +      sem_t sem;
 +      volatile int cnt;
@@ -71,6 +99,7 @@ index 91528c0..f28020e 100644
 +      if (__sync_sub_and_fetch(&lock->cnt, 1) > 0)
 +              sem_post(&lock->sem);
 +}
++#endif /* DEFINE_ATOMICS */
 +
  int ucma_complete(struct rdma_cm_id *id);
  static inline int ERR(int err)