diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-08-27 15:39:43 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-08-28 08:58:14 +0200 |
commit | a2684c2b8d4cd1336052cc541cce31cc342bae2e (patch) | |
tree | 0abeef7d522a53b558f7c453bfef4bbdacfc8eef /cpukit/include/rtems/record.h | |
parent | record: Add data size to client (diff) | |
download | rtems-a2684c2b8d4cd1336052cc541cce31cc342bae2e.tar.bz2 |
record: Use BSS section instead of per-CPU data
The .rtemsrwset section is used for the per-CPU data. This section has
loadable content. Place the ring buffers in the BSS section to avoid
large executable image sizes.
Not using the per-CPU data makes it possible to initialize the record
support earlier.
Update #3665.
Diffstat (limited to 'cpukit/include/rtems/record.h')
-rw-r--r-- | cpukit/include/rtems/record.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/cpukit/include/rtems/record.h b/cpukit/include/rtems/record.h index cfadae79d6..1f83b2995d 100644 --- a/cpukit/include/rtems/record.h +++ b/cpukit/include/rtems/record.h @@ -32,7 +32,7 @@ #include <rtems/score/atomic.h> #include <rtems/score/cpu.h> -#include <rtems/score/percpudata.h> +#include <rtems/score/percpu.h> #include <rtems/score/watchdog.h> #include <rtems/rtems/intr.h> #include <rtems/rtems/tasks.h> @@ -42,19 +42,20 @@ extern "C" { #endif /* __cplusplus */ -struct Record_Control { +typedef struct Record_Control { Atomic_Uint head; unsigned int tail; unsigned int mask; Watchdog_Control Watchdog; rtems_record_item Header[ 3 ]; rtems_record_item Items[ RTEMS_ZERO_LENGTH_ARRAY ]; -}; +} Record_Control; -typedef struct Record_Control Record_Control; - -typedef RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES ) - struct Record_Configured_control Record_Configured_control; +typedef struct { + unsigned int item_count; + size_t control_size; + Record_Control *controls; +} Record_Configuration; typedef struct { Record_Control *control; @@ -63,9 +64,7 @@ typedef struct { rtems_interrupt_level level; } rtems_record_context; -PER_CPU_DATA_ITEM_DECLARE( Record_Configured_control, _Record_Per_CPU ); - -extern const unsigned int _Record_Item_count; +extern const Record_Configuration _Record_Configuration; void _Record_Initialize( void ); |