]> sourceware.org Git - systemtap.git/commitdiff
Put the 'stapdyn_big_dumb_lock' back.
authorDavid Smith <dsmith@redhat.com>
Fri, 5 Oct 2012 18:15:17 +0000 (13:15 -0500)
committerDavid Smith <dsmith@redhat.com>
Fri, 5 Oct 2012 18:15:17 +0000 (13:15 -0500)
* runtime/dyninst/runtime.h: Put the 'stapdyn_big_dumb_lock' back until
  the print buffers are properly multithreaded.

runtime/dyninst/runtime.h

index 7108ed135753dbd0a81113bc5b9386d036d862b8..3165f15bf673271742ea3007fca497cf5c76706d 100644 (file)
@@ -71,8 +71,18 @@ static inline int pseudo_atomic_cmpxchg(atomic_t *v, int oldval, int newval)
 }
 
 
-#define preempt_disable() 0
-#define preempt_enable_no_resched() 0
+static pthread_mutex_t stapdyn_big_dumb_lock = PTHREAD_MUTEX_INITIALIZER;
+
+static inline void preempt_disable(void)
+{
+       pthread_mutex_lock(&stapdyn_big_dumb_lock);
+}
+
+static inline void preempt_enable_no_resched(void)
+{
+       pthread_mutex_unlock(&stapdyn_big_dumb_lock);
+}
+
 
 #include "linux_defs.h"
 
This page took 0.026484 seconds and 5 git commands to generate.