From cfe6d05e3bc47a61db757ba026e44ad09876233b Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 23 Dec 2014 10:32:22 +0100 Subject: capture: Fix lock initialization --- cpukit/libmisc/capture/capture.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/cpukit/libmisc/capture/capture.c b/cpukit/libmisc/capture/capture.c index 4327100449..34aa6008cb 100644 --- a/cpukit/libmisc/capture/capture.c +++ b/cpukit/libmisc/capture/capture.c @@ -79,7 +79,9 @@ typedef struct { static rtems_capture_per_cpu_data *capture_per_cpu = NULL; -static rtems_capture_global_data capture_global; +static rtems_capture_global_data capture_global = { + .lock = RTEMS_INTERRUPT_LOCK_INITIALIZER( "Capture" ) +}; /* * RTEMS Capture Data. @@ -109,7 +111,7 @@ static rtems_capture_global_data capture_global; /* * RTEMS Event text. */ -static const char* capture_event_text[] = +static const char * const capture_event_text[] = { "CREATED_BY", "CREATED", @@ -578,7 +580,7 @@ rtems_capture_open (uint32_t size, rtems_capture_timestamp timestamp __attribu count = rtems_get_processor_count(); if (capture_per_cpu == NULL) { - capture_per_cpu = calloc( count, sizeof(rtems_capture_per_cpu_data) ); + capture_per_cpu = calloc( count, sizeof( *capture_per_cpu ) ); } for (i=0; i