Minor code adjustment (delete meaningless parentheses in abort messages)
authorIvan Maidanski <ivmai@mail.ru>
Mon, 20 Feb 2012 18:09:17 +0000 (22:09 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 20 Feb 2012 18:09:17 +0000 (22:09 +0400)
* os_dep.c (GC_setpagesize): Remove meaningless parentheses in abort
message.
* pthread_stop_world.c (GC_remove_allowed_signals, GC_stop_init):
Likewise.
* win32_threads.c (start_mark_threads, GC_acquire_mark_lock,
GC_release_mark_lock, GC_wait_for_reclaim, GC_notify_all_builder,
GC_wait_marker, GC_notify_all_marker, GC_thr_init): Likewise.

os_dep.c
pthread_stop_world.c
win32_threads.c

index 344c157..0046767 100644 (file)
--- a/os_dep.c
+++ b/os_dep.c
@@ -794,7 +794,7 @@ GC_INNER word GC_page_size = 0;
   {
 #   if defined(MPROTECT_VDB) || defined(PROC_VDB) || defined(USE_MMAP)
       GC_page_size = GETPAGESIZE();
-      if (!GC_page_size) ABORT("getpagesize() failed");
+      if (!GC_page_size) ABORT("getpagesize failed");
 #   else
       /* It's acceptable to fake it.    */
       GC_page_size = HBLKSIZE;
index 2632684..ae915d3 100644 (file)
@@ -83,7 +83,7 @@ STATIC void GC_remove_allowed_signals(sigset_t *set)
           || sigdelset(set, SIGQUIT) != 0
           || sigdelset(set, SIGABRT) != 0
           || sigdelset(set, SIGTERM) != 0) {
-        ABORT("sigdelset() failed");
+        ABORT("sigdelset failed");
     }
 
 #   ifdef MPROTECT_VDB
@@ -94,7 +94,7 @@ STATIC void GC_remove_allowed_signals(sigset_t *set)
             || sigdelset(set, SIGBUS) != 0
 #         endif
           ) {
-        ABORT("sigdelset() failed");
+        ABORT("sigdelset failed");
       }
 #   endif
 }
@@ -830,11 +830,11 @@ GC_INNER void GC_stop_init(void)
 #   endif
         ;
     if (sigfillset(&act.sa_mask) != 0) {
-        ABORT("sigfillset() failed");
+        ABORT("sigfillset failed");
     }
 #   ifdef GC_RTEMS_PTHREADS
       if(sigprocmask(SIG_UNBLOCK, &act.sa_mask, NULL) != 0) {
-        ABORT("rtems sigprocmask() failed");
+        ABORT("sigprocmask failed");
       }
 #   endif
     GC_remove_allowed_signals(&act.sa_mask);
@@ -858,10 +858,10 @@ GC_INNER void GC_stop_init(void)
     }
 
     /* Initialize suspend_handler_mask. It excludes SIG_THR_RESTART. */
-    if (sigfillset(&suspend_handler_mask) != 0) ABORT("sigfillset() failed");
+    if (sigfillset(&suspend_handler_mask) != 0) ABORT("sigfillset failed");
     GC_remove_allowed_signals(&suspend_handler_mask);
     if (sigdelset(&suspend_handler_mask, SIG_THR_RESTART) != 0)
-        ABORT("sigdelset() failed");
+        ABORT("sigdelset failed");
 
     /* Check for GC_RETRY_SIGNALS.      */
     if (0 != GETENV("GC_RETRY_SIGNALS")) {
index 153463a..aa8ae73 100644 (file)
@@ -1737,7 +1737,7 @@ GC_INNER void GC_get_next_stack(char *start, char *limit,
                                         TRUE /* isManualReset */,
                                         FALSE /* initialState */,
                                         NULL /* name (A/W) */)) == (HANDLE)0)
-            ABORT("CreateEvent() failed");
+            ABORT("CreateEvent failed");
         }
 #     endif
 
@@ -1823,7 +1823,7 @@ GC_INNER void GC_get_next_stack(char *start, char *limit,
 #       endif
         {
           if (WaitForSingleObject(mark_mutex_event, INFINITE) == WAIT_FAILED)
-            ABORT("WaitForSingleObject() failed");
+            ABORT("WaitForSingleObject failed");
         }
       }
 #     ifdef LOCK_STATS
@@ -1853,7 +1853,7 @@ GC_INNER void GC_get_next_stack(char *start, char *limit,
         {
           /* wake a waiter */
           if (SetEvent(mark_mutex_event) == FALSE)
-            ABORT("SetEvent() failed");
+            ABORT("SetEvent failed");
         }
     }
 
@@ -1872,10 +1872,10 @@ GC_INNER void GC_get_next_stack(char *start, char *limit,
         if (GC_fl_builder_count == 0)
           break;
         if (ResetEvent(builder_cv) == FALSE)
-          ABORT("ResetEvent() failed");
+          ABORT("ResetEvent failed");
         GC_release_mark_lock();
         if (WaitForSingleObject(builder_cv, INFINITE) == WAIT_FAILED)
-          ABORT("WaitForSingleObject() failed");
+          ABORT("WaitForSingleObject failed");
       }
       GC_release_mark_lock();
     }
@@ -1886,7 +1886,7 @@ GC_INNER void GC_get_next_stack(char *start, char *limit,
       GC_ASSERT(builder_cv != 0);
       GC_ASSERT(GC_fl_builder_count == 0);
       if (SetEvent(builder_cv) == FALSE)
-        ABORT("SetEvent() failed");
+        ABORT("SetEvent failed");
     }
 
 #   ifdef DONT_USE_SIGNALANDWAIT
@@ -1907,10 +1907,10 @@ GC_INNER void GC_get_next_stack(char *start, char *limit,
         }
 
         if (ResetEvent(event) == FALSE)
-          ABORT("ResetEvent() failed");
+          ABORT("ResetEvent failed");
         GC_release_mark_lock();
         if (WaitForSingleObject(event, INFINITE) == WAIT_FAILED)
-          ABORT("WaitForSingleObject() failed");
+          ABORT("WaitForSingleObject failed");
         GC_acquire_mark_lock();
       }
 
@@ -1923,7 +1923,7 @@ GC_INNER void GC_get_next_stack(char *start, char *limit,
           /* Notify every marker ignoring self (for efficiency).  */
           if (SetEvent(GC_marker_Id[i] != thread_id ? GC_marker_cv[i] :
                        mark_cv) == FALSE)
-            ABORT("SetEvent() failed");
+            ABORT("SetEvent failed");
         }
       }
 
@@ -1979,7 +1979,7 @@ GC_INNER void GC_get_next_stack(char *start, char *limit,
                                      mark_cv /* hObjectToWaitOn */,
                                      INFINITE /* timeout */,
                                      FALSE /* isAlertable */) == WAIT_FAILED)
-          ABORT("SignalObjectAndWait() failed");
+          ABORT("SignalObjectAndWait failed");
         /* The state of mark_cv is non-signaled here again. */
 
         if (waitcnt > 1) {
@@ -1988,7 +1988,7 @@ GC_INNER void GC_get_next_stack(char *start, char *limit,
           GC_ASSERT(GC_mark_mutex_waitcnt != 0);
           /* Acquire mark lock */
           if (WaitForSingleObject(mark_mutex_event, INFINITE) == WAIT_FAILED)
-            ABORT("WaitForSingleObject() failed");
+            ABORT("WaitForSingleObject failed");
           GC_ASSERT(GC_mark_lock_holder == NO_THREAD);
 #         ifdef GC_ASSERTIONS
             GC_mark_lock_holder = (unsigned long)GetCurrentThreadId();
@@ -2000,7 +2000,7 @@ GC_INNER void GC_get_next_stack(char *start, char *limit,
       {
         GC_ASSERT(mark_cv != 0);
         if (PulseEvent(mark_cv) == FALSE)
-          ABORT("PulseEvent() failed");
+          ABORT("PulseEvent failed");
       }
 
 #   endif /* !DONT_USE_SIGNALANDWAIT */
@@ -2337,7 +2337,7 @@ GC_INNER void GC_thr_init(void)
                                 FALSE /* initialState */, NULL /* name */);
           if (mark_mutex_event == (HANDLE)0 || builder_cv == (HANDLE)0
               || mark_cv == (HANDLE)0)
-            ABORT("CreateEvent() failed");
+            ABORT("CreateEvent failed");
 #       endif
         /* Disable true incremental collection, but generational is OK. */
         GC_time_limit = GC_TIME_UNLIMITED;