]> sourceware.org Git - systemtap.git/commitdiff
PR11759: more DEFINE_*LOCK -> DEFINE_RAW_*lock for CONFIG_PREEMPT_RT
authorFrank Ch. Eigler <fche@elastic.org>
Mon, 28 Jun 2010 00:53:37 +0000 (20:53 -0400)
committerFrank Ch. Eigler <fche@elastic.org>
Mon, 28 Jun 2010 00:54:09 +0000 (20:54 -0400)
runtime/addr-map.c
runtime/alloc.c
runtime/print_flush.c
runtime/probe_lock.h
runtime/task_finder_map.c
runtime/task_finder_vma.c
runtime/transport/control.c
runtime/uprobes/uprobes.c
runtime/uprobes2/uprobes.c

index abb723f38638e21b550c86035b61959903d52b5e..528641c9ff9b4ce5d6573e65a36b40673f0c2228 100644 (file)
@@ -28,8 +28,11 @@ struct addr_map
   struct addr_map_entry entries[0];
 };
 
+#ifdef CONFIG_PREEMPT_RT
+static DEFINE_RAW_SPINLOCK(addr_map_lock);
+#else
 static DEFINE_SPINLOCK(addr_map_lock);
-
+#endif
 static struct addr_map* blackmap;
 
 /* Find address of entry where we can insert a new one. */
index b2578e06e411aaf0c841cdb6ccfaad18a04c983f..2e22bada1b4fb2be7656d6e29928aea5b7034829 100644 (file)
@@ -35,7 +35,11 @@ static int _stp_allocated_net_memory = 0;
 static int _stp_allocated_memory = 0;
 
 #ifdef DEBUG_MEM
+#ifdef CONFIG_PREEMPT_RT
+static DEFINE_RAW_SPINLOCK(_stp_mem_lock);
+#else
 static DEFINE_SPINLOCK(_stp_mem_lock);
+#endif
 
 #define MEM_MAGIC 0xc11cf77f
 #define MEM_FENCE_SIZE 32
index 52017426e44331c7a9e3218f71f814570a768b64..c7fedf23605969f29fe92d97a22033c5ae7cef8f 100644 (file)
  * @note Preemption must be disabled to use this.
  */
 
+#ifdef CONFIG_PREEMPT_RT
+static DEFINE_RAW_SPINLOCK(_stp_print_lock);
+#else
 static DEFINE_SPINLOCK(_stp_print_lock);
+#endif
 
 void EXPORT_FN(stp_print_flush)(_stp_pbuf *pb)
 {
index 52d1850e97e3accf68d481a9f224a2a78676c4e3..e2582139339e44e0190e1c678bd1797241fc039a 100644 (file)
@@ -22,7 +22,7 @@ struct stp_probe_lock {
        atomic_t *skipped;
        #endif
 #ifdef CONFIG_PREEMPT_RT
-       raw_rwlock_t *lock
+        raw_rwlock_t *lock;
 #else
        rwlock_t *lock;
 #endif
index b770dd0edd582b41ed050bafa254dd1a5043f2a1..76371ea0e540f7eb43b477eafd6ef0a5705b71c2 100644 (file)
 // contents in interrupt context (which should only ever call 
 // stap_find_map_map_info for getting stored info). So we might
 // want to look into that if this seems a bottleneck.
+#ifdef CONFIG_PREEMPT_RT
+static DEFINE_RAW_RWLOCK(__stp_tf_map_lock);
+#else
 static DEFINE_RWLOCK(__stp_tf_map_lock);
+#endif
 
 #define __STP_TF_HASH_BITS 4
 #define __STP_TF_TABLE_SIZE (1 << __STP_TF_HASH_BITS)
index 8874f110a51768c0a57ab27f95c9d101ab7bbfa8..3d24078f6b80f393bdc1a705b02936a7f9d00b57 100644 (file)
 // contents in interrupt context (which should only ever call 
 // stap_find_vma_map_info for getting stored vma info). So we might
 // want to look into that if this seems a bottleneck.
+#ifdef CONFIG_PREEMPT_RT
+static DEFINE_RAW_RWLOCK(__stp_tf_vma_lock);
+#else
 static DEFINE_RWLOCK(__stp_tf_vma_lock);
+#endif
 
 #define __STP_TF_HASH_BITS 4
 #define __STP_TF_TABLE_SIZE (1 << __STP_TF_HASH_BITS)
index 8712a8adb15ff6a021a5f8467aa4a70da415efe8..447e5ca88cb2ee610ff1bea6868810cf71a0cd25 100644 (file)
 
 static _stp_mempool_t *_stp_pool_q;
 static struct list_head _stp_ctl_ready_q;
+#ifdef CONFIG_PREEMPT_RT
+static DEFINE_RAW_SPINLOCK(_stp_ctl_ready_lock);
+#else
 static DEFINE_SPINLOCK(_stp_ctl_ready_lock);
+#endif
 
 static void _stp_cleanup_and_exit(int send_exit);
 
index 0e48efa56bdfbf19fdc7f364162e7c755af6ab79..403de189db776c7c5e9f4a5a655af2554bca236e 100644 (file)
@@ -87,7 +87,11 @@ static DEFINE_MUTEX(uproc_mutex);
 
 /* Table of uprobe_tasks, hashed by task_struct pointer. */
 static struct hlist_head utask_table[UPROBE_TABLE_SIZE];
+#ifdef CONFIG_PREEMPT_RT
+static DEFINE_RAW_SPINLOCK(utask_table_lock);
+#else
 static DEFINE_SPINLOCK(utask_table_lock);
+#endif
 
 #define lock_uproc_table() mutex_lock(&uproc_mutex)
 #define unlock_uproc_table() mutex_unlock(&uproc_mutex)
index 7f6651159aa44c813ae49fa0983ee64f425b0e03..c70ef3eda47bde1f753a5b7d2141c9dbe8074a50 100644 (file)
@@ -87,7 +87,11 @@ static DEFINE_MUTEX(uproc_mutex);
 
 /* Table of uprobe_tasks, hashed by task_struct pointer. */
 static struct hlist_head utask_table[UPROBE_TABLE_SIZE];
+#ifdef CONFIG_PREEMPT_RT
+static DEFINE_RAW_SPINLOCK(utask_table_lock);
+#else
 static DEFINE_SPINLOCK(utask_table_lock);
+#endif
 
 #define lock_uproc_table() mutex_lock(&uproc_mutex)
 #define unlock_uproc_table() mutex_unlock(&uproc_mutex)
This page took 0.033353 seconds and 5 git commands to generate.