Skip to content

Commit

Permalink
Apply `define_lock()'
Browse files Browse the repository at this point in the history
We have a nice macro for defining pthread mutexes, use it.
  • Loading branch information
rantala committed Sep 28, 2012
1 parent 22aff2c commit aebba1f
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/arm/Gglobal.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "unwind_i.h"
#include "dwarf_i.h"

HIDDEN pthread_mutex_t arm_lock = PTHREAD_MUTEX_INITIALIZER;
HIDDEN define_lock (arm_lock);
HIDDEN int tdep_init_done;

/* Unwinding methods to use. See UNW_METHOD_ enums */
Expand Down
2 changes: 1 addition & 1 deletion src/hppa/Gglobal.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */

#include "unwind_i.h"

HIDDEN pthread_mutex_t hppa_lock = PTHREAD_MUTEX_INITIALIZER;
HIDDEN define_lock (hppa_lock);
HIDDEN int tdep_init_done;

HIDDEN void
Expand Down
2 changes: 1 addition & 1 deletion src/mi/dyn-register.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */

#include "libunwind_i.h"

HIDDEN pthread_mutex_t _U_dyn_info_list_lock = PTHREAD_MUTEX_INITIALIZER;
HIDDEN define_lock (_U_dyn_info_list_lock);

void
_U_dyn_register (unw_dyn_info_t *di)
Expand Down
2 changes: 1 addition & 1 deletion src/mips/Gglobal.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "unwind_i.h"
#include "dwarf_i.h"

HIDDEN pthread_mutex_t mips_lock = PTHREAD_MUTEX_INITIALIZER;
HIDDEN define_lock (mips_lock);
HIDDEN int tdep_init_done;

HIDDEN void
Expand Down
2 changes: 1 addition & 1 deletion src/ppc32/Gglobal.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "unwind_i.h"
#include "dwarf_i.h"

HIDDEN pthread_mutex_t ppc32_lock = PTHREAD_MUTEX_INITIALIZER;
HIDDEN define_lock (ppc32_lock);
HIDDEN int tdep_init_done;

/* The API register numbers are exactly the same as the .eh_frame
Expand Down
2 changes: 1 addition & 1 deletion src/ppc64/Gglobal.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "unwind_i.h"
#include "dwarf_i.h"

HIDDEN pthread_mutex_t ppc64_lock = PTHREAD_MUTEX_INITIALIZER;
HIDDEN define_lock (ppc64_lock);
HIDDEN int tdep_init_done;

/* The API register numbers are exactly the same as the .eh_frame
Expand Down
2 changes: 1 addition & 1 deletion src/x86/Gglobal.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "unwind_i.h"
#include "dwarf_i.h"

HIDDEN pthread_mutex_t x86_lock = PTHREAD_MUTEX_INITIALIZER;
HIDDEN define_lock (x86_lock);
HIDDEN int tdep_init_done;

/* See comments for svr4_dbx_register_map[] in gcc/config/i386/i386.c. */
Expand Down
2 changes: 1 addition & 1 deletion src/x86_64/Gglobal.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "unwind_i.h"
#include "dwarf_i.h"

HIDDEN pthread_mutex_t x86_64_lock = PTHREAD_MUTEX_INITIALIZER;
HIDDEN define_lock (x86_64_lock);
HIDDEN int tdep_init_done;

/* See comments for svr4_dbx_register_map[] in gcc/config/i386/i386.c. */
Expand Down
2 changes: 1 addition & 1 deletion src/x86_64/Gtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ typedef struct
} unw_trace_cache_t;

static const unw_tdep_frame_t empty_frame = { 0, UNW_X86_64_FRAME_OTHER, -1, -1, 0, -1, -1 };
static pthread_mutex_t trace_init_lock = PTHREAD_MUTEX_INITIALIZER;
static define_lock (trace_init_lock);
static pthread_once_t trace_cache_once = PTHREAD_ONCE_INIT;
static sig_atomic_t trace_cache_once_happen;
static pthread_key_t trace_cache_key;
Expand Down

0 comments on commit aebba1f

Please sign in to comment.