From 5b2bf5e73f74ae8a99af990ef6950560d8f3d6f4 Mon Sep 17 00:00:00 2001 From: hboehm Date: Tue, 22 May 2007 19:38:13 +0000 Subject: [PATCH] 2007-05-22 Hans Boehm * include/private/gc_locks.h: Format to 80 columns. --- ChangeLog | 4 ++++ include/private/gc_locks.h | 16 ++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index be2b893d..5ba092fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-05-22 Hans Boehm + + * include/private/gc_locks.h: Format to 80 columns. + 2007-05-22 Hans Boehm * malloc.c(GC_free): Ignore bad frees on MSWIN32 with REDIRECT_MALLOC. diff --git a/include/private/gc_locks.h b/include/private/gc_locks.h index 13e81ec1..de9e578f 100644 --- a/include/private/gc_locks.h +++ b/include/private/gc_locks.h @@ -92,7 +92,8 @@ # define THREAD_EQUAL(id1, id2) pthread_equal(id1, id2) # undef NUMERIC_THREAD_ID_UNIQUE # endif -# define NO_THREAD (-1l) /* != NUMERIC_THREAD_ID(pthread_self()) for any thread */ +# define NO_THREAD (-1l) + /* != NUMERIC_THREAD_ID(pthread_self()) for any thread */ # if !defined(THREAD_LOCAL_ALLOC) && !defined(USE_PTHREAD_LOCKS) /* In the THREAD_LOCAL_ALLOC case, the allocation lock tends to */ @@ -144,15 +145,18 @@ # define UNCOND_UNLOCK() pthread_mutex_unlock(&GC_allocate_ml) # endif /* !GC_ASSERTIONS */ # endif /* USE_PTHREAD_LOCKS */ -# define SET_LOCK_HOLDER() GC_lock_holder = NUMERIC_THREAD_ID(pthread_self()) +# define SET_LOCK_HOLDER() \ + GC_lock_holder = NUMERIC_THREAD_ID(pthread_self()) # define UNSET_LOCK_HOLDER() GC_lock_holder = NO_THREAD -# define I_HOLD_LOCK() (!GC_need_to_lock \ - || GC_lock_holder == NUMERIC_THREAD_ID(pthread_self())) +# define I_HOLD_LOCK() \ + (!GC_need_to_lock || \ + GC_lock_holder == NUMERIC_THREAD_ID(pthread_self())) # ifndef NUMERIC_THREAD_ID_UNIQUE # define I_DONT_HOLD_LOCK() 1 /* Conservatively say yes */ # else -# define I_DONT_HOLD_LOCK() (!GC_need_to_lock \ - || GC_lock_holder != NUMERIC_THREAD_ID(pthread_self())) +# define I_DONT_HOLD_LOCK() \ + (!GC_need_to_lock \ + || GC_lock_holder != NUMERIC_THREAD_ID(pthread_self())) # endif extern volatile GC_bool GC_collecting; # define ENTER_GC() GC_collecting = 1; -- 2.40.0