* runtime/dyninst/runtime.h: Put the 'stapdyn_big_dumb_lock' back until
the print buffers are properly multithreaded.
}
-#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"