]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Changed a global variable into a local variable.
authorBart Van Assche <bvanassche@acm.org>
Sun, 15 Feb 2009 13:16:52 +0000 (13:16 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sun, 15 Feb 2009 13:16:52 +0000 (13:16 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9169

drd/drd_cond.c
drd/drd_cond.h
drd/drd_main.c

index 83da627389a2312982d0f73f178d1fc4473e629f..acb7ee620e703b829acc9b20810808bed2ce8aea 100644 (file)
 static void cond_cleanup(struct cond_info* p);
 
 
-/* Global variables. */
-
-Bool s_drd_report_signal_unlocked = True;
-
-
 /* Local variables. */
 
+static Bool s_drd_report_signal_unlocked = True;
 static Bool s_trace_cond;
 
 
 /* Function definitions. */
 
+void cond_set_report_signal_unlocked(const Bool r)
+{
+  s_drd_report_signal_unlocked = r;
+}
+
 void cond_set_trace(const Bool trace_cond)
 {
   s_trace_cond = trace_cond;
index abe3f4896ec332ed955ac5aa53bc8ed5de3d3453..2d27327d3ab0a77902e46de4dd96ec1f4d1be5e2 100644 (file)
 struct cond_info;
 
 
-/* Global variables. */
-
-extern Bool s_drd_report_signal_unlocked;
-
-
 /* Function declarations. */
 
+void cond_set_report_signal_unlocked(const Bool r);
 void cond_set_trace(const Bool trace_cond);
 void cond_pre_init(const Addr cond);
 void cond_post_destroy(const Addr cond);
index d61dcdabbb368489a63d9be9bc0b5ca33db04603..34c4779ecdc3244daeb523d4f30f6ca962af3a86 100644 (file)
@@ -66,6 +66,7 @@ static Bool DRD_(process_cmd_line_option)(Char* arg)
 {
   int check_stack_accesses   = -1;
   int exclusive_threshold_ms = -1;
+  int report_signal_unlocked = -1;
   int segment_merging        = -1;
   int shared_threshold_ms    = -1;
   int show_confl_seg         = -1;
@@ -84,7 +85,7 @@ static Bool DRD_(process_cmd_line_option)(Char* arg)
 
   VG_BOOL_CLO     (arg, "--check-stack-var",     check_stack_accesses)
   else VG_BOOL_CLO(arg, "--drd-stats",           DRD_(s_print_stats))
-  else VG_BOOL_CLO(arg,"--report-signal-unlocked",s_drd_report_signal_unlocked)
+  else VG_BOOL_CLO(arg,"--report-signal-unlocked",report_signal_unlocked)
   else VG_BOOL_CLO(arg, "--segment-merging",     segment_merging)
   else VG_BOOL_CLO(arg, "--show-confl-seg",      show_confl_seg)
   else VG_BOOL_CLO(arg, "--show-stack-usage",    DRD_(s_show_stack_usage))
@@ -113,6 +114,10 @@ static Bool DRD_(process_cmd_line_option)(Char* arg)
     mutex_set_lock_threshold(exclusive_threshold_ms);
     rwlock_set_exclusive_threshold(exclusive_threshold_ms);
   }
+  if (report_signal_unlocked != -1)
+  {
+    cond_set_report_signal_unlocked(report_signal_unlocked);
+  }
   if (shared_threshold_ms != -1)
   {
     rwlock_set_shared_threshold(shared_threshold_ms);