[PATCH v2] rtems-record: New program
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Jan 30 10:31:36 UTC 2019
Update #3665.
---
misc/record/record-client.c | 448 ++++++++++++++
misc/record/record-main.c | 335 +++++++++++
misc/record/record-text.c | 1071 +++++++++++++++++++++++++++++++++
misc/record/rtems/recordclient.h | 139 +++++
misc/record/rtems/recorddata.h | 1202 ++++++++++++++++++++++++++++++++++++++
misc/record/tree.h | 801 +++++++++++++++++++++++++
misc/wscript | 10 +
7 files changed, 4006 insertions(+)
create mode 100644 misc/record/record-client.c
create mode 100644 misc/record/record-main.c
create mode 100644 misc/record/record-text.c
create mode 100644 misc/record/rtems/recordclient.h
create mode 100644 misc/record/rtems/recorddata.h
create mode 100644 misc/record/tree.h
diff --git a/misc/record/record-client.c b/misc/record/record-client.c
new file mode 100644
index 0000000..585aa38
--- /dev/null
+++ b/misc/record/record-client.c
@@ -0,0 +1,448 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2018, 2019 embedded brains GmbH
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * This file must be compatible to general purpose POSIX system, e.g. Linux,
+ * FreeBSD. It may be used for utility programs.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/recordclient.h>
+
+#include <string.h>
+
+static void set_to_bt_scaler(
+ rtems_record_client_context *ctx,
+ uint32_t frequency
+)
+{
+ uint64_t bin_per_s;
+
+ bin_per_s = UINT64_C( 1 ) << 32;
+ ctx->to_bt_scaler = ( ( bin_per_s << 31 ) + frequency - 1 ) / frequency;
+}
+
+static rtems_record_client_status call_handler(
+ const rtems_record_client_context *ctx,
+ uint64_t bt,
+ rtems_record_event event,
+ uint64_t data
+)
+{
+ uint32_t seconds;
+ uint32_t nanosec;
+
+ seconds = (uint32_t) ( bt >> 32 );
+ nanosec = (uint32_t) ( ( UINT64_C( 1000000000 ) * (uint32_t) bt ) >> 32 );
+
+ return ( *ctx->handler )(
+ seconds,
+ nanosec,
+ ctx->cpu,
+ event,
+ data,
+ ctx->handler_arg
+ );
+}
+
+static void check_overflow(
+ const rtems_record_client_context *ctx,
+ const rtems_record_client_per_cpu *per_cpu,
+ uint32_t new_head
+)
+{
+ uint32_t last_tail;
+ uint32_t last_head;
+ uint32_t capacity;
+ uint32_t new_content;
+ uint64_t bt;
+
+ last_tail = per_cpu->tail[ per_cpu->index ];
+ last_head = per_cpu->head[ per_cpu->index ];
+
+ if ( last_tail == last_head ) {
+ return;
+ }
+
+ capacity = ( last_tail - last_head - 1 ) & ( ctx->count - 1 );
+ new_content = new_head - last_head;
+
+ if ( new_content <= capacity ) {
+ return;
+ }
+
+ bt = ( per_cpu->uptime.time_accumulated * ctx->to_bt_scaler ) >> 31;
+ bt += per_cpu->uptime.bt;
+
+ call_handler(
+ ctx,
+ bt,
+ RTEMS_RECORD_OVERFLOW,
+ new_content - capacity
+ );
+}
+
+static rtems_record_client_status visit( rtems_record_client_context *ctx )
+{
+ rtems_record_client_per_cpu *per_cpu;
+ uint32_t time;
+ rtems_record_event event;
+ uint64_t data;
+ uint64_t bt;
+
+ per_cpu = &ctx->per_cpu[ ctx->cpu ];
+ time = RTEMS_RECORD_GET_TIME( ctx->event );
+ event = RTEMS_RECORD_GET_EVENT( ctx->event );
+ data = ctx->data;
+
+ switch ( event ) {
+ case RTEMS_RECORD_PROCESSOR:
+ if ( data >= RTEMS_RECORD_CLIENT_MAXIMUM_CPU_COUNT ) {
+ return RTEMS_RECORD_CLIENT_ERROR_UNSUPPORTED_CPU;
+ }
+
+ ctx->cpu = (uint32_t) data;
+ per_cpu = &ctx->per_cpu[ ctx->cpu ];
+ break;
+ case RTEMS_RECORD_UPTIME_LOW:
+ per_cpu->uptime.bt = (uint32_t) data;
+ per_cpu->uptime.time_at_bt = time;
+ per_cpu->uptime.time_last = time;
+ per_cpu->uptime.time_accumulated = 0;
+ time = 0;
+ break;
+ case RTEMS_RECORD_UPTIME_HIGH:
+ per_cpu->uptime.bt += (int64_t) data << 32;
+ time = 0;
+ break;
+ case RTEMS_RECORD_TAIL:
+ per_cpu->tail[ per_cpu->index ] = (uint32_t) data;
+ break;
+ case RTEMS_RECORD_HEAD:
+ per_cpu->head[ per_cpu->index ]= (uint32_t) data;
+ per_cpu->index ^= 1;
+ check_overflow( ctx, per_cpu, (uint32_t) data );
+ break;
+ case RTEMS_RECORD_COUNT:
+ ctx->count = (uint32_t) data;
+ break;
+ case RTEMS_RECORD_FREQUENCY:
+ set_to_bt_scaler( ctx, (uint32_t) data );
+ break;
+ case RTEMS_RECORD_VERSION:
+ if ( data != RTEMS_RECORD_THE_VERSION ) {
+ return RTEMS_RECORD_CLIENT_ERROR_UNSUPPORTED_VERSION;
+ }
+
+ break;
+ default:
+ break;
+ }
+
+ if ( time != 0 ) {
+ uint32_t delta;
+
+ delta = ( time - per_cpu->uptime.time_last )
+ & ( ( UINT32_C( 1 ) << RTEMS_RECORD_TIME_BITS ) - 1 );
+ per_cpu->uptime.time_last = time;
+ per_cpu->uptime.time_accumulated += delta;
+ bt = ( per_cpu->uptime.time_accumulated * ctx->to_bt_scaler ) >> 31;
+ bt += per_cpu->uptime.bt;
+ } else {
+ bt = 0;
+ }
+
+ return call_handler( ctx, bt, event, data );
+}
+
+static rtems_record_client_status consume_32(
+ rtems_record_client_context *ctx,
+ const void *buf,
+ size_t n
+)
+{
+ while ( n > 0 ) {
+ size_t m;
+ char *pos;
+
+ m = ctx->todo < n ? ctx->todo : n;
+ pos = ctx->pos;
+ pos = memcpy( pos, buf, m );
+ n -= m;
+ buf = (char *) buf + m;
+
+ if ( m == ctx->todo ) {
+ rtems_record_client_status status;
+
+ ctx->todo = sizeof( ctx->item.format_32 );
+ ctx->pos = &ctx->item.format_32;
+ ctx->event = ctx->item.format_32.event;
+ ctx->data = ctx->item.format_32.data;
+
+ status = visit( ctx );
+
+ if ( status != RTEMS_RECORD_CLIENT_SUCCESS ) {
+ return status;
+ }
+ } else {
+ ctx->todo -= m;
+ ctx->pos = pos + m;
+ }
+ }
+
+ return RTEMS_RECORD_CLIENT_SUCCESS;
+}
+
+static rtems_record_client_status consume_64(
+ rtems_record_client_context *ctx,
+ const void *buf,
+ size_t n
+)
+{
+ while ( n > 0 ) {
+ size_t m;
+ char *pos;
+
+ m = ctx->todo < n ? ctx->todo : n;
+ pos = ctx->pos;
+ pos = memcpy( pos, buf, m );
+ n -= m;
+ buf = (char *) buf + m;
+
+ if ( m == ctx->todo ) {
+ rtems_record_client_status status;
+
+ ctx->todo = sizeof( ctx->item.format_64 );
+ ctx->pos = &ctx->item.format_64;
+ ctx->event = ctx->item.format_64.event;
+ ctx->data = ctx->item.format_64.data;
+
+ status = visit( ctx );
+
+ if ( status != RTEMS_RECORD_CLIENT_SUCCESS ) {
+ return status;
+ }
+ } else {
+ ctx->todo -= m;
+ ctx->pos = pos + m;
+ }
+ }
+
+ return RTEMS_RECORD_CLIENT_SUCCESS;
+}
+
+static rtems_record_client_status consume_swap_32(
+ rtems_record_client_context *ctx,
+ const void *buf,
+ size_t n
+)
+{
+ while ( n > 0 ) {
+ size_t m;
+ char *pos;
+
+ m = ctx->todo < n ? ctx->todo : n;
+ pos = ctx->pos;
+ pos = memcpy( pos, buf, m );
+ n -= m;
+ buf = (char *) buf + m;
+
+ if ( m == ctx->todo ) {
+ rtems_record_client_status status;
+
+ ctx->todo = sizeof( ctx->item.format_32 );
+ ctx->pos = &ctx->item.format_32;
+ ctx->event = __builtin_bswap32( ctx->item.format_32.event );
+ ctx->data = __builtin_bswap32( ctx->item.format_32.data );
+
+ status = visit( ctx );
+
+ if ( status != RTEMS_RECORD_CLIENT_SUCCESS ) {
+ return status;
+ }
+ } else {
+ ctx->todo -= m;
+ ctx->pos = pos + m;
+ }
+ }
+
+ return RTEMS_RECORD_CLIENT_SUCCESS;
+}
+
+static rtems_record_client_status consume_swap_64(
+ rtems_record_client_context *ctx,
+ const void *buf,
+ size_t n
+)
+{
+ while ( n > 0 ) {
+ size_t m;
+ char *pos;
+
+ m = ctx->todo < n ? ctx->todo : n;
+ pos = ctx->pos;
+ pos = memcpy( pos, buf, m );
+ n -= m;
+ buf = (char *) buf + m;
+
+ if ( m == ctx->todo ) {
+ rtems_record_client_status status;
+
+ ctx->todo = sizeof( ctx->item.format_64 );
+ ctx->pos = &ctx->item.format_64;
+ ctx->event = __builtin_bswap32( ctx->item.format_64.event );
+ ctx->data = __builtin_bswap64( ctx->item.format_64.data );
+
+ status = visit( ctx );
+
+ if ( status != RTEMS_RECORD_CLIENT_SUCCESS ) {
+ return status;
+ }
+ } else {
+ ctx->todo -= m;
+ ctx->pos = pos + m;
+ }
+ }
+
+ return RTEMS_RECORD_CLIENT_SUCCESS;
+}
+
+static rtems_record_client_status consume_init(
+ rtems_record_client_context *ctx,
+ const void *buf,
+ size_t n
+)
+{
+ while ( n > 0 ) {
+ size_t m;
+ char *pos;
+
+ m = ctx->todo < n ? ctx->todo : n;
+ pos = ctx->pos;
+ pos = memcpy( pos, buf, m );
+ n -= m;
+ buf = (char *) buf + m;
+
+ if ( m == ctx->todo ) {
+ uint32_t magic;
+
+ magic = ctx->header[ 1 ];
+
+ switch ( ctx->header[ 0 ] ) {
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ case RTEMS_RECORD_FORMAT_LE_32:
+ ctx->todo = sizeof( ctx->item.format_32 );
+ ctx->pos = &ctx->item.format_32;
+ ctx->consume = consume_32;
+ break;
+ case RTEMS_RECORD_FORMAT_LE_64:
+ ctx->todo = sizeof( ctx->item.format_64 );
+ ctx->pos = &ctx->item.format_64;
+ ctx->consume = consume_64;
+ break;
+ case RTEMS_RECORD_FORMAT_BE_32:
+ ctx->todo = sizeof( ctx->item.format_32 );
+ ctx->pos = &ctx->item.format_32;
+ ctx->consume = consume_swap_32;
+ magic = __builtin_bswap32( magic );
+ break;
+ case RTEMS_RECORD_FORMAT_BE_64:
+ ctx->todo = sizeof( ctx->item.format_64 );
+ ctx->pos = &ctx->item.format_64;
+ ctx->consume = consume_swap_64;
+ magic = __builtin_bswap32( magic );
+ break;
+#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ case RTEMS_RECORD_FORMAT_LE_32:
+ ctx->todo = sizeof( ctx->item.format_32 );
+ ctx->pos = &ctx->item.format_32;
+ ctx->consume = consume_swap_32;
+ magic = __builtin_bswap32( magic );
+ break;
+ case RTEMS_RECORD_FORMAT_LE_64:
+ ctx->todo = sizeof( ctx->item.format_64 );
+ ctx->pos = &ctx->item.format_64;
+ ctx->consume = consume_swap_64;
+ magic = __builtin_bswap32( magic );
+ break;
+ case RTEMS_RECORD_FORMAT_BE_32:
+ ctx->todo = sizeof( ctx->item.format_32 );
+ ctx->pos = &ctx->item.format_32;
+ ctx->consume = consume_32;
+ break;
+ case RTEMS_RECORD_FORMAT_BE_64:
+ ctx->todo = sizeof( ctx->item.format_64 );
+ ctx->pos = &ctx->item.format_64;
+ ctx->consume = consume_64;
+ break;
+#else
+#error "unexpected __BYTE_ORDER__"
+#endif
+ default:
+ return RTEMS_RECORD_CLIENT_ERROR_UNKNOWN_FORMAT;
+ }
+
+ if ( magic != RTEMS_RECORD_MAGIC ) {
+ return RTEMS_RECORD_CLIENT_ERROR_INVALID_MAGIC;
+ }
+
+ return rtems_record_client_run( ctx, buf, n );
+ } else {
+ ctx->todo -= m;
+ ctx->pos = pos + m;
+ }
+ }
+
+ return RTEMS_RECORD_CLIENT_SUCCESS;
+}
+
+void rtems_record_client_init(
+ rtems_record_client_context *ctx,
+ rtems_record_client_handler handler,
+ void *arg
+)
+{
+ ctx = memset( ctx, 0, sizeof( *ctx ) );
+ ctx->to_bt_scaler = UINT64_C( 1 ) << 31;
+ ctx->handler = handler;
+ ctx->handler_arg = arg;
+ ctx->todo = sizeof( ctx->header );
+ ctx->pos = &ctx->header;
+ ctx->consume = consume_init;
+}
+
+rtems_record_client_status rtems_record_client_run(
+ rtems_record_client_context *ctx,
+ const void *buf,
+ size_t n
+)
+{
+ return ( *ctx->consume )( ctx, buf, n );
+}
diff --git a/misc/record/record-main.c b/misc/record/record-main.c
new file mode 100644
index 0000000..c2deab7
--- /dev/null
+++ b/misc/record/record-main.c
@@ -0,0 +1,335 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2018, 2019 embedded brains GmbH
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <rtems/recorddata.h>
+#include <rtems/recordclient.h>
+
+#include <sys/queue.h>
+#include <sys/socket.h>
+
+#include <assert.h>
+#include <getopt.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <inttypes.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include "tree.h"
+
+#define THRESHOLD_IN_NS 1000000000
+
+static const struct option longopts[] = {
+ { "help", 0, NULL, 'h' },
+ { "host", 1, NULL, 'H' },
+ { "port", 1, NULL, 'p' },
+ { "items", 1, NULL, 'i' },
+ { NULL, 0, NULL, 0 }
+};
+
+typedef struct client_item {
+ SLIST_ENTRY( client_item ) free_node;
+ RB_ENTRY( client_item ) active_node;
+ uint64_t ns;
+ uint32_t cpu;
+ rtems_record_event event;
+ uint64_t data;
+ uint64_t counter;
+} client_item;
+
+typedef struct client_context {
+ uint64_t ns_threshold;
+ uint64_t last_ns;
+ uint32_t last_cpu;
+ bool flush;
+ bool only_one_cpu;
+ uint64_t counter;
+ SLIST_HEAD( , client_item ) free_items;
+ RB_HEAD( active, client_item ) active_items;
+} client_context;
+
+static inline int item_cmp( const void *pa, const void *pb )
+{
+ const client_item *a;
+ const client_item *b;
+
+ a = (const client_item *) pa;
+ b = (const client_item *) pb;
+
+ if ( a->ns < b->ns ) {
+ return -1;
+ } else if ( a->ns > b->ns ) {
+ return 1;
+ } else if ( a->cpu < b->cpu ) {
+ return -1;
+ } else if ( a->cpu > b->cpu ) {
+ return 1;
+ } else if ( a->counter < b->counter ) {
+ return -1;
+ } else if ( a->counter > b->counter ) {
+ return 1;
+ } else {
+ assert( 0 );
+ return 0;
+ }
+}
+
+RB_GENERATE_INTERNAL( active, client_item, active_node, item_cmp, static inline )
+
+static void usage( char **argv )
+{
+ printf(
+ "%s [--host=HOST] [--port=PORT] [--items=ITEMS]\n"
+ "\n"
+ "Mandatory arguments to long options are mandatory for short options too.\n"
+ " -h, --help print this help text\n"
+ " -H, --host=HOST the host IPv4 address of the record server\n"
+ " -p, --port=PORT the TCP port of the record server\n"
+ " -i, --items=ITEMS the maximum count of active record items\n",
+ argv[ 0 ]
+ );
+}
+
+static int connect_client( const char *host, uint16_t port )
+{
+ struct sockaddr_in in_addr;
+ int fd;
+ int rv;
+
+ fd = socket( PF_INET, SOCK_STREAM, 0 );
+ assert( fd >= 0 );
+
+ memset( &in_addr, 0, sizeof( in_addr ) );
+ in_addr.sin_family = AF_INET;
+ in_addr.sin_port = htons( port );
+ in_addr.sin_addr.s_addr = inet_addr( host );
+ rv = connect( fd, (struct sockaddr *) &in_addr, sizeof( in_addr ) );
+ assert( rv == 0 );
+
+ return fd;
+}
+
+static void print_item( FILE *f, const client_item *item )
+{
+ if ( item->ns != 0 ) {
+ uint32_t seconds;
+ uint32_t nanoseconds;
+
+ seconds = (uint32_t) ( item->ns / 1000000000 );
+ nanoseconds = (uint32_t) ( item->ns % 1000000000 );
+ fprintf( f, "%" PRIu32 ".%09" PRIu32 ":", seconds, nanoseconds );
+ } else {
+ fprintf( f, "*:" );
+ }
+
+ fprintf(
+ f,
+ "%" PRIu32 ":%s:%" PRIx64 "\n",
+ item->cpu,
+ rtems_record_event_text( item->event ),
+ item->data
+ );
+}
+
+static void flush_items( client_context *cctx, uint64_t ns )
+{
+ uint64_t ns_threshold;
+ client_item *x;
+ client_item *y;
+
+ ns_threshold = cctx->ns_threshold;
+
+ if ( ns >= ns_threshold ) {
+ cctx->ns_threshold = ( ( ns + THRESHOLD_IN_NS - 1 ) / THRESHOLD_IN_NS )
+ * THRESHOLD_IN_NS;
+ ns_threshold -= THRESHOLD_IN_NS;
+ }
+
+ if ( SLIST_EMPTY( &cctx->free_items ) ) {
+ ns_threshold = RB_ROOT( &cctx->active_items )->ns;
+ }
+
+ RB_FOREACH_SAFE( x, active, &cctx->active_items, y ) {
+ if ( x->ns > ns_threshold ) {
+ break;
+ }
+
+ RB_REMOVE( active, &cctx->active_items, x );
+ SLIST_INSERT_HEAD( &cctx->free_items, x, free_node );
+ print_item( stdout, x );
+ }
+}
+
+static rtems_record_client_status handler(
+ uint32_t seconds,
+ uint32_t nanoseconds,
+ uint32_t cpu,
+ rtems_record_event event,
+ uint64_t data,
+ void *arg
+)
+{
+ client_context *cctx;
+ client_item *item;
+ uint64_t ns;
+ bool flush;
+
+ cctx = arg;
+
+ if ( cpu != 0 ) {
+ cctx->only_one_cpu = false;
+ }
+
+ ns = ( (uint64_t) seconds * 1000000000 ) + nanoseconds;
+
+ if ( cctx->only_one_cpu ) {
+ flush = ( ns >= cctx->ns_threshold );
+ } else {
+ if ( cpu != cctx->last_cpu ) {
+ cctx->last_cpu = cpu;
+
+ if ( cpu == 0 ) {
+ flush = ( cctx->flush && cctx->last_ns >= cctx->ns_threshold );
+ cctx->flush = true;
+ } else {
+ flush = false;
+ cctx->flush = ( cctx->flush && cctx->last_ns >= cctx->ns_threshold );
+ }
+ } else {
+ flush = false;
+ }
+ }
+
+ if (
+ ns != 0
+ && event != RTEMS_RECORD_UPTIME_LOW
+ && event != RTEMS_RECORD_UPTIME_HIGH
+ ) {
+ uint64_t counter;
+
+ cctx->last_ns = ns;
+
+ item = SLIST_FIRST( &cctx->free_items );
+ SLIST_REMOVE_HEAD( &cctx->free_items, free_node );
+ item->ns = ns;
+ item->cpu = cpu;
+ item->event = event;
+ item->data = data;
+
+ counter = cctx->counter;
+ cctx->counter = counter + 1;
+ item->counter = counter;
+
+ RB_INSERT( active, &cctx->active_items, item );
+ }
+
+ if ( flush || SLIST_EMPTY( &cctx->free_items ) ) {
+ flush_items( cctx, ns );
+ }
+
+ return RTEMS_RECORD_CLIENT_SUCCESS;
+}
+
+int main( int argc, char **argv )
+{
+ rtems_record_client_context ctx;
+ client_context cctx;
+ client_item *items;
+ const char *host;
+ uint16_t port;
+ int fd;
+ int rv;
+ int opt;
+ int longindex;
+ size_t n;
+ size_t i;
+
+ host = "127.0.0.1";
+ port = 1234;
+ n = RTEMS_RECORD_CLIENT_MAXIMUM_CPU_COUNT * 1024 * 1024;
+
+ while (
+ ( opt = getopt_long( argc, argv, "hH:p:i:", &longopts[0], &longindex ) )
+ != -1
+ ) {
+ switch ( opt ) {
+ case 'h':
+ usage( argv );
+ exit( EXIT_SUCCESS );
+ break;
+ case 'H':
+ host = optarg;
+ break;
+ case 'p':
+ port = (uint16_t) strtoul( optarg, NULL, 10 );
+ break;
+ case 'i':
+ n = (size_t) strtoul( optarg, NULL, 10 );
+ break;
+ default:
+ exit( EXIT_FAILURE );
+ break;
+ }
+ }
+
+ memset( &cctx, 0, sizeof( cctx ) );
+ cctx.only_one_cpu = true;
+ cctx.ns_threshold = 2 * THRESHOLD_IN_NS;
+ SLIST_INIT( &cctx.free_items );
+ RB_INIT( &cctx.active_items );
+
+ items = calloc( n, sizeof( *items ) );
+ assert( items != NULL );
+
+ for ( i = 0; i < n; ++i ) {
+ SLIST_INSERT_HEAD( &cctx.free_items, &items[ i ], free_node );
+ }
+
+ fd = connect_client( host, port );
+ rtems_record_client_init( &ctx, handler, &cctx );
+
+ while ( true ) {
+ int buf[ 4096 ];
+ ssize_t n;
+
+ n = recv( fd, buf, sizeof( buf ), 0 );
+ if ( n >= 0 ) {
+ rtems_record_client_run( &ctx, buf, (size_t) n );
+ } else {
+ break;
+ }
+ }
+
+ rv = close( fd );
+ assert( rv == 0 );
+
+ return 0;
+}
diff --git a/misc/record/record-text.c b/misc/record/record-text.c
new file mode 100644
index 0000000..ede1806
--- /dev/null
+++ b/misc/record/record-text.c
@@ -0,0 +1,1071 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2018, 2019 embedded brains GmbH
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * This file must be compatible to general purpose POSIX system, e.g. Linux,
+ * FreeBSD. It may be used for utility programs.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/recorddata.h>
+
+#include <stddef.h>
+
+static const char * const event_text[] = {
+ [ RTEMS_RECORD_EMPTY ] = "EMPTY",
+ [ RTEMS_RECORD_VERSION ] = "VERSION",
+ [ RTEMS_RECORD_ACCEPT ] = "ACCEPT",
+ [ RTEMS_RECORD_BIND ] = "BIND",
+ [ RTEMS_RECORD_BUFFER ] = "BUFFER",
+ [ RTEMS_RECORD_CHOWN ] = "CHOWN",
+ [ RTEMS_RECORD_CLOSE ] = "CLOSE",
+ [ RTEMS_RECORD_CONNECT ] = "CONNECT",
+ [ RTEMS_RECORD_COUNT ] = "COUNT",
+ [ RTEMS_RECORD_ETHER_INPUT ] = "ETHER_INPUT",
+ [ RTEMS_RECORD_ETHER_OUTPUT ] = "ETHER_OUTPUT",
+ [ RTEMS_RECORD_FCHMOD ] = "FCHMOD",
+ [ RTEMS_RECORD_FCNTL ] = "FCNTL",
+ [ RTEMS_RECORD_FDATASYNC ] = "FDATASYNC",
+ [ RTEMS_RECORD_FREQUENCY ] = "FREQUENCY",
+ [ RTEMS_RECORD_FSTAT ] = "FSTAT",
+ [ RTEMS_RECORD_FSYNC ] = "FSYNC",
+ [ RTEMS_RECORD_FTRUNCATE ] = "FTRUNCATE",
+ [ RTEMS_RECORD_GIT_HASH ] = "GIT_HASH",
+ [ RTEMS_RECORD_HEAD ] = "HEAD",
+ [ RTEMS_RECORD_HEAP_ALLOC ] = "HEAP_ALLOC",
+ [ RTEMS_RECORD_HEAP_FREE ] = "HEAP_FREE",
+ [ RTEMS_RECORD_HEAP_SIZE ] = "HEAP_SIZE",
+ [ RTEMS_RECORD_HEAP_USAGE ] = "HEAP_USAGE",
+ [ RTEMS_RECORD_INTERUPT_BEGIN ] = "INTERUPT_BEGIN",
+ [ RTEMS_RECORD_INTERUPT_END ] = "INTERUPT_END",
+ [ RTEMS_RECORD_INTERUPT_INSTALL ] = "INTERUPT_INSTALL",
+ [ RTEMS_RECORD_INTERUPT_REMOVE ] = "INTERUPT_REMOVE",
+ [ RTEMS_RECORD_IOCTL ] = "IOCTL",
+ [ RTEMS_RECORD_IP6_INPUT ] = "IP6_INPUT",
+ [ RTEMS_RECORD_IP6_OUTPUT ] = "IP6_OUTPUT",
+ [ RTEMS_RECORD_IP_INPUT ] = "IP_INPUT",
+ [ RTEMS_RECORD_IP_OUTPUT ] = "IP_OUTPUT",
+ [ RTEMS_RECORD_KEVENT ] = "KEVENT",
+ [ RTEMS_RECORD_KQUEUE ] = "KQUEUE",
+ [ RTEMS_RECORD_LENGTH ] = "LENGTH",
+ [ RTEMS_RECORD_LINK ] = "LINK",
+ [ RTEMS_RECORD_LSEEK ] = "LSEEK",
+ [ RTEMS_RECORD_MKNOD ] = "MKNOD",
+ [ RTEMS_RECORD_MMAP ] = "MMAP",
+ [ RTEMS_RECORD_MOUNT ] = "MOUNT",
+ [ RTEMS_RECORD_OPEN ] = "OPEN",
+ [ RTEMS_RECORD_OVERFLOW ] = "OVERFLOW",
+ [ RTEMS_RECORD_PAGE_ALLOC ] = "PAGE_ALLOC",
+ [ RTEMS_RECORD_PAGE_FREE ] = "PAGE_FREE",
+ [ RTEMS_RECORD_POLL ] = "POLL",
+ [ RTEMS_RECORD_PROCESSOR ] = "PROCESSOR",
+ [ RTEMS_RECORD_PROCESSOR_MAXIMUM ] = "PROCESSOR_MAXIMUM",
+ [ RTEMS_RECORD_READ ] = "READ",
+ [ RTEMS_RECORD_READLINK ] = "READLINK",
+ [ RTEMS_RECORD_READV ] = "READV",
+ [ RTEMS_RECORD_RECV ] = "RECV",
+ [ RTEMS_RECORD_RECVFROM ] = "RECVFROM",
+ [ RTEMS_RECORD_RECVMSG ] = "RECVMSG",
+ [ RTEMS_RECORD_RENAME ] = "RENAME",
+ [ RTEMS_RECORD_RTEMS_BARRIER_CREATE ] = "RTEMS_BARRIER_CREATE",
+ [ RTEMS_RECORD_RTEMS_BARRIER_DELETE ] = "RTEMS_BARRIER_DELETE",
+ [ RTEMS_RECORD_RTEMS_BARRIER_RELEASE ] = "RTEMS_BARRIER_RELEASE",
+ [ RTEMS_RECORD_RTEMS_BARRIER_WAIT ] = "RTEMS_BARRIER_WAIT",
+ [ RTEMS_RECORD_RTEMS_EVENT_RECEIVE ] = "RTEMS_EVENT_RECEIVE",
+ [ RTEMS_RECORD_RTEMS_EVENT_SEND ] = "RTEMS_EVENT_SEND",
+ [ RTEMS_RECORD_RTEMS_EVENT_SYSTEM_RECEIVE ] = "RTEMS_EVENT_SYSTEM_RECEIVE",
+ [ RTEMS_RECORD_RTEMS_EVENT_SYSTEM_SEND ] = "RTEMS_EVENT_SYSTEM_SEND",
+ [ RTEMS_RECORD_RTEMS_MESSAGE_QUEUE_BROADCAST ] = "RTEMS_MESSAGE_QUEUE_BROADCAST",
+ [ RTEMS_RECORD_RTEMS_MESSAGE_QUEUE_CREATE ] = "RTEMS_MESSAGE_QUEUE_CREATE",
+ [ RTEMS_RECORD_RTEMS_MESSAGE_QUEUE_DELETE ] = "RTEMS_MESSAGE_QUEUE_DELETE",
+ [ RTEMS_RECORD_RTEMS_MESSAGE_QUEUE_FLUSH ] = "RTEMS_MESSAGE_QUEUE_FLUSH",
+ [ RTEMS_RECORD_RTEMS_MESSAGE_QUEUE_RECEIVE ] = "RTEMS_MESSAGE_QUEUE_RECEIVE",
+ [ RTEMS_RECORD_RTEMS_MESSAGE_QUEUE_SEND ] = "RTEMS_MESSAGE_QUEUE_SEND",
+ [ RTEMS_RECORD_RTEMS_MESSAGE_QUEUE_URGENT ] = "RTEMS_MESSAGE_QUEUE_URGENT",
+ [ RTEMS_RECORD_RTEMS_PARTITION_CREATE ] = "RTEMS_PARTITION_CREATE",
+ [ RTEMS_RECORD_RTEMS_PARTITION_DELETE ] = "RTEMS_PARTITION_DELETE",
+ [ RTEMS_RECORD_RTEMS_PARTITION_GET_BUFFER ] = "RTEMS_PARTITION_GET_BUFFER",
+ [ RTEMS_RECORD_RTEMS_PARTITION_RETURN_BUFFER ] = "RTEMS_PARTITION_RETURN_BUFFER",
+ [ RTEMS_RECORD_RTEMS_RATE_MONOTONIC_CANCEL ] = "RTEMS_RATE_MONOTONIC_CANCEL",
+ [ RTEMS_RECORD_RTEMS_RATE_MONOTONIC_CREATE ] = "RTEMS_RATE_MONOTONIC_CREATE",
+ [ RTEMS_RECORD_RTEMS_RATE_MONOTONIC_DELETE ] = "RTEMS_RATE_MONOTONIC_DELETE",
+ [ RTEMS_RECORD_RTEMS_RATE_MONOTONIC_PERIOD ] = "RTEMS_RATE_MONOTONIC_PERIOD",
+ [ RTEMS_RECORD_RTEMS_SEMAPHORE_CREATE ] = "RTEMS_SEMAPHORE_CREATE",
+ [ RTEMS_RECORD_RTEMS_SEMAPHORE_DELETE ] = "RTEMS_SEMAPHORE_DELETE",
+ [ RTEMS_RECORD_RTEMS_SEMAPHORE_FLUSH ] = "RTEMS_SEMAPHORE_FLUSH",
+ [ RTEMS_RECORD_RTEMS_SEMAPHORE_OBTAIN ] = "RTEMS_SEMAPHORE_OBTAIN",
+ [ RTEMS_RECORD_RTEMS_SEMAPHORE_RELEASE ] = "RTEMS_SEMAPHORE_RELEASE",
+ [ RTEMS_RECORD_RTEMS_TIMER_CANCEL ] = "RTEMS_TIMER_CANCEL",
+ [ RTEMS_RECORD_RTEMS_TIMER_CREATE ] = "RTEMS_TIMER_CREATE",
+ [ RTEMS_RECORD_RTEMS_TIMER_DELETE ] = "RTEMS_TIMER_DELETE",
+ [ RTEMS_RECORD_RTEMS_TIMER_FIRE_AFTER ] = "RTEMS_TIMER_FIRE_AFTER",
+ [ RTEMS_RECORD_RTEMS_TIMER_FIRE_WHEN ] = "RTEMS_TIMER_FIRE_WHEN",
+ [ RTEMS_RECORD_RTEMS_TIMER_RESET ] = "RTEMS_TIMER_RESET",
+ [ RTEMS_RECORD_RTEMS_TIMER_SERVER_FIRE_AFTER ] = "RTEMS_TIMER_SERVER_FIRE_AFTER",
+ [ RTEMS_RECORD_RTEMS_TIMER_SERVER_FIRE_WHEN ] = "RTEMS_TIMER_SERVER_FIRE_WHEN",
+ [ RTEMS_RECORD_SELECT ] = "SELECT",
+ [ RTEMS_RECORD_SEND ] = "SEND",
+ [ RTEMS_RECORD_SENDMSG ] = "SENDMSG",
+ [ RTEMS_RECORD_SENDTO ] = "SENDTO",
+ [ RTEMS_RECORD_SOCKET ] = "SOCKET",
+ [ RTEMS_RECORD_STATVFS ] = "STATVFS",
+ [ RTEMS_RECORD_SYMLINK ] = "SYMLINK",
+ [ RTEMS_RECORD_TAIL ] = "TAIL",
+ [ RTEMS_RECORD_TCP_INPUT ] = "TCP_INPUT",
+ [ RTEMS_RECORD_TCP_OUTPUT ] = "TCP_OUTPUT",
+ [ RTEMS_RECORD_THREAD_BEGIN ] = "THREAD_BEGIN",
+ [ RTEMS_RECORD_THREAD_CREATE ] = "THREAD_CREATE",
+ [ RTEMS_RECORD_THREAD_DELETE ] = "THREAD_DELETE",
+ [ RTEMS_RECORD_THREAD_EXIT ] = "THREAD_EXIT",
+ [ RTEMS_RECORD_THREAD_EXITTED ] = "THREAD_EXITTED",
+ [ RTEMS_RECORD_THREAD_ID ] = "THREAD_ID",
+ [ RTEMS_RECORD_THREAD_PRIO_CURRENT_HIGH ] = "THREAD_PRIO_CURRENT_HIGH",
+ [ RTEMS_RECORD_THREAD_PRIO_CURRENT_LOW ] = "THREAD_PRIO_CURRENT_LOW",
+ [ RTEMS_RECORD_THREAD_PRIO_REAL_HIGH ] = "THREAD_PRIO_REAL_HIGH",
+ [ RTEMS_RECORD_THREAD_PRIO_REAL_LOW ] = "THREAD_PRIO_REAL_LOW",
+ [ RTEMS_RECORD_THREAD_QUEUE_ENQUEUE ] = "THREAD_QUEUE_ENQUEUE",
+ [ RTEMS_RECORD_THREAD_QUEUE_ENQUEUE_STICKY ] = "THREAD_QUEUE_ENQUEUE_STICKY",
+ [ RTEMS_RECORD_THREAD_QUEUE_EXTRACT ] = "THREAD_QUEUE_EXTRACT",
+ [ RTEMS_RECORD_THREAD_QUEUE_SURRENDER ] = "THREAD_QUEUE_SURRENDER",
+ [ RTEMS_RECORD_THREAD_QUEUE_SURRENDER_STICKY ] = "THREAD_QUEUE_SURRENDER_STICKY",
+ [ RTEMS_RECORD_THREAD_RESTART ] = "THREAD_RESTART",
+ [ RTEMS_RECORD_THREAD_STACK_CURRENT ] = "THREAD_STACK_CURRENT",
+ [ RTEMS_RECORD_THREAD_STACK_SIZE ] = "THREAD_STACK_SIZE",
+ [ RTEMS_RECORD_THREAD_STACK_USAGE ] = "THREAD_STACK_USAGE",
+ [ RTEMS_RECORD_THREAD_START ] = "THREAD_START",
+ [ RTEMS_RECORD_THREAD_STATE_CLEAR ] = "THREAD_STATE_CLEAR",
+ [ RTEMS_RECORD_THREAD_STATE_SET ] = "THREAD_STATE_SET",
+ [ RTEMS_RECORD_THREAD_SWITCH_IN ] = "THREAD_SWITCH_IN",
+ [ RTEMS_RECORD_THREAD_SWITCH_OUT ] = "THREAD_SWITCH_OUT",
+ [ RTEMS_RECORD_THREAD_TERMINATE ] = "THREAD_TERMINATE",
+ [ RTEMS_RECORD_UDP_INPUT ] = "UDP_INPUT",
+ [ RTEMS_RECORD_UDP_OUTPUT ] = "UDP_OUTPUT",
+ [ RTEMS_RECORD_UMA_ALLOC_PTR ] = "UMA_ALLOC_PTR",
+ [ RTEMS_RECORD_UMA_ALLOC_ZONE ] = "UMA_ALLOC_ZONE",
+ [ RTEMS_RECORD_UMA_FREE_PTR ] = "UMA_FREE_PTR",
+ [ RTEMS_RECORD_UMA_FREE_ZONE ] = "UMA_FREE_ZONE",
+ [ RTEMS_RECORD_UNLINK ] = "UNLINK",
+ [ RTEMS_RECORD_UNMOUNT ] = "UNMOUNT",
+ [ RTEMS_RECORD_UPTIME_HIGH ] = "UPTIME_HIGH",
+ [ RTEMS_RECORD_UPTIME_LOW ] = "UPTIME_LOW",
+ [ RTEMS_RECORD_WORKSPACE_ALLOC ] = "WORKSPACE_ALLOC",
+ [ RTEMS_RECORD_WORKSPACE_FREE ] = "WORKSPACE_FREE",
+ [ RTEMS_RECORD_WORKSPACE_SIZE ] = "WORKSPACE_SIZE",
+ [ RTEMS_RECORD_WORKSPACE_USAGE ] = "WORKSPACE_USAGE",
+ [ RTEMS_RECORD_WRITE ] = "WRITE",
+ [ RTEMS_RECORD_WRITEV ] = "WRITEV",
+ [ RTEMS_RECORD_SYSTEM_142 ] = "SYSTEM_142",
+ [ RTEMS_RECORD_SYSTEM_143 ] = "SYSTEM_143",
+ [ RTEMS_RECORD_SYSTEM_144 ] = "SYSTEM_144",
+ [ RTEMS_RECORD_SYSTEM_145 ] = "SYSTEM_145",
+ [ RTEMS_RECORD_SYSTEM_146 ] = "SYSTEM_146",
+ [ RTEMS_RECORD_SYSTEM_147 ] = "SYSTEM_147",
+ [ RTEMS_RECORD_SYSTEM_148 ] = "SYSTEM_148",
+ [ RTEMS_RECORD_SYSTEM_149 ] = "SYSTEM_149",
+ [ RTEMS_RECORD_SYSTEM_150 ] = "SYSTEM_150",
+ [ RTEMS_RECORD_SYSTEM_151 ] = "SYSTEM_151",
+ [ RTEMS_RECORD_SYSTEM_152 ] = "SYSTEM_152",
+ [ RTEMS_RECORD_SYSTEM_153 ] = "SYSTEM_153",
+ [ RTEMS_RECORD_SYSTEM_154 ] = "SYSTEM_154",
+ [ RTEMS_RECORD_SYSTEM_155 ] = "SYSTEM_155",
+ [ RTEMS_RECORD_SYSTEM_156 ] = "SYSTEM_156",
+ [ RTEMS_RECORD_SYSTEM_157 ] = "SYSTEM_157",
+ [ RTEMS_RECORD_SYSTEM_158 ] = "SYSTEM_158",
+ [ RTEMS_RECORD_SYSTEM_159 ] = "SYSTEM_159",
+ [ RTEMS_RECORD_SYSTEM_160 ] = "SYSTEM_160",
+ [ RTEMS_RECORD_SYSTEM_161 ] = "SYSTEM_161",
+ [ RTEMS_RECORD_SYSTEM_162 ] = "SYSTEM_162",
+ [ RTEMS_RECORD_SYSTEM_163 ] = "SYSTEM_163",
+ [ RTEMS_RECORD_SYSTEM_164 ] = "SYSTEM_164",
+ [ RTEMS_RECORD_SYSTEM_165 ] = "SYSTEM_165",
+ [ RTEMS_RECORD_SYSTEM_166 ] = "SYSTEM_166",
+ [ RTEMS_RECORD_SYSTEM_167 ] = "SYSTEM_167",
+ [ RTEMS_RECORD_SYSTEM_168 ] = "SYSTEM_168",
+ [ RTEMS_RECORD_SYSTEM_169 ] = "SYSTEM_169",
+ [ RTEMS_RECORD_SYSTEM_170 ] = "SYSTEM_170",
+ [ RTEMS_RECORD_SYSTEM_171 ] = "SYSTEM_171",
+ [ RTEMS_RECORD_SYSTEM_172 ] = "SYSTEM_172",
+ [ RTEMS_RECORD_SYSTEM_173 ] = "SYSTEM_173",
+ [ RTEMS_RECORD_SYSTEM_174 ] = "SYSTEM_174",
+ [ RTEMS_RECORD_SYSTEM_175 ] = "SYSTEM_175",
+ [ RTEMS_RECORD_SYSTEM_176 ] = "SYSTEM_176",
+ [ RTEMS_RECORD_SYSTEM_177 ] = "SYSTEM_177",
+ [ RTEMS_RECORD_SYSTEM_178 ] = "SYSTEM_178",
+ [ RTEMS_RECORD_SYSTEM_179 ] = "SYSTEM_179",
+ [ RTEMS_RECORD_SYSTEM_180 ] = "SYSTEM_180",
+ [ RTEMS_RECORD_SYSTEM_181 ] = "SYSTEM_181",
+ [ RTEMS_RECORD_SYSTEM_182 ] = "SYSTEM_182",
+ [ RTEMS_RECORD_SYSTEM_183 ] = "SYSTEM_183",
+ [ RTEMS_RECORD_SYSTEM_184 ] = "SYSTEM_184",
+ [ RTEMS_RECORD_SYSTEM_185 ] = "SYSTEM_185",
+ [ RTEMS_RECORD_SYSTEM_186 ] = "SYSTEM_186",
+ [ RTEMS_RECORD_SYSTEM_187 ] = "SYSTEM_187",
+ [ RTEMS_RECORD_SYSTEM_188 ] = "SYSTEM_188",
+ [ RTEMS_RECORD_SYSTEM_189 ] = "SYSTEM_189",
+ [ RTEMS_RECORD_SYSTEM_190 ] = "SYSTEM_190",
+ [ RTEMS_RECORD_SYSTEM_191 ] = "SYSTEM_191",
+ [ RTEMS_RECORD_SYSTEM_192 ] = "SYSTEM_192",
+ [ RTEMS_RECORD_SYSTEM_193 ] = "SYSTEM_193",
+ [ RTEMS_RECORD_SYSTEM_194 ] = "SYSTEM_194",
+ [ RTEMS_RECORD_SYSTEM_195 ] = "SYSTEM_195",
+ [ RTEMS_RECORD_SYSTEM_196 ] = "SYSTEM_196",
+ [ RTEMS_RECORD_SYSTEM_197 ] = "SYSTEM_197",
+ [ RTEMS_RECORD_SYSTEM_198 ] = "SYSTEM_198",
+ [ RTEMS_RECORD_SYSTEM_199 ] = "SYSTEM_199",
+ [ RTEMS_RECORD_SYSTEM_200 ] = "SYSTEM_200",
+ [ RTEMS_RECORD_SYSTEM_201 ] = "SYSTEM_201",
+ [ RTEMS_RECORD_SYSTEM_202 ] = "SYSTEM_202",
+ [ RTEMS_RECORD_SYSTEM_203 ] = "SYSTEM_203",
+ [ RTEMS_RECORD_SYSTEM_204 ] = "SYSTEM_204",
+ [ RTEMS_RECORD_SYSTEM_205 ] = "SYSTEM_205",
+ [ RTEMS_RECORD_SYSTEM_206 ] = "SYSTEM_206",
+ [ RTEMS_RECORD_SYSTEM_207 ] = "SYSTEM_207",
+ [ RTEMS_RECORD_SYSTEM_208 ] = "SYSTEM_208",
+ [ RTEMS_RECORD_SYSTEM_209 ] = "SYSTEM_209",
+ [ RTEMS_RECORD_SYSTEM_210 ] = "SYSTEM_210",
+ [ RTEMS_RECORD_SYSTEM_211 ] = "SYSTEM_211",
+ [ RTEMS_RECORD_SYSTEM_212 ] = "SYSTEM_212",
+ [ RTEMS_RECORD_SYSTEM_213 ] = "SYSTEM_213",
+ [ RTEMS_RECORD_SYSTEM_214 ] = "SYSTEM_214",
+ [ RTEMS_RECORD_SYSTEM_215 ] = "SYSTEM_215",
+ [ RTEMS_RECORD_SYSTEM_216 ] = "SYSTEM_216",
+ [ RTEMS_RECORD_SYSTEM_217 ] = "SYSTEM_217",
+ [ RTEMS_RECORD_SYSTEM_218 ] = "SYSTEM_218",
+ [ RTEMS_RECORD_SYSTEM_219 ] = "SYSTEM_219",
+ [ RTEMS_RECORD_SYSTEM_220 ] = "SYSTEM_220",
+ [ RTEMS_RECORD_SYSTEM_221 ] = "SYSTEM_221",
+ [ RTEMS_RECORD_SYSTEM_222 ] = "SYSTEM_222",
+ [ RTEMS_RECORD_SYSTEM_223 ] = "SYSTEM_223",
+ [ RTEMS_RECORD_SYSTEM_224 ] = "SYSTEM_224",
+ [ RTEMS_RECORD_SYSTEM_225 ] = "SYSTEM_225",
+ [ RTEMS_RECORD_SYSTEM_226 ] = "SYSTEM_226",
+ [ RTEMS_RECORD_SYSTEM_227 ] = "SYSTEM_227",
+ [ RTEMS_RECORD_SYSTEM_228 ] = "SYSTEM_228",
+ [ RTEMS_RECORD_SYSTEM_229 ] = "SYSTEM_229",
+ [ RTEMS_RECORD_SYSTEM_230 ] = "SYSTEM_230",
+ [ RTEMS_RECORD_SYSTEM_231 ] = "SYSTEM_231",
+ [ RTEMS_RECORD_SYSTEM_232 ] = "SYSTEM_232",
+ [ RTEMS_RECORD_SYSTEM_233 ] = "SYSTEM_233",
+ [ RTEMS_RECORD_SYSTEM_234 ] = "SYSTEM_234",
+ [ RTEMS_RECORD_SYSTEM_235 ] = "SYSTEM_235",
+ [ RTEMS_RECORD_SYSTEM_236 ] = "SYSTEM_236",
+ [ RTEMS_RECORD_SYSTEM_237 ] = "SYSTEM_237",
+ [ RTEMS_RECORD_SYSTEM_238 ] = "SYSTEM_238",
+ [ RTEMS_RECORD_SYSTEM_239 ] = "SYSTEM_239",
+ [ RTEMS_RECORD_SYSTEM_240 ] = "SYSTEM_240",
+ [ RTEMS_RECORD_SYSTEM_241 ] = "SYSTEM_241",
+ [ RTEMS_RECORD_SYSTEM_242 ] = "SYSTEM_242",
+ [ RTEMS_RECORD_SYSTEM_243 ] = "SYSTEM_243",
+ [ RTEMS_RECORD_SYSTEM_244 ] = "SYSTEM_244",
+ [ RTEMS_RECORD_SYSTEM_245 ] = "SYSTEM_245",
+ [ RTEMS_RECORD_SYSTEM_246 ] = "SYSTEM_246",
+ [ RTEMS_RECORD_SYSTEM_247 ] = "SYSTEM_247",
+ [ RTEMS_RECORD_SYSTEM_248 ] = "SYSTEM_248",
+ [ RTEMS_RECORD_SYSTEM_249 ] = "SYSTEM_249",
+ [ RTEMS_RECORD_SYSTEM_250 ] = "SYSTEM_250",
+ [ RTEMS_RECORD_SYSTEM_251 ] = "SYSTEM_251",
+ [ RTEMS_RECORD_SYSTEM_252 ] = "SYSTEM_252",
+ [ RTEMS_RECORD_SYSTEM_253 ] = "SYSTEM_253",
+ [ RTEMS_RECORD_SYSTEM_254 ] = "SYSTEM_254",
+ [ RTEMS_RECORD_SYSTEM_255 ] = "SYSTEM_255",
+ [ RTEMS_RECORD_SYSTEM_256 ] = "SYSTEM_256",
+ [ RTEMS_RECORD_SYSTEM_257 ] = "SYSTEM_257",
+ [ RTEMS_RECORD_SYSTEM_258 ] = "SYSTEM_258",
+ [ RTEMS_RECORD_SYSTEM_259 ] = "SYSTEM_259",
+ [ RTEMS_RECORD_SYSTEM_260 ] = "SYSTEM_260",
+ [ RTEMS_RECORD_SYSTEM_261 ] = "SYSTEM_261",
+ [ RTEMS_RECORD_SYSTEM_262 ] = "SYSTEM_262",
+ [ RTEMS_RECORD_SYSTEM_263 ] = "SYSTEM_263",
+ [ RTEMS_RECORD_SYSTEM_264 ] = "SYSTEM_264",
+ [ RTEMS_RECORD_SYSTEM_265 ] = "SYSTEM_265",
+ [ RTEMS_RECORD_SYSTEM_266 ] = "SYSTEM_266",
+ [ RTEMS_RECORD_SYSTEM_267 ] = "SYSTEM_267",
+ [ RTEMS_RECORD_SYSTEM_268 ] = "SYSTEM_268",
+ [ RTEMS_RECORD_SYSTEM_269 ] = "SYSTEM_269",
+ [ RTEMS_RECORD_SYSTEM_270 ] = "SYSTEM_270",
+ [ RTEMS_RECORD_SYSTEM_271 ] = "SYSTEM_271",
+ [ RTEMS_RECORD_SYSTEM_272 ] = "SYSTEM_272",
+ [ RTEMS_RECORD_SYSTEM_273 ] = "SYSTEM_273",
+ [ RTEMS_RECORD_SYSTEM_274 ] = "SYSTEM_274",
+ [ RTEMS_RECORD_SYSTEM_275 ] = "SYSTEM_275",
+ [ RTEMS_RECORD_SYSTEM_276 ] = "SYSTEM_276",
+ [ RTEMS_RECORD_SYSTEM_277 ] = "SYSTEM_277",
+ [ RTEMS_RECORD_SYSTEM_278 ] = "SYSTEM_278",
+ [ RTEMS_RECORD_SYSTEM_279 ] = "SYSTEM_279",
+ [ RTEMS_RECORD_SYSTEM_280 ] = "SYSTEM_280",
+ [ RTEMS_RECORD_SYSTEM_281 ] = "SYSTEM_281",
+ [ RTEMS_RECORD_SYSTEM_282 ] = "SYSTEM_282",
+ [ RTEMS_RECORD_SYSTEM_283 ] = "SYSTEM_283",
+ [ RTEMS_RECORD_SYSTEM_284 ] = "SYSTEM_284",
+ [ RTEMS_RECORD_SYSTEM_285 ] = "SYSTEM_285",
+ [ RTEMS_RECORD_SYSTEM_286 ] = "SYSTEM_286",
+ [ RTEMS_RECORD_SYSTEM_287 ] = "SYSTEM_287",
+ [ RTEMS_RECORD_SYSTEM_288 ] = "SYSTEM_288",
+ [ RTEMS_RECORD_SYSTEM_289 ] = "SYSTEM_289",
+ [ RTEMS_RECORD_SYSTEM_290 ] = "SYSTEM_290",
+ [ RTEMS_RECORD_SYSTEM_291 ] = "SYSTEM_291",
+ [ RTEMS_RECORD_SYSTEM_292 ] = "SYSTEM_292",
+ [ RTEMS_RECORD_SYSTEM_293 ] = "SYSTEM_293",
+ [ RTEMS_RECORD_SYSTEM_294 ] = "SYSTEM_294",
+ [ RTEMS_RECORD_SYSTEM_295 ] = "SYSTEM_295",
+ [ RTEMS_RECORD_SYSTEM_296 ] = "SYSTEM_296",
+ [ RTEMS_RECORD_SYSTEM_297 ] = "SYSTEM_297",
+ [ RTEMS_RECORD_SYSTEM_298 ] = "SYSTEM_298",
+ [ RTEMS_RECORD_SYSTEM_299 ] = "SYSTEM_299",
+ [ RTEMS_RECORD_SYSTEM_300 ] = "SYSTEM_300",
+ [ RTEMS_RECORD_SYSTEM_301 ] = "SYSTEM_301",
+ [ RTEMS_RECORD_SYSTEM_302 ] = "SYSTEM_302",
+ [ RTEMS_RECORD_SYSTEM_303 ] = "SYSTEM_303",
+ [ RTEMS_RECORD_SYSTEM_304 ] = "SYSTEM_304",
+ [ RTEMS_RECORD_SYSTEM_305 ] = "SYSTEM_305",
+ [ RTEMS_RECORD_SYSTEM_306 ] = "SYSTEM_306",
+ [ RTEMS_RECORD_SYSTEM_307 ] = "SYSTEM_307",
+ [ RTEMS_RECORD_SYSTEM_308 ] = "SYSTEM_308",
+ [ RTEMS_RECORD_SYSTEM_309 ] = "SYSTEM_309",
+ [ RTEMS_RECORD_SYSTEM_310 ] = "SYSTEM_310",
+ [ RTEMS_RECORD_SYSTEM_311 ] = "SYSTEM_311",
+ [ RTEMS_RECORD_SYSTEM_312 ] = "SYSTEM_312",
+ [ RTEMS_RECORD_SYSTEM_313 ] = "SYSTEM_313",
+ [ RTEMS_RECORD_SYSTEM_314 ] = "SYSTEM_314",
+ [ RTEMS_RECORD_SYSTEM_315 ] = "SYSTEM_315",
+ [ RTEMS_RECORD_SYSTEM_316 ] = "SYSTEM_316",
+ [ RTEMS_RECORD_SYSTEM_317 ] = "SYSTEM_317",
+ [ RTEMS_RECORD_SYSTEM_318 ] = "SYSTEM_318",
+ [ RTEMS_RECORD_SYSTEM_319 ] = "SYSTEM_319",
+ [ RTEMS_RECORD_SYSTEM_320 ] = "SYSTEM_320",
+ [ RTEMS_RECORD_SYSTEM_321 ] = "SYSTEM_321",
+ [ RTEMS_RECORD_SYSTEM_322 ] = "SYSTEM_322",
+ [ RTEMS_RECORD_SYSTEM_323 ] = "SYSTEM_323",
+ [ RTEMS_RECORD_SYSTEM_324 ] = "SYSTEM_324",
+ [ RTEMS_RECORD_SYSTEM_325 ] = "SYSTEM_325",
+ [ RTEMS_RECORD_SYSTEM_326 ] = "SYSTEM_326",
+ [ RTEMS_RECORD_SYSTEM_327 ] = "SYSTEM_327",
+ [ RTEMS_RECORD_SYSTEM_328 ] = "SYSTEM_328",
+ [ RTEMS_RECORD_SYSTEM_329 ] = "SYSTEM_329",
+ [ RTEMS_RECORD_SYSTEM_330 ] = "SYSTEM_330",
+ [ RTEMS_RECORD_SYSTEM_331 ] = "SYSTEM_331",
+ [ RTEMS_RECORD_SYSTEM_332 ] = "SYSTEM_332",
+ [ RTEMS_RECORD_SYSTEM_333 ] = "SYSTEM_333",
+ [ RTEMS_RECORD_SYSTEM_334 ] = "SYSTEM_334",
+ [ RTEMS_RECORD_SYSTEM_335 ] = "SYSTEM_335",
+ [ RTEMS_RECORD_SYSTEM_336 ] = "SYSTEM_336",
+ [ RTEMS_RECORD_SYSTEM_337 ] = "SYSTEM_337",
+ [ RTEMS_RECORD_SYSTEM_338 ] = "SYSTEM_338",
+ [ RTEMS_RECORD_SYSTEM_339 ] = "SYSTEM_339",
+ [ RTEMS_RECORD_SYSTEM_340 ] = "SYSTEM_340",
+ [ RTEMS_RECORD_SYSTEM_341 ] = "SYSTEM_341",
+ [ RTEMS_RECORD_SYSTEM_342 ] = "SYSTEM_342",
+ [ RTEMS_RECORD_SYSTEM_343 ] = "SYSTEM_343",
+ [ RTEMS_RECORD_SYSTEM_344 ] = "SYSTEM_344",
+ [ RTEMS_RECORD_SYSTEM_345 ] = "SYSTEM_345",
+ [ RTEMS_RECORD_SYSTEM_346 ] = "SYSTEM_346",
+ [ RTEMS_RECORD_SYSTEM_347 ] = "SYSTEM_347",
+ [ RTEMS_RECORD_SYSTEM_348 ] = "SYSTEM_348",
+ [ RTEMS_RECORD_SYSTEM_349 ] = "SYSTEM_349",
+ [ RTEMS_RECORD_SYSTEM_350 ] = "SYSTEM_350",
+ [ RTEMS_RECORD_SYSTEM_351 ] = "SYSTEM_351",
+ [ RTEMS_RECORD_SYSTEM_352 ] = "SYSTEM_352",
+ [ RTEMS_RECORD_SYSTEM_353 ] = "SYSTEM_353",
+ [ RTEMS_RECORD_SYSTEM_354 ] = "SYSTEM_354",
+ [ RTEMS_RECORD_SYSTEM_355 ] = "SYSTEM_355",
+ [ RTEMS_RECORD_SYSTEM_356 ] = "SYSTEM_356",
+ [ RTEMS_RECORD_SYSTEM_357 ] = "SYSTEM_357",
+ [ RTEMS_RECORD_SYSTEM_358 ] = "SYSTEM_358",
+ [ RTEMS_RECORD_SYSTEM_359 ] = "SYSTEM_359",
+ [ RTEMS_RECORD_SYSTEM_360 ] = "SYSTEM_360",
+ [ RTEMS_RECORD_SYSTEM_361 ] = "SYSTEM_361",
+ [ RTEMS_RECORD_SYSTEM_362 ] = "SYSTEM_362",
+ [ RTEMS_RECORD_SYSTEM_363 ] = "SYSTEM_363",
+ [ RTEMS_RECORD_SYSTEM_364 ] = "SYSTEM_364",
+ [ RTEMS_RECORD_SYSTEM_365 ] = "SYSTEM_365",
+ [ RTEMS_RECORD_SYSTEM_366 ] = "SYSTEM_366",
+ [ RTEMS_RECORD_SYSTEM_367 ] = "SYSTEM_367",
+ [ RTEMS_RECORD_SYSTEM_368 ] = "SYSTEM_368",
+ [ RTEMS_RECORD_SYSTEM_369 ] = "SYSTEM_369",
+ [ RTEMS_RECORD_SYSTEM_370 ] = "SYSTEM_370",
+ [ RTEMS_RECORD_SYSTEM_371 ] = "SYSTEM_371",
+ [ RTEMS_RECORD_SYSTEM_372 ] = "SYSTEM_372",
+ [ RTEMS_RECORD_SYSTEM_373 ] = "SYSTEM_373",
+ [ RTEMS_RECORD_SYSTEM_374 ] = "SYSTEM_374",
+ [ RTEMS_RECORD_SYSTEM_375 ] = "SYSTEM_375",
+ [ RTEMS_RECORD_SYSTEM_376 ] = "SYSTEM_376",
+ [ RTEMS_RECORD_SYSTEM_377 ] = "SYSTEM_377",
+ [ RTEMS_RECORD_SYSTEM_378 ] = "SYSTEM_378",
+ [ RTEMS_RECORD_SYSTEM_379 ] = "SYSTEM_379",
+ [ RTEMS_RECORD_SYSTEM_380 ] = "SYSTEM_380",
+ [ RTEMS_RECORD_SYSTEM_381 ] = "SYSTEM_381",
+ [ RTEMS_RECORD_SYSTEM_382 ] = "SYSTEM_382",
+ [ RTEMS_RECORD_SYSTEM_383 ] = "SYSTEM_383",
+ [ RTEMS_RECORD_SYSTEM_384 ] = "SYSTEM_384",
+ [ RTEMS_RECORD_SYSTEM_385 ] = "SYSTEM_385",
+ [ RTEMS_RECORD_SYSTEM_386 ] = "SYSTEM_386",
+ [ RTEMS_RECORD_SYSTEM_387 ] = "SYSTEM_387",
+ [ RTEMS_RECORD_SYSTEM_388 ] = "SYSTEM_388",
+ [ RTEMS_RECORD_SYSTEM_389 ] = "SYSTEM_389",
+ [ RTEMS_RECORD_SYSTEM_390 ] = "SYSTEM_390",
+ [ RTEMS_RECORD_SYSTEM_391 ] = "SYSTEM_391",
+ [ RTEMS_RECORD_SYSTEM_392 ] = "SYSTEM_392",
+ [ RTEMS_RECORD_SYSTEM_393 ] = "SYSTEM_393",
+ [ RTEMS_RECORD_SYSTEM_394 ] = "SYSTEM_394",
+ [ RTEMS_RECORD_SYSTEM_395 ] = "SYSTEM_395",
+ [ RTEMS_RECORD_SYSTEM_396 ] = "SYSTEM_396",
+ [ RTEMS_RECORD_SYSTEM_397 ] = "SYSTEM_397",
+ [ RTEMS_RECORD_SYSTEM_398 ] = "SYSTEM_398",
+ [ RTEMS_RECORD_SYSTEM_399 ] = "SYSTEM_399",
+ [ RTEMS_RECORD_SYSTEM_400 ] = "SYSTEM_400",
+ [ RTEMS_RECORD_SYSTEM_401 ] = "SYSTEM_401",
+ [ RTEMS_RECORD_SYSTEM_402 ] = "SYSTEM_402",
+ [ RTEMS_RECORD_SYSTEM_403 ] = "SYSTEM_403",
+ [ RTEMS_RECORD_SYSTEM_404 ] = "SYSTEM_404",
+ [ RTEMS_RECORD_SYSTEM_405 ] = "SYSTEM_405",
+ [ RTEMS_RECORD_SYSTEM_406 ] = "SYSTEM_406",
+ [ RTEMS_RECORD_SYSTEM_407 ] = "SYSTEM_407",
+ [ RTEMS_RECORD_SYSTEM_408 ] = "SYSTEM_408",
+ [ RTEMS_RECORD_SYSTEM_409 ] = "SYSTEM_409",
+ [ RTEMS_RECORD_SYSTEM_410 ] = "SYSTEM_410",
+ [ RTEMS_RECORD_SYSTEM_411 ] = "SYSTEM_411",
+ [ RTEMS_RECORD_SYSTEM_412 ] = "SYSTEM_412",
+ [ RTEMS_RECORD_SYSTEM_413 ] = "SYSTEM_413",
+ [ RTEMS_RECORD_SYSTEM_414 ] = "SYSTEM_414",
+ [ RTEMS_RECORD_SYSTEM_415 ] = "SYSTEM_415",
+ [ RTEMS_RECORD_SYSTEM_416 ] = "SYSTEM_416",
+ [ RTEMS_RECORD_SYSTEM_417 ] = "SYSTEM_417",
+ [ RTEMS_RECORD_SYSTEM_418 ] = "SYSTEM_418",
+ [ RTEMS_RECORD_SYSTEM_419 ] = "SYSTEM_419",
+ [ RTEMS_RECORD_SYSTEM_420 ] = "SYSTEM_420",
+ [ RTEMS_RECORD_SYSTEM_421 ] = "SYSTEM_421",
+ [ RTEMS_RECORD_SYSTEM_422 ] = "SYSTEM_422",
+ [ RTEMS_RECORD_SYSTEM_423 ] = "SYSTEM_423",
+ [ RTEMS_RECORD_SYSTEM_424 ] = "SYSTEM_424",
+ [ RTEMS_RECORD_SYSTEM_425 ] = "SYSTEM_425",
+ [ RTEMS_RECORD_SYSTEM_426 ] = "SYSTEM_426",
+ [ RTEMS_RECORD_SYSTEM_427 ] = "SYSTEM_427",
+ [ RTEMS_RECORD_SYSTEM_428 ] = "SYSTEM_428",
+ [ RTEMS_RECORD_SYSTEM_429 ] = "SYSTEM_429",
+ [ RTEMS_RECORD_SYSTEM_430 ] = "SYSTEM_430",
+ [ RTEMS_RECORD_SYSTEM_431 ] = "SYSTEM_431",
+ [ RTEMS_RECORD_SYSTEM_432 ] = "SYSTEM_432",
+ [ RTEMS_RECORD_SYSTEM_433 ] = "SYSTEM_433",
+ [ RTEMS_RECORD_SYSTEM_434 ] = "SYSTEM_434",
+ [ RTEMS_RECORD_SYSTEM_435 ] = "SYSTEM_435",
+ [ RTEMS_RECORD_SYSTEM_436 ] = "SYSTEM_436",
+ [ RTEMS_RECORD_SYSTEM_437 ] = "SYSTEM_437",
+ [ RTEMS_RECORD_SYSTEM_438 ] = "SYSTEM_438",
+ [ RTEMS_RECORD_SYSTEM_439 ] = "SYSTEM_439",
+ [ RTEMS_RECORD_SYSTEM_440 ] = "SYSTEM_440",
+ [ RTEMS_RECORD_SYSTEM_441 ] = "SYSTEM_441",
+ [ RTEMS_RECORD_SYSTEM_442 ] = "SYSTEM_442",
+ [ RTEMS_RECORD_SYSTEM_443 ] = "SYSTEM_443",
+ [ RTEMS_RECORD_SYSTEM_444 ] = "SYSTEM_444",
+ [ RTEMS_RECORD_SYSTEM_445 ] = "SYSTEM_445",
+ [ RTEMS_RECORD_SYSTEM_446 ] = "SYSTEM_446",
+ [ RTEMS_RECORD_SYSTEM_447 ] = "SYSTEM_447",
+ [ RTEMS_RECORD_SYSTEM_448 ] = "SYSTEM_448",
+ [ RTEMS_RECORD_SYSTEM_449 ] = "SYSTEM_449",
+ [ RTEMS_RECORD_SYSTEM_450 ] = "SYSTEM_450",
+ [ RTEMS_RECORD_SYSTEM_451 ] = "SYSTEM_451",
+ [ RTEMS_RECORD_SYSTEM_452 ] = "SYSTEM_452",
+ [ RTEMS_RECORD_SYSTEM_453 ] = "SYSTEM_453",
+ [ RTEMS_RECORD_SYSTEM_454 ] = "SYSTEM_454",
+ [ RTEMS_RECORD_SYSTEM_455 ] = "SYSTEM_455",
+ [ RTEMS_RECORD_SYSTEM_456 ] = "SYSTEM_456",
+ [ RTEMS_RECORD_SYSTEM_457 ] = "SYSTEM_457",
+ [ RTEMS_RECORD_SYSTEM_458 ] = "SYSTEM_458",
+ [ RTEMS_RECORD_SYSTEM_459 ] = "SYSTEM_459",
+ [ RTEMS_RECORD_SYSTEM_460 ] = "SYSTEM_460",
+ [ RTEMS_RECORD_SYSTEM_461 ] = "SYSTEM_461",
+ [ RTEMS_RECORD_SYSTEM_462 ] = "SYSTEM_462",
+ [ RTEMS_RECORD_SYSTEM_463 ] = "SYSTEM_463",
+ [ RTEMS_RECORD_SYSTEM_464 ] = "SYSTEM_464",
+ [ RTEMS_RECORD_SYSTEM_465 ] = "SYSTEM_465",
+ [ RTEMS_RECORD_SYSTEM_466 ] = "SYSTEM_466",
+ [ RTEMS_RECORD_SYSTEM_467 ] = "SYSTEM_467",
+ [ RTEMS_RECORD_SYSTEM_468 ] = "SYSTEM_468",
+ [ RTEMS_RECORD_SYSTEM_469 ] = "SYSTEM_469",
+ [ RTEMS_RECORD_SYSTEM_470 ] = "SYSTEM_470",
+ [ RTEMS_RECORD_SYSTEM_471 ] = "SYSTEM_471",
+ [ RTEMS_RECORD_SYSTEM_472 ] = "SYSTEM_472",
+ [ RTEMS_RECORD_SYSTEM_473 ] = "SYSTEM_473",
+ [ RTEMS_RECORD_SYSTEM_474 ] = "SYSTEM_474",
+ [ RTEMS_RECORD_SYSTEM_475 ] = "SYSTEM_475",
+ [ RTEMS_RECORD_SYSTEM_476 ] = "SYSTEM_476",
+ [ RTEMS_RECORD_SYSTEM_477 ] = "SYSTEM_477",
+ [ RTEMS_RECORD_SYSTEM_478 ] = "SYSTEM_478",
+ [ RTEMS_RECORD_SYSTEM_479 ] = "SYSTEM_479",
+ [ RTEMS_RECORD_SYSTEM_480 ] = "SYSTEM_480",
+ [ RTEMS_RECORD_SYSTEM_481 ] = "SYSTEM_481",
+ [ RTEMS_RECORD_SYSTEM_482 ] = "SYSTEM_482",
+ [ RTEMS_RECORD_SYSTEM_483 ] = "SYSTEM_483",
+ [ RTEMS_RECORD_SYSTEM_484 ] = "SYSTEM_484",
+ [ RTEMS_RECORD_SYSTEM_485 ] = "SYSTEM_485",
+ [ RTEMS_RECORD_SYSTEM_486 ] = "SYSTEM_486",
+ [ RTEMS_RECORD_SYSTEM_487 ] = "SYSTEM_487",
+ [ RTEMS_RECORD_SYSTEM_488 ] = "SYSTEM_488",
+ [ RTEMS_RECORD_SYSTEM_489 ] = "SYSTEM_489",
+ [ RTEMS_RECORD_SYSTEM_490 ] = "SYSTEM_490",
+ [ RTEMS_RECORD_SYSTEM_491 ] = "SYSTEM_491",
+ [ RTEMS_RECORD_SYSTEM_492 ] = "SYSTEM_492",
+ [ RTEMS_RECORD_SYSTEM_493 ] = "SYSTEM_493",
+ [ RTEMS_RECORD_SYSTEM_494 ] = "SYSTEM_494",
+ [ RTEMS_RECORD_SYSTEM_495 ] = "SYSTEM_495",
+ [ RTEMS_RECORD_SYSTEM_496 ] = "SYSTEM_496",
+ [ RTEMS_RECORD_SYSTEM_497 ] = "SYSTEM_497",
+ [ RTEMS_RECORD_SYSTEM_498 ] = "SYSTEM_498",
+ [ RTEMS_RECORD_SYSTEM_499 ] = "SYSTEM_499",
+ [ RTEMS_RECORD_SYSTEM_500 ] = "SYSTEM_500",
+ [ RTEMS_RECORD_SYSTEM_501 ] = "SYSTEM_501",
+ [ RTEMS_RECORD_SYSTEM_502 ] = "SYSTEM_502",
+ [ RTEMS_RECORD_SYSTEM_503 ] = "SYSTEM_503",
+ [ RTEMS_RECORD_SYSTEM_504 ] = "SYSTEM_504",
+ [ RTEMS_RECORD_SYSTEM_505 ] = "SYSTEM_505",
+ [ RTEMS_RECORD_SYSTEM_506 ] = "SYSTEM_506",
+ [ RTEMS_RECORD_SYSTEM_507 ] = "SYSTEM_507",
+ [ RTEMS_RECORD_SYSTEM_508 ] = "SYSTEM_508",
+ [ RTEMS_RECORD_SYSTEM_509 ] = "SYSTEM_509",
+ [ RTEMS_RECORD_SYSTEM_510 ] = "SYSTEM_510",
+ [ RTEMS_RECORD_SYSTEM_511 ] = "SYSTEM_511",
+ [ RTEMS_RECORD_USER_0 ] = "USER_0",
+ [ RTEMS_RECORD_USER_1 ] = "USER_1",
+ [ RTEMS_RECORD_USER_2 ] = "USER_2",
+ [ RTEMS_RECORD_USER_3 ] = "USER_3",
+ [ RTEMS_RECORD_USER_4 ] = "USER_4",
+ [ RTEMS_RECORD_USER_5 ] = "USER_5",
+ [ RTEMS_RECORD_USER_6 ] = "USER_6",
+ [ RTEMS_RECORD_USER_7 ] = "USER_7",
+ [ RTEMS_RECORD_USER_8 ] = "USER_8",
+ [ RTEMS_RECORD_USER_9 ] = "USER_9",
+ [ RTEMS_RECORD_USER_10 ] = "USER_10",
+ [ RTEMS_RECORD_USER_11 ] = "USER_11",
+ [ RTEMS_RECORD_USER_12 ] = "USER_12",
+ [ RTEMS_RECORD_USER_13 ] = "USER_13",
+ [ RTEMS_RECORD_USER_14 ] = "USER_14",
+ [ RTEMS_RECORD_USER_15 ] = "USER_15",
+ [ RTEMS_RECORD_USER_16 ] = "USER_16",
+ [ RTEMS_RECORD_USER_17 ] = "USER_17",
+ [ RTEMS_RECORD_USER_18 ] = "USER_18",
+ [ RTEMS_RECORD_USER_19 ] = "USER_19",
+ [ RTEMS_RECORD_USER_20 ] = "USER_20",
+ [ RTEMS_RECORD_USER_21 ] = "USER_21",
+ [ RTEMS_RECORD_USER_22 ] = "USER_22",
+ [ RTEMS_RECORD_USER_23 ] = "USER_23",
+ [ RTEMS_RECORD_USER_24 ] = "USER_24",
+ [ RTEMS_RECORD_USER_25 ] = "USER_25",
+ [ RTEMS_RECORD_USER_26 ] = "USER_26",
+ [ RTEMS_RECORD_USER_27 ] = "USER_27",
+ [ RTEMS_RECORD_USER_28 ] = "USER_28",
+ [ RTEMS_RECORD_USER_29 ] = "USER_29",
+ [ RTEMS_RECORD_USER_30 ] = "USER_30",
+ [ RTEMS_RECORD_USER_31 ] = "USER_31",
+ [ RTEMS_RECORD_USER_32 ] = "USER_32",
+ [ RTEMS_RECORD_USER_33 ] = "USER_33",
+ [ RTEMS_RECORD_USER_34 ] = "USER_34",
+ [ RTEMS_RECORD_USER_35 ] = "USER_35",
+ [ RTEMS_RECORD_USER_36 ] = "USER_36",
+ [ RTEMS_RECORD_USER_37 ] = "USER_37",
+ [ RTEMS_RECORD_USER_38 ] = "USER_38",
+ [ RTEMS_RECORD_USER_39 ] = "USER_39",
+ [ RTEMS_RECORD_USER_40 ] = "USER_40",
+ [ RTEMS_RECORD_USER_41 ] = "USER_41",
+ [ RTEMS_RECORD_USER_42 ] = "USER_42",
+ [ RTEMS_RECORD_USER_43 ] = "USER_43",
+ [ RTEMS_RECORD_USER_44 ] = "USER_44",
+ [ RTEMS_RECORD_USER_45 ] = "USER_45",
+ [ RTEMS_RECORD_USER_46 ] = "USER_46",
+ [ RTEMS_RECORD_USER_47 ] = "USER_47",
+ [ RTEMS_RECORD_USER_48 ] = "USER_48",
+ [ RTEMS_RECORD_USER_49 ] = "USER_49",
+ [ RTEMS_RECORD_USER_50 ] = "USER_50",
+ [ RTEMS_RECORD_USER_51 ] = "USER_51",
+ [ RTEMS_RECORD_USER_52 ] = "USER_52",
+ [ RTEMS_RECORD_USER_53 ] = "USER_53",
+ [ RTEMS_RECORD_USER_54 ] = "USER_54",
+ [ RTEMS_RECORD_USER_55 ] = "USER_55",
+ [ RTEMS_RECORD_USER_56 ] = "USER_56",
+ [ RTEMS_RECORD_USER_57 ] = "USER_57",
+ [ RTEMS_RECORD_USER_58 ] = "USER_58",
+ [ RTEMS_RECORD_USER_59 ] = "USER_59",
+ [ RTEMS_RECORD_USER_60 ] = "USER_60",
+ [ RTEMS_RECORD_USER_61 ] = "USER_61",
+ [ RTEMS_RECORD_USER_62 ] = "USER_62",
+ [ RTEMS_RECORD_USER_63 ] = "USER_63",
+ [ RTEMS_RECORD_USER_64 ] = "USER_64",
+ [ RTEMS_RECORD_USER_65 ] = "USER_65",
+ [ RTEMS_RECORD_USER_66 ] = "USER_66",
+ [ RTEMS_RECORD_USER_67 ] = "USER_67",
+ [ RTEMS_RECORD_USER_68 ] = "USER_68",
+ [ RTEMS_RECORD_USER_69 ] = "USER_69",
+ [ RTEMS_RECORD_USER_70 ] = "USER_70",
+ [ RTEMS_RECORD_USER_71 ] = "USER_71",
+ [ RTEMS_RECORD_USER_72 ] = "USER_72",
+ [ RTEMS_RECORD_USER_73 ] = "USER_73",
+ [ RTEMS_RECORD_USER_74 ] = "USER_74",
+ [ RTEMS_RECORD_USER_75 ] = "USER_75",
+ [ RTEMS_RECORD_USER_76 ] = "USER_76",
+ [ RTEMS_RECORD_USER_77 ] = "USER_77",
+ [ RTEMS_RECORD_USER_78 ] = "USER_78",
+ [ RTEMS_RECORD_USER_79 ] = "USER_79",
+ [ RTEMS_RECORD_USER_80 ] = "USER_80",
+ [ RTEMS_RECORD_USER_81 ] = "USER_81",
+ [ RTEMS_RECORD_USER_82 ] = "USER_82",
+ [ RTEMS_RECORD_USER_83 ] = "USER_83",
+ [ RTEMS_RECORD_USER_84 ] = "USER_84",
+ [ RTEMS_RECORD_USER_85 ] = "USER_85",
+ [ RTEMS_RECORD_USER_86 ] = "USER_86",
+ [ RTEMS_RECORD_USER_87 ] = "USER_87",
+ [ RTEMS_RECORD_USER_88 ] = "USER_88",
+ [ RTEMS_RECORD_USER_89 ] = "USER_89",
+ [ RTEMS_RECORD_USER_90 ] = "USER_90",
+ [ RTEMS_RECORD_USER_91 ] = "USER_91",
+ [ RTEMS_RECORD_USER_92 ] = "USER_92",
+ [ RTEMS_RECORD_USER_93 ] = "USER_93",
+ [ RTEMS_RECORD_USER_94 ] = "USER_94",
+ [ RTEMS_RECORD_USER_95 ] = "USER_95",
+ [ RTEMS_RECORD_USER_96 ] = "USER_96",
+ [ RTEMS_RECORD_USER_97 ] = "USER_97",
+ [ RTEMS_RECORD_USER_98 ] = "USER_98",
+ [ RTEMS_RECORD_USER_99 ] = "USER_99",
+ [ RTEMS_RECORD_USER_100 ] = "USER_100",
+ [ RTEMS_RECORD_USER_101 ] = "USER_101",
+ [ RTEMS_RECORD_USER_102 ] = "USER_102",
+ [ RTEMS_RECORD_USER_103 ] = "USER_103",
+ [ RTEMS_RECORD_USER_104 ] = "USER_104",
+ [ RTEMS_RECORD_USER_105 ] = "USER_105",
+ [ RTEMS_RECORD_USER_106 ] = "USER_106",
+ [ RTEMS_RECORD_USER_107 ] = "USER_107",
+ [ RTEMS_RECORD_USER_108 ] = "USER_108",
+ [ RTEMS_RECORD_USER_109 ] = "USER_109",
+ [ RTEMS_RECORD_USER_110 ] = "USER_110",
+ [ RTEMS_RECORD_USER_111 ] = "USER_111",
+ [ RTEMS_RECORD_USER_112 ] = "USER_112",
+ [ RTEMS_RECORD_USER_113 ] = "USER_113",
+ [ RTEMS_RECORD_USER_114 ] = "USER_114",
+ [ RTEMS_RECORD_USER_115 ] = "USER_115",
+ [ RTEMS_RECORD_USER_116 ] = "USER_116",
+ [ RTEMS_RECORD_USER_117 ] = "USER_117",
+ [ RTEMS_RECORD_USER_118 ] = "USER_118",
+ [ RTEMS_RECORD_USER_119 ] = "USER_119",
+ [ RTEMS_RECORD_USER_120 ] = "USER_120",
+ [ RTEMS_RECORD_USER_121 ] = "USER_121",
+ [ RTEMS_RECORD_USER_122 ] = "USER_122",
+ [ RTEMS_RECORD_USER_123 ] = "USER_123",
+ [ RTEMS_RECORD_USER_124 ] = "USER_124",
+ [ RTEMS_RECORD_USER_125 ] = "USER_125",
+ [ RTEMS_RECORD_USER_126 ] = "USER_126",
+ [ RTEMS_RECORD_USER_127 ] = "USER_127",
+ [ RTEMS_RECORD_USER_128 ] = "USER_128",
+ [ RTEMS_RECORD_USER_129 ] = "USER_129",
+ [ RTEMS_RECORD_USER_130 ] = "USER_130",
+ [ RTEMS_RECORD_USER_131 ] = "USER_131",
+ [ RTEMS_RECORD_USER_132 ] = "USER_132",
+ [ RTEMS_RECORD_USER_133 ] = "USER_133",
+ [ RTEMS_RECORD_USER_134 ] = "USER_134",
+ [ RTEMS_RECORD_USER_135 ] = "USER_135",
+ [ RTEMS_RECORD_USER_136 ] = "USER_136",
+ [ RTEMS_RECORD_USER_137 ] = "USER_137",
+ [ RTEMS_RECORD_USER_138 ] = "USER_138",
+ [ RTEMS_RECORD_USER_139 ] = "USER_139",
+ [ RTEMS_RECORD_USER_140 ] = "USER_140",
+ [ RTEMS_RECORD_USER_141 ] = "USER_141",
+ [ RTEMS_RECORD_USER_142 ] = "USER_142",
+ [ RTEMS_RECORD_USER_143 ] = "USER_143",
+ [ RTEMS_RECORD_USER_144 ] = "USER_144",
+ [ RTEMS_RECORD_USER_145 ] = "USER_145",
+ [ RTEMS_RECORD_USER_146 ] = "USER_146",
+ [ RTEMS_RECORD_USER_147 ] = "USER_147",
+ [ RTEMS_RECORD_USER_148 ] = "USER_148",
+ [ RTEMS_RECORD_USER_149 ] = "USER_149",
+ [ RTEMS_RECORD_USER_150 ] = "USER_150",
+ [ RTEMS_RECORD_USER_151 ] = "USER_151",
+ [ RTEMS_RECORD_USER_152 ] = "USER_152",
+ [ RTEMS_RECORD_USER_153 ] = "USER_153",
+ [ RTEMS_RECORD_USER_154 ] = "USER_154",
+ [ RTEMS_RECORD_USER_155 ] = "USER_155",
+ [ RTEMS_RECORD_USER_156 ] = "USER_156",
+ [ RTEMS_RECORD_USER_157 ] = "USER_157",
+ [ RTEMS_RECORD_USER_158 ] = "USER_158",
+ [ RTEMS_RECORD_USER_159 ] = "USER_159",
+ [ RTEMS_RECORD_USER_160 ] = "USER_160",
+ [ RTEMS_RECORD_USER_161 ] = "USER_161",
+ [ RTEMS_RECORD_USER_162 ] = "USER_162",
+ [ RTEMS_RECORD_USER_163 ] = "USER_163",
+ [ RTEMS_RECORD_USER_164 ] = "USER_164",
+ [ RTEMS_RECORD_USER_165 ] = "USER_165",
+ [ RTEMS_RECORD_USER_166 ] = "USER_166",
+ [ RTEMS_RECORD_USER_167 ] = "USER_167",
+ [ RTEMS_RECORD_USER_168 ] = "USER_168",
+ [ RTEMS_RECORD_USER_169 ] = "USER_169",
+ [ RTEMS_RECORD_USER_170 ] = "USER_170",
+ [ RTEMS_RECORD_USER_171 ] = "USER_171",
+ [ RTEMS_RECORD_USER_172 ] = "USER_172",
+ [ RTEMS_RECORD_USER_173 ] = "USER_173",
+ [ RTEMS_RECORD_USER_174 ] = "USER_174",
+ [ RTEMS_RECORD_USER_175 ] = "USER_175",
+ [ RTEMS_RECORD_USER_176 ] = "USER_176",
+ [ RTEMS_RECORD_USER_177 ] = "USER_177",
+ [ RTEMS_RECORD_USER_178 ] = "USER_178",
+ [ RTEMS_RECORD_USER_179 ] = "USER_179",
+ [ RTEMS_RECORD_USER_180 ] = "USER_180",
+ [ RTEMS_RECORD_USER_181 ] = "USER_181",
+ [ RTEMS_RECORD_USER_182 ] = "USER_182",
+ [ RTEMS_RECORD_USER_183 ] = "USER_183",
+ [ RTEMS_RECORD_USER_184 ] = "USER_184",
+ [ RTEMS_RECORD_USER_185 ] = "USER_185",
+ [ RTEMS_RECORD_USER_186 ] = "USER_186",
+ [ RTEMS_RECORD_USER_187 ] = "USER_187",
+ [ RTEMS_RECORD_USER_188 ] = "USER_188",
+ [ RTEMS_RECORD_USER_189 ] = "USER_189",
+ [ RTEMS_RECORD_USER_190 ] = "USER_190",
+ [ RTEMS_RECORD_USER_191 ] = "USER_191",
+ [ RTEMS_RECORD_USER_192 ] = "USER_192",
+ [ RTEMS_RECORD_USER_193 ] = "USER_193",
+ [ RTEMS_RECORD_USER_194 ] = "USER_194",
+ [ RTEMS_RECORD_USER_195 ] = "USER_195",
+ [ RTEMS_RECORD_USER_196 ] = "USER_196",
+ [ RTEMS_RECORD_USER_197 ] = "USER_197",
+ [ RTEMS_RECORD_USER_198 ] = "USER_198",
+ [ RTEMS_RECORD_USER_199 ] = "USER_199",
+ [ RTEMS_RECORD_USER_200 ] = "USER_200",
+ [ RTEMS_RECORD_USER_201 ] = "USER_201",
+ [ RTEMS_RECORD_USER_202 ] = "USER_202",
+ [ RTEMS_RECORD_USER_203 ] = "USER_203",
+ [ RTEMS_RECORD_USER_204 ] = "USER_204",
+ [ RTEMS_RECORD_USER_205 ] = "USER_205",
+ [ RTEMS_RECORD_USER_206 ] = "USER_206",
+ [ RTEMS_RECORD_USER_207 ] = "USER_207",
+ [ RTEMS_RECORD_USER_208 ] = "USER_208",
+ [ RTEMS_RECORD_USER_209 ] = "USER_209",
+ [ RTEMS_RECORD_USER_210 ] = "USER_210",
+ [ RTEMS_RECORD_USER_211 ] = "USER_211",
+ [ RTEMS_RECORD_USER_212 ] = "USER_212",
+ [ RTEMS_RECORD_USER_213 ] = "USER_213",
+ [ RTEMS_RECORD_USER_214 ] = "USER_214",
+ [ RTEMS_RECORD_USER_215 ] = "USER_215",
+ [ RTEMS_RECORD_USER_216 ] = "USER_216",
+ [ RTEMS_RECORD_USER_217 ] = "USER_217",
+ [ RTEMS_RECORD_USER_218 ] = "USER_218",
+ [ RTEMS_RECORD_USER_219 ] = "USER_219",
+ [ RTEMS_RECORD_USER_220 ] = "USER_220",
+ [ RTEMS_RECORD_USER_221 ] = "USER_221",
+ [ RTEMS_RECORD_USER_222 ] = "USER_222",
+ [ RTEMS_RECORD_USER_223 ] = "USER_223",
+ [ RTEMS_RECORD_USER_224 ] = "USER_224",
+ [ RTEMS_RECORD_USER_225 ] = "USER_225",
+ [ RTEMS_RECORD_USER_226 ] = "USER_226",
+ [ RTEMS_RECORD_USER_227 ] = "USER_227",
+ [ RTEMS_RECORD_USER_228 ] = "USER_228",
+ [ RTEMS_RECORD_USER_229 ] = "USER_229",
+ [ RTEMS_RECORD_USER_230 ] = "USER_230",
+ [ RTEMS_RECORD_USER_231 ] = "USER_231",
+ [ RTEMS_RECORD_USER_232 ] = "USER_232",
+ [ RTEMS_RECORD_USER_233 ] = "USER_233",
+ [ RTEMS_RECORD_USER_234 ] = "USER_234",
+ [ RTEMS_RECORD_USER_235 ] = "USER_235",
+ [ RTEMS_RECORD_USER_236 ] = "USER_236",
+ [ RTEMS_RECORD_USER_237 ] = "USER_237",
+ [ RTEMS_RECORD_USER_238 ] = "USER_238",
+ [ RTEMS_RECORD_USER_239 ] = "USER_239",
+ [ RTEMS_RECORD_USER_240 ] = "USER_240",
+ [ RTEMS_RECORD_USER_241 ] = "USER_241",
+ [ RTEMS_RECORD_USER_242 ] = "USER_242",
+ [ RTEMS_RECORD_USER_243 ] = "USER_243",
+ [ RTEMS_RECORD_USER_244 ] = "USER_244",
+ [ RTEMS_RECORD_USER_245 ] = "USER_245",
+ [ RTEMS_RECORD_USER_246 ] = "USER_246",
+ [ RTEMS_RECORD_USER_247 ] = "USER_247",
+ [ RTEMS_RECORD_USER_248 ] = "USER_248",
+ [ RTEMS_RECORD_USER_249 ] = "USER_249",
+ [ RTEMS_RECORD_USER_250 ] = "USER_250",
+ [ RTEMS_RECORD_USER_251 ] = "USER_251",
+ [ RTEMS_RECORD_USER_252 ] = "USER_252",
+ [ RTEMS_RECORD_USER_253 ] = "USER_253",
+ [ RTEMS_RECORD_USER_254 ] = "USER_254",
+ [ RTEMS_RECORD_USER_255 ] = "USER_255",
+ [ RTEMS_RECORD_USER_256 ] = "USER_256",
+ [ RTEMS_RECORD_USER_257 ] = "USER_257",
+ [ RTEMS_RECORD_USER_258 ] = "USER_258",
+ [ RTEMS_RECORD_USER_259 ] = "USER_259",
+ [ RTEMS_RECORD_USER_260 ] = "USER_260",
+ [ RTEMS_RECORD_USER_261 ] = "USER_261",
+ [ RTEMS_RECORD_USER_262 ] = "USER_262",
+ [ RTEMS_RECORD_USER_263 ] = "USER_263",
+ [ RTEMS_RECORD_USER_264 ] = "USER_264",
+ [ RTEMS_RECORD_USER_265 ] = "USER_265",
+ [ RTEMS_RECORD_USER_266 ] = "USER_266",
+ [ RTEMS_RECORD_USER_267 ] = "USER_267",
+ [ RTEMS_RECORD_USER_268 ] = "USER_268",
+ [ RTEMS_RECORD_USER_269 ] = "USER_269",
+ [ RTEMS_RECORD_USER_270 ] = "USER_270",
+ [ RTEMS_RECORD_USER_271 ] = "USER_271",
+ [ RTEMS_RECORD_USER_272 ] = "USER_272",
+ [ RTEMS_RECORD_USER_273 ] = "USER_273",
+ [ RTEMS_RECORD_USER_274 ] = "USER_274",
+ [ RTEMS_RECORD_USER_275 ] = "USER_275",
+ [ RTEMS_RECORD_USER_276 ] = "USER_276",
+ [ RTEMS_RECORD_USER_277 ] = "USER_277",
+ [ RTEMS_RECORD_USER_278 ] = "USER_278",
+ [ RTEMS_RECORD_USER_279 ] = "USER_279",
+ [ RTEMS_RECORD_USER_280 ] = "USER_280",
+ [ RTEMS_RECORD_USER_281 ] = "USER_281",
+ [ RTEMS_RECORD_USER_282 ] = "USER_282",
+ [ RTEMS_RECORD_USER_283 ] = "USER_283",
+ [ RTEMS_RECORD_USER_284 ] = "USER_284",
+ [ RTEMS_RECORD_USER_285 ] = "USER_285",
+ [ RTEMS_RECORD_USER_286 ] = "USER_286",
+ [ RTEMS_RECORD_USER_287 ] = "USER_287",
+ [ RTEMS_RECORD_USER_288 ] = "USER_288",
+ [ RTEMS_RECORD_USER_289 ] = "USER_289",
+ [ RTEMS_RECORD_USER_290 ] = "USER_290",
+ [ RTEMS_RECORD_USER_291 ] = "USER_291",
+ [ RTEMS_RECORD_USER_292 ] = "USER_292",
+ [ RTEMS_RECORD_USER_293 ] = "USER_293",
+ [ RTEMS_RECORD_USER_294 ] = "USER_294",
+ [ RTEMS_RECORD_USER_295 ] = "USER_295",
+ [ RTEMS_RECORD_USER_296 ] = "USER_296",
+ [ RTEMS_RECORD_USER_297 ] = "USER_297",
+ [ RTEMS_RECORD_USER_298 ] = "USER_298",
+ [ RTEMS_RECORD_USER_299 ] = "USER_299",
+ [ RTEMS_RECORD_USER_300 ] = "USER_300",
+ [ RTEMS_RECORD_USER_301 ] = "USER_301",
+ [ RTEMS_RECORD_USER_302 ] = "USER_302",
+ [ RTEMS_RECORD_USER_303 ] = "USER_303",
+ [ RTEMS_RECORD_USER_304 ] = "USER_304",
+ [ RTEMS_RECORD_USER_305 ] = "USER_305",
+ [ RTEMS_RECORD_USER_306 ] = "USER_306",
+ [ RTEMS_RECORD_USER_307 ] = "USER_307",
+ [ RTEMS_RECORD_USER_308 ] = "USER_308",
+ [ RTEMS_RECORD_USER_309 ] = "USER_309",
+ [ RTEMS_RECORD_USER_310 ] = "USER_310",
+ [ RTEMS_RECORD_USER_311 ] = "USER_311",
+ [ RTEMS_RECORD_USER_312 ] = "USER_312",
+ [ RTEMS_RECORD_USER_313 ] = "USER_313",
+ [ RTEMS_RECORD_USER_314 ] = "USER_314",
+ [ RTEMS_RECORD_USER_315 ] = "USER_315",
+ [ RTEMS_RECORD_USER_316 ] = "USER_316",
+ [ RTEMS_RECORD_USER_317 ] = "USER_317",
+ [ RTEMS_RECORD_USER_318 ] = "USER_318",
+ [ RTEMS_RECORD_USER_319 ] = "USER_319",
+ [ RTEMS_RECORD_USER_320 ] = "USER_320",
+ [ RTEMS_RECORD_USER_321 ] = "USER_321",
+ [ RTEMS_RECORD_USER_322 ] = "USER_322",
+ [ RTEMS_RECORD_USER_323 ] = "USER_323",
+ [ RTEMS_RECORD_USER_324 ] = "USER_324",
+ [ RTEMS_RECORD_USER_325 ] = "USER_325",
+ [ RTEMS_RECORD_USER_326 ] = "USER_326",
+ [ RTEMS_RECORD_USER_327 ] = "USER_327",
+ [ RTEMS_RECORD_USER_328 ] = "USER_328",
+ [ RTEMS_RECORD_USER_329 ] = "USER_329",
+ [ RTEMS_RECORD_USER_330 ] = "USER_330",
+ [ RTEMS_RECORD_USER_331 ] = "USER_331",
+ [ RTEMS_RECORD_USER_332 ] = "USER_332",
+ [ RTEMS_RECORD_USER_333 ] = "USER_333",
+ [ RTEMS_RECORD_USER_334 ] = "USER_334",
+ [ RTEMS_RECORD_USER_335 ] = "USER_335",
+ [ RTEMS_RECORD_USER_336 ] = "USER_336",
+ [ RTEMS_RECORD_USER_337 ] = "USER_337",
+ [ RTEMS_RECORD_USER_338 ] = "USER_338",
+ [ RTEMS_RECORD_USER_339 ] = "USER_339",
+ [ RTEMS_RECORD_USER_340 ] = "USER_340",
+ [ RTEMS_RECORD_USER_341 ] = "USER_341",
+ [ RTEMS_RECORD_USER_342 ] = "USER_342",
+ [ RTEMS_RECORD_USER_343 ] = "USER_343",
+ [ RTEMS_RECORD_USER_344 ] = "USER_344",
+ [ RTEMS_RECORD_USER_345 ] = "USER_345",
+ [ RTEMS_RECORD_USER_346 ] = "USER_346",
+ [ RTEMS_RECORD_USER_347 ] = "USER_347",
+ [ RTEMS_RECORD_USER_348 ] = "USER_348",
+ [ RTEMS_RECORD_USER_349 ] = "USER_349",
+ [ RTEMS_RECORD_USER_350 ] = "USER_350",
+ [ RTEMS_RECORD_USER_351 ] = "USER_351",
+ [ RTEMS_RECORD_USER_352 ] = "USER_352",
+ [ RTEMS_RECORD_USER_353 ] = "USER_353",
+ [ RTEMS_RECORD_USER_354 ] = "USER_354",
+ [ RTEMS_RECORD_USER_355 ] = "USER_355",
+ [ RTEMS_RECORD_USER_356 ] = "USER_356",
+ [ RTEMS_RECORD_USER_357 ] = "USER_357",
+ [ RTEMS_RECORD_USER_358 ] = "USER_358",
+ [ RTEMS_RECORD_USER_359 ] = "USER_359",
+ [ RTEMS_RECORD_USER_360 ] = "USER_360",
+ [ RTEMS_RECORD_USER_361 ] = "USER_361",
+ [ RTEMS_RECORD_USER_362 ] = "USER_362",
+ [ RTEMS_RECORD_USER_363 ] = "USER_363",
+ [ RTEMS_RECORD_USER_364 ] = "USER_364",
+ [ RTEMS_RECORD_USER_365 ] = "USER_365",
+ [ RTEMS_RECORD_USER_366 ] = "USER_366",
+ [ RTEMS_RECORD_USER_367 ] = "USER_367",
+ [ RTEMS_RECORD_USER_368 ] = "USER_368",
+ [ RTEMS_RECORD_USER_369 ] = "USER_369",
+ [ RTEMS_RECORD_USER_370 ] = "USER_370",
+ [ RTEMS_RECORD_USER_371 ] = "USER_371",
+ [ RTEMS_RECORD_USER_372 ] = "USER_372",
+ [ RTEMS_RECORD_USER_373 ] = "USER_373",
+ [ RTEMS_RECORD_USER_374 ] = "USER_374",
+ [ RTEMS_RECORD_USER_375 ] = "USER_375",
+ [ RTEMS_RECORD_USER_376 ] = "USER_376",
+ [ RTEMS_RECORD_USER_377 ] = "USER_377",
+ [ RTEMS_RECORD_USER_378 ] = "USER_378",
+ [ RTEMS_RECORD_USER_379 ] = "USER_379",
+ [ RTEMS_RECORD_USER_380 ] = "USER_380",
+ [ RTEMS_RECORD_USER_381 ] = "USER_381",
+ [ RTEMS_RECORD_USER_382 ] = "USER_382",
+ [ RTEMS_RECORD_USER_383 ] = "USER_383",
+ [ RTEMS_RECORD_USER_384 ] = "USER_384",
+ [ RTEMS_RECORD_USER_385 ] = "USER_385",
+ [ RTEMS_RECORD_USER_386 ] = "USER_386",
+ [ RTEMS_RECORD_USER_387 ] = "USER_387",
+ [ RTEMS_RECORD_USER_388 ] = "USER_388",
+ [ RTEMS_RECORD_USER_389 ] = "USER_389",
+ [ RTEMS_RECORD_USER_390 ] = "USER_390",
+ [ RTEMS_RECORD_USER_391 ] = "USER_391",
+ [ RTEMS_RECORD_USER_392 ] = "USER_392",
+ [ RTEMS_RECORD_USER_393 ] = "USER_393",
+ [ RTEMS_RECORD_USER_394 ] = "USER_394",
+ [ RTEMS_RECORD_USER_395 ] = "USER_395",
+ [ RTEMS_RECORD_USER_396 ] = "USER_396",
+ [ RTEMS_RECORD_USER_397 ] = "USER_397",
+ [ RTEMS_RECORD_USER_398 ] = "USER_398",
+ [ RTEMS_RECORD_USER_399 ] = "USER_399",
+ [ RTEMS_RECORD_USER_400 ] = "USER_400",
+ [ RTEMS_RECORD_USER_401 ] = "USER_401",
+ [ RTEMS_RECORD_USER_402 ] = "USER_402",
+ [ RTEMS_RECORD_USER_403 ] = "USER_403",
+ [ RTEMS_RECORD_USER_404 ] = "USER_404",
+ [ RTEMS_RECORD_USER_405 ] = "USER_405",
+ [ RTEMS_RECORD_USER_406 ] = "USER_406",
+ [ RTEMS_RECORD_USER_407 ] = "USER_407",
+ [ RTEMS_RECORD_USER_408 ] = "USER_408",
+ [ RTEMS_RECORD_USER_409 ] = "USER_409",
+ [ RTEMS_RECORD_USER_410 ] = "USER_410",
+ [ RTEMS_RECORD_USER_411 ] = "USER_411",
+ [ RTEMS_RECORD_USER_412 ] = "USER_412",
+ [ RTEMS_RECORD_USER_413 ] = "USER_413",
+ [ RTEMS_RECORD_USER_414 ] = "USER_414",
+ [ RTEMS_RECORD_USER_415 ] = "USER_415",
+ [ RTEMS_RECORD_USER_416 ] = "USER_416",
+ [ RTEMS_RECORD_USER_417 ] = "USER_417",
+ [ RTEMS_RECORD_USER_418 ] = "USER_418",
+ [ RTEMS_RECORD_USER_419 ] = "USER_419",
+ [ RTEMS_RECORD_USER_420 ] = "USER_420",
+ [ RTEMS_RECORD_USER_421 ] = "USER_421",
+ [ RTEMS_RECORD_USER_422 ] = "USER_422",
+ [ RTEMS_RECORD_USER_423 ] = "USER_423",
+ [ RTEMS_RECORD_USER_424 ] = "USER_424",
+ [ RTEMS_RECORD_USER_425 ] = "USER_425",
+ [ RTEMS_RECORD_USER_426 ] = "USER_426",
+ [ RTEMS_RECORD_USER_427 ] = "USER_427",
+ [ RTEMS_RECORD_USER_428 ] = "USER_428",
+ [ RTEMS_RECORD_USER_429 ] = "USER_429",
+ [ RTEMS_RECORD_USER_430 ] = "USER_430",
+ [ RTEMS_RECORD_USER_431 ] = "USER_431",
+ [ RTEMS_RECORD_USER_432 ] = "USER_432",
+ [ RTEMS_RECORD_USER_433 ] = "USER_433",
+ [ RTEMS_RECORD_USER_434 ] = "USER_434",
+ [ RTEMS_RECORD_USER_435 ] = "USER_435",
+ [ RTEMS_RECORD_USER_436 ] = "USER_436",
+ [ RTEMS_RECORD_USER_437 ] = "USER_437",
+ [ RTEMS_RECORD_USER_438 ] = "USER_438",
+ [ RTEMS_RECORD_USER_439 ] = "USER_439",
+ [ RTEMS_RECORD_USER_440 ] = "USER_440",
+ [ RTEMS_RECORD_USER_441 ] = "USER_441",
+ [ RTEMS_RECORD_USER_442 ] = "USER_442",
+ [ RTEMS_RECORD_USER_443 ] = "USER_443",
+ [ RTEMS_RECORD_USER_444 ] = "USER_444",
+ [ RTEMS_RECORD_USER_445 ] = "USER_445",
+ [ RTEMS_RECORD_USER_446 ] = "USER_446",
+ [ RTEMS_RECORD_USER_447 ] = "USER_447",
+ [ RTEMS_RECORD_USER_448 ] = "USER_448",
+ [ RTEMS_RECORD_USER_449 ] = "USER_449",
+ [ RTEMS_RECORD_USER_450 ] = "USER_450",
+ [ RTEMS_RECORD_USER_451 ] = "USER_451",
+ [ RTEMS_RECORD_USER_452 ] = "USER_452",
+ [ RTEMS_RECORD_USER_453 ] = "USER_453",
+ [ RTEMS_RECORD_USER_454 ] = "USER_454",
+ [ RTEMS_RECORD_USER_455 ] = "USER_455",
+ [ RTEMS_RECORD_USER_456 ] = "USER_456",
+ [ RTEMS_RECORD_USER_457 ] = "USER_457",
+ [ RTEMS_RECORD_USER_458 ] = "USER_458",
+ [ RTEMS_RECORD_USER_459 ] = "USER_459",
+ [ RTEMS_RECORD_USER_460 ] = "USER_460",
+ [ RTEMS_RECORD_USER_461 ] = "USER_461",
+ [ RTEMS_RECORD_USER_462 ] = "USER_462",
+ [ RTEMS_RECORD_USER_463 ] = "USER_463",
+ [ RTEMS_RECORD_USER_464 ] = "USER_464",
+ [ RTEMS_RECORD_USER_465 ] = "USER_465",
+ [ RTEMS_RECORD_USER_466 ] = "USER_466",
+ [ RTEMS_RECORD_USER_467 ] = "USER_467",
+ [ RTEMS_RECORD_USER_468 ] = "USER_468",
+ [ RTEMS_RECORD_USER_469 ] = "USER_469",
+ [ RTEMS_RECORD_USER_470 ] = "USER_470",
+ [ RTEMS_RECORD_USER_471 ] = "USER_471",
+ [ RTEMS_RECORD_USER_472 ] = "USER_472",
+ [ RTEMS_RECORD_USER_473 ] = "USER_473",
+ [ RTEMS_RECORD_USER_474 ] = "USER_474",
+ [ RTEMS_RECORD_USER_475 ] = "USER_475",
+ [ RTEMS_RECORD_USER_476 ] = "USER_476",
+ [ RTEMS_RECORD_USER_477 ] = "USER_477",
+ [ RTEMS_RECORD_USER_478 ] = "USER_478",
+ [ RTEMS_RECORD_USER_479 ] = "USER_479",
+ [ RTEMS_RECORD_USER_480 ] = "USER_480",
+ [ RTEMS_RECORD_USER_481 ] = "USER_481",
+ [ RTEMS_RECORD_USER_482 ] = "USER_482",
+ [ RTEMS_RECORD_USER_483 ] = "USER_483",
+ [ RTEMS_RECORD_USER_484 ] = "USER_484",
+ [ RTEMS_RECORD_USER_485 ] = "USER_485",
+ [ RTEMS_RECORD_USER_486 ] = "USER_486",
+ [ RTEMS_RECORD_USER_487 ] = "USER_487",
+ [ RTEMS_RECORD_USER_488 ] = "USER_488",
+ [ RTEMS_RECORD_USER_489 ] = "USER_489",
+ [ RTEMS_RECORD_USER_490 ] = "USER_490",
+ [ RTEMS_RECORD_USER_491 ] = "USER_491",
+ [ RTEMS_RECORD_USER_492 ] = "USER_492",
+ [ RTEMS_RECORD_USER_493 ] = "USER_493",
+ [ RTEMS_RECORD_USER_494 ] = "USER_494",
+ [ RTEMS_RECORD_USER_495 ] = "USER_495",
+ [ RTEMS_RECORD_USER_496 ] = "USER_496",
+ [ RTEMS_RECORD_USER_497 ] = "USER_497",
+ [ RTEMS_RECORD_USER_498 ] = "USER_498",
+ [ RTEMS_RECORD_USER_499 ] = "USER_499",
+ [ RTEMS_RECORD_USER_500 ] = "USER_500",
+ [ RTEMS_RECORD_USER_501 ] = "USER_501",
+ [ RTEMS_RECORD_USER_502 ] = "USER_502",
+ [ RTEMS_RECORD_USER_503 ] = "USER_503",
+ [ RTEMS_RECORD_USER_504 ] = "USER_504",
+ [ RTEMS_RECORD_USER_505 ] = "USER_505",
+ [ RTEMS_RECORD_USER_506 ] = "USER_506",
+ [ RTEMS_RECORD_USER_507 ] = "USER_507",
+ [ RTEMS_RECORD_USER_508 ] = "USER_508",
+ [ RTEMS_RECORD_USER_509 ] = "USER_509",
+ [ RTEMS_RECORD_USER_510 ] = "USER_510",
+ [ RTEMS_RECORD_USER_511 ] = "USER_511"
+};
+
+const char *rtems_record_event_text( rtems_record_event event )
+{
+ return event_text[ event ];
+}
diff --git a/misc/record/rtems/recordclient.h b/misc/record/rtems/recordclient.h
new file mode 100644
index 0000000..61ef967
--- /dev/null
+++ b/misc/record/rtems/recordclient.h
@@ -0,0 +1,139 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2018, 2019 embedded brains GmbH
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * This file must be compatible to general purpose POSIX system, e.g. Linux,
+ * FreeBSD. It may be used for utility programs.
+ */
+
+#ifndef _RTEMS_RECORDCLIENT_H
+#define _RTEMS_RECORDCLIENT_H
+
+#include "recorddata.h"
+
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/**
+ * @addtogroup RTEMSRecord
+ *
+ * @{
+ */
+
+#define RTEMS_RECORD_CLIENT_MAXIMUM_CPU_COUNT 32
+
+typedef enum {
+ RTEMS_RECORD_CLIENT_SUCCESS,
+ RTEMS_RECORD_CLIENT_ERROR_INVALID_MAGIC,
+ RTEMS_RECORD_CLIENT_ERROR_UNKNOWN_FORMAT,
+ RTEMS_RECORD_CLIENT_ERROR_UNSUPPORTED_VERSION,
+ RTEMS_RECORD_CLIENT_ERROR_UNSUPPORTED_CPU
+} rtems_record_client_status;
+
+typedef rtems_record_client_status ( *rtems_record_client_handler )(
+ uint32_t seconds,
+ uint32_t nanoseconds,
+ uint32_t cpu,
+ rtems_record_event event,
+ uint64_t data,
+ void *arg
+);
+
+typedef struct {
+ struct {
+ uint64_t bt;
+ uint32_t time_at_bt;
+ uint32_t time_last;
+ uint32_t time_accumulated;
+ } uptime;
+ uint32_t tail[ 2 ];
+ uint32_t head[ 2 ];
+ size_t index;
+} rtems_record_client_per_cpu;
+
+typedef struct rtems_record_client_context {
+ uint64_t to_bt_scaler;
+ rtems_record_client_per_cpu per_cpu[ RTEMS_RECORD_CLIENT_MAXIMUM_CPU_COUNT ];
+ uint64_t data;
+ uint32_t cpu;
+ uint32_t event;
+ uint32_t count;
+ union {
+ rtems_record_item_32 format_32;
+ rtems_record_item_64 format_64;
+ } item;
+ size_t todo;
+ void *pos;
+ rtems_record_client_status ( *consume )(
+ struct rtems_record_client_context *,
+ const void *,
+ size_t
+ );
+ rtems_record_client_handler handler;
+ void *handler_arg;
+ uint32_t header[ 2 ];
+} rtems_record_client_context;
+
+/**
+ * @brief Initializes a record client.
+ *
+ * The record client consumes a record item stream produces by the record
+ * server.
+ *
+ * @param ctx The record client context to initialize.
+ * @param handler The handler is invoked for each received record item.
+ * @param arg The handler argument.
+ */
+void rtems_record_client_init(
+ rtems_record_client_context *ctx,
+ rtems_record_client_handler handler,
+ void *arg
+);
+
+/**
+ * @brief Runs the record client to consume new stream data.
+ *
+ * @param ctx The record client context.
+ * @param buf The buffer with new stream data.
+ * @param n The size of the buffer.
+ */
+rtems_record_client_status rtems_record_client_run(
+ rtems_record_client_context *ctx,
+ const void *buf,
+ size_t n
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* _RTEMS_RECORDCLIENT_H */
diff --git a/misc/record/rtems/recorddata.h b/misc/record/rtems/recorddata.h
new file mode 100644
index 0000000..56c7f1c
--- /dev/null
+++ b/misc/record/rtems/recorddata.h
@@ -0,0 +1,1202 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2018, 2019 embedded brains GmbH
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * This file must be compatible to general purpose POSIX system, e.g. Linux,
+ * FreeBSD. It may be used for utility programs.
+ */
+
+#ifndef _RTEMS_RECORDDATA_H
+#define _RTEMS_RECORDDATA_H
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/**
+ * @defgroup RTEMSRecord Event Recording
+ *
+ * @brief Low-level event recording support.
+ *
+ * @{
+ */
+
+/**
+ * @brief The record version.
+ *
+ * The record version reflects the record event definitions. It is reported by
+ * the RTEMS_RECORD_VERSION event.
+ */
+#define RTEMS_RECORD_THE_VERSION 1
+
+/**
+ * @brief The items are in 32-bit little-endian format.
+ */
+#define RTEMS_RECORD_FORMAT_LE_32 0x11111111
+
+/**
+ * @brief The items are in 64-bit little-endian format.
+ */
+#define RTEMS_RECORD_FORMAT_LE_64 0x22222222
+
+/**
+ * @brief The items are in 32-bit big-endian format.
+ */
+#define RTEMS_RECORD_FORMAT_BE_32 0x33333333
+
+/**
+ * @brief The items are in 64-bit big-endian format.
+ */
+#define RTEMS_RECORD_FORMAT_BE_64 0x44444444
+
+/**
+ * @brief Magic number to identify a record item stream.
+ *
+ * This is a random number.
+ */
+#define RTEMS_RECORD_MAGIC 0x82e14ec1
+
+/**
+ * @brief The record events.
+ */
+typedef enum {
+ /* There are 512 events reserved for the system */
+ RTEMS_RECORD_EMPTY,
+ RTEMS_RECORD_VERSION,
+
+ /*
+ * Keep the following system events in lexicographical order, increment
+ * RTEMS_RECORD_THE_VERSION after each change.
+ */
+ RTEMS_RECORD_ACCEPT,
+ RTEMS_RECORD_BIND,
+ RTEMS_RECORD_BUFFER,
+ RTEMS_RECORD_CHOWN,
+ RTEMS_RECORD_CLOSE,
+ RTEMS_RECORD_CONNECT,
+ RTEMS_RECORD_COUNT,
+ RTEMS_RECORD_ETHER_INPUT,
+ RTEMS_RECORD_ETHER_OUTPUT,
+ RTEMS_RECORD_FCHMOD,
+ RTEMS_RECORD_FCNTL,
+ RTEMS_RECORD_FDATASYNC,
+ RTEMS_RECORD_FREQUENCY,
+ RTEMS_RECORD_FSTAT,
+ RTEMS_RECORD_FSYNC,
+ RTEMS_RECORD_FTRUNCATE,
+ RTEMS_RECORD_GIT_HASH,
+ RTEMS_RECORD_HEAD,
+ RTEMS_RECORD_HEAP_ALLOC,
+ RTEMS_RECORD_HEAP_FREE,
+ RTEMS_RECORD_HEAP_SIZE,
+ RTEMS_RECORD_HEAP_USAGE,
+ RTEMS_RECORD_INTERUPT_BEGIN,
+ RTEMS_RECORD_INTERUPT_END,
+ RTEMS_RECORD_INTERUPT_INSTALL,
+ RTEMS_RECORD_INTERUPT_REMOVE,
+ RTEMS_RECORD_IOCTL,
+ RTEMS_RECORD_IP6_INPUT,
+ RTEMS_RECORD_IP6_OUTPUT,
+ RTEMS_RECORD_IP_INPUT,
+ RTEMS_RECORD_IP_OUTPUT,
+ RTEMS_RECORD_KEVENT,
+ RTEMS_RECORD_KQUEUE,
+ RTEMS_RECORD_LENGTH,
+ RTEMS_RECORD_LINK,
+ RTEMS_RECORD_LSEEK,
+ RTEMS_RECORD_MKNOD,
+ RTEMS_RECORD_MMAP,
+ RTEMS_RECORD_MOUNT,
+ RTEMS_RECORD_OPEN,
+ RTEMS_RECORD_OVERFLOW,
+ RTEMS_RECORD_PAGE_ALLOC,
+ RTEMS_RECORD_PAGE_FREE,
+ RTEMS_RECORD_POLL,
+ RTEMS_RECORD_PROCESSOR,
+ RTEMS_RECORD_PROCESSOR_MAXIMUM,
+ RTEMS_RECORD_READ,
+ RTEMS_RECORD_READLINK,
+ RTEMS_RECORD_READV,
+ RTEMS_RECORD_RECV,
+ RTEMS_RECORD_RECVFROM,
+ RTEMS_RECORD_RECVMSG,
+ RTEMS_RECORD_RENAME,
+ RTEMS_RECORD_RTEMS_BARRIER_CREATE,
+ RTEMS_RECORD_RTEMS_BARRIER_DELETE,
+ RTEMS_RECORD_RTEMS_BARRIER_RELEASE,
+ RTEMS_RECORD_RTEMS_BARRIER_WAIT,
+ RTEMS_RECORD_RTEMS_EVENT_RECEIVE,
+ RTEMS_RECORD_RTEMS_EVENT_SEND,
+ RTEMS_RECORD_RTEMS_EVENT_SYSTEM_RECEIVE,
+ RTEMS_RECORD_RTEMS_EVENT_SYSTEM_SEND,
+ RTEMS_RECORD_RTEMS_MESSAGE_QUEUE_BROADCAST,
+ RTEMS_RECORD_RTEMS_MESSAGE_QUEUE_CREATE,
+ RTEMS_RECORD_RTEMS_MESSAGE_QUEUE_DELETE,
+ RTEMS_RECORD_RTEMS_MESSAGE_QUEUE_FLUSH,
+ RTEMS_RECORD_RTEMS_MESSAGE_QUEUE_RECEIVE,
+ RTEMS_RECORD_RTEMS_MESSAGE_QUEUE_SEND,
+ RTEMS_RECORD_RTEMS_MESSAGE_QUEUE_URGENT,
+ RTEMS_RECORD_RTEMS_PARTITION_CREATE,
+ RTEMS_RECORD_RTEMS_PARTITION_DELETE,
+ RTEMS_RECORD_RTEMS_PARTITION_GET_BUFFER,
+ RTEMS_RECORD_RTEMS_PARTITION_RETURN_BUFFER,
+ RTEMS_RECORD_RTEMS_RATE_MONOTONIC_CANCEL,
+ RTEMS_RECORD_RTEMS_RATE_MONOTONIC_CREATE,
+ RTEMS_RECORD_RTEMS_RATE_MONOTONIC_DELETE,
+ RTEMS_RECORD_RTEMS_RATE_MONOTONIC_PERIOD,
+ RTEMS_RECORD_RTEMS_SEMAPHORE_CREATE,
+ RTEMS_RECORD_RTEMS_SEMAPHORE_DELETE,
+ RTEMS_RECORD_RTEMS_SEMAPHORE_FLUSH,
+ RTEMS_RECORD_RTEMS_SEMAPHORE_OBTAIN,
+ RTEMS_RECORD_RTEMS_SEMAPHORE_RELEASE,
+ RTEMS_RECORD_RTEMS_TIMER_CANCEL,
+ RTEMS_RECORD_RTEMS_TIMER_CREATE,
+ RTEMS_RECORD_RTEMS_TIMER_DELETE,
+ RTEMS_RECORD_RTEMS_TIMER_FIRE_AFTER,
+ RTEMS_RECORD_RTEMS_TIMER_FIRE_WHEN,
+ RTEMS_RECORD_RTEMS_TIMER_RESET,
+ RTEMS_RECORD_RTEMS_TIMER_SERVER_FIRE_AFTER,
+ RTEMS_RECORD_RTEMS_TIMER_SERVER_FIRE_WHEN,
+ RTEMS_RECORD_SELECT,
+ RTEMS_RECORD_SEND,
+ RTEMS_RECORD_SENDMSG,
+ RTEMS_RECORD_SENDTO,
+ RTEMS_RECORD_SOCKET,
+ RTEMS_RECORD_STATVFS,
+ RTEMS_RECORD_SYMLINK,
+ RTEMS_RECORD_TAIL,
+ RTEMS_RECORD_TCP_INPUT,
+ RTEMS_RECORD_TCP_OUTPUT,
+ RTEMS_RECORD_THREAD_BEGIN,
+ RTEMS_RECORD_THREAD_CREATE,
+ RTEMS_RECORD_THREAD_DELETE,
+ RTEMS_RECORD_THREAD_EXIT,
+ RTEMS_RECORD_THREAD_EXITTED,
+ RTEMS_RECORD_THREAD_ID,
+ RTEMS_RECORD_THREAD_PRIO_CURRENT_HIGH,
+ RTEMS_RECORD_THREAD_PRIO_CURRENT_LOW,
+ RTEMS_RECORD_THREAD_PRIO_REAL_HIGH,
+ RTEMS_RECORD_THREAD_PRIO_REAL_LOW,
+ RTEMS_RECORD_THREAD_QUEUE_ENQUEUE,
+ RTEMS_RECORD_THREAD_QUEUE_ENQUEUE_STICKY,
+ RTEMS_RECORD_THREAD_QUEUE_EXTRACT,
+ RTEMS_RECORD_THREAD_QUEUE_SURRENDER,
+ RTEMS_RECORD_THREAD_QUEUE_SURRENDER_STICKY,
+ RTEMS_RECORD_THREAD_RESTART,
+ RTEMS_RECORD_THREAD_STACK_CURRENT,
+ RTEMS_RECORD_THREAD_STACK_SIZE,
+ RTEMS_RECORD_THREAD_STACK_USAGE,
+ RTEMS_RECORD_THREAD_START,
+ RTEMS_RECORD_THREAD_STATE_CLEAR,
+ RTEMS_RECORD_THREAD_STATE_SET,
+ RTEMS_RECORD_THREAD_SWITCH_IN,
+ RTEMS_RECORD_THREAD_SWITCH_OUT,
+ RTEMS_RECORD_THREAD_TERMINATE,
+ RTEMS_RECORD_UDP_INPUT,
+ RTEMS_RECORD_UDP_OUTPUT,
+ RTEMS_RECORD_UMA_ALLOC_PTR,
+ RTEMS_RECORD_UMA_ALLOC_ZONE,
+ RTEMS_RECORD_UMA_FREE_PTR,
+ RTEMS_RECORD_UMA_FREE_ZONE,
+ RTEMS_RECORD_UNLINK,
+ RTEMS_RECORD_UNMOUNT,
+ RTEMS_RECORD_UPTIME_HIGH,
+ RTEMS_RECORD_UPTIME_LOW,
+ RTEMS_RECORD_WORKSPACE_ALLOC,
+ RTEMS_RECORD_WORKSPACE_FREE,
+ RTEMS_RECORD_WORKSPACE_SIZE,
+ RTEMS_RECORD_WORKSPACE_USAGE,
+ RTEMS_RECORD_WRITE,
+ RTEMS_RECORD_WRITEV,
+
+ /* Unused system events */
+ RTEMS_RECORD_SYSTEM_142,
+ RTEMS_RECORD_SYSTEM_143,
+ RTEMS_RECORD_SYSTEM_144,
+ RTEMS_RECORD_SYSTEM_145,
+ RTEMS_RECORD_SYSTEM_146,
+ RTEMS_RECORD_SYSTEM_147,
+ RTEMS_RECORD_SYSTEM_148,
+ RTEMS_RECORD_SYSTEM_149,
+ RTEMS_RECORD_SYSTEM_150,
+ RTEMS_RECORD_SYSTEM_151,
+ RTEMS_RECORD_SYSTEM_152,
+ RTEMS_RECORD_SYSTEM_153,
+ RTEMS_RECORD_SYSTEM_154,
+ RTEMS_RECORD_SYSTEM_155,
+ RTEMS_RECORD_SYSTEM_156,
+ RTEMS_RECORD_SYSTEM_157,
+ RTEMS_RECORD_SYSTEM_158,
+ RTEMS_RECORD_SYSTEM_159,
+ RTEMS_RECORD_SYSTEM_160,
+ RTEMS_RECORD_SYSTEM_161,
+ RTEMS_RECORD_SYSTEM_162,
+ RTEMS_RECORD_SYSTEM_163,
+ RTEMS_RECORD_SYSTEM_164,
+ RTEMS_RECORD_SYSTEM_165,
+ RTEMS_RECORD_SYSTEM_166,
+ RTEMS_RECORD_SYSTEM_167,
+ RTEMS_RECORD_SYSTEM_168,
+ RTEMS_RECORD_SYSTEM_169,
+ RTEMS_RECORD_SYSTEM_170,
+ RTEMS_RECORD_SYSTEM_171,
+ RTEMS_RECORD_SYSTEM_172,
+ RTEMS_RECORD_SYSTEM_173,
+ RTEMS_RECORD_SYSTEM_174,
+ RTEMS_RECORD_SYSTEM_175,
+ RTEMS_RECORD_SYSTEM_176,
+ RTEMS_RECORD_SYSTEM_177,
+ RTEMS_RECORD_SYSTEM_178,
+ RTEMS_RECORD_SYSTEM_179,
+ RTEMS_RECORD_SYSTEM_180,
+ RTEMS_RECORD_SYSTEM_181,
+ RTEMS_RECORD_SYSTEM_182,
+ RTEMS_RECORD_SYSTEM_183,
+ RTEMS_RECORD_SYSTEM_184,
+ RTEMS_RECORD_SYSTEM_185,
+ RTEMS_RECORD_SYSTEM_186,
+ RTEMS_RECORD_SYSTEM_187,
+ RTEMS_RECORD_SYSTEM_188,
+ RTEMS_RECORD_SYSTEM_189,
+ RTEMS_RECORD_SYSTEM_190,
+ RTEMS_RECORD_SYSTEM_191,
+ RTEMS_RECORD_SYSTEM_192,
+ RTEMS_RECORD_SYSTEM_193,
+ RTEMS_RECORD_SYSTEM_194,
+ RTEMS_RECORD_SYSTEM_195,
+ RTEMS_RECORD_SYSTEM_196,
+ RTEMS_RECORD_SYSTEM_197,
+ RTEMS_RECORD_SYSTEM_198,
+ RTEMS_RECORD_SYSTEM_199,
+ RTEMS_RECORD_SYSTEM_200,
+ RTEMS_RECORD_SYSTEM_201,
+ RTEMS_RECORD_SYSTEM_202,
+ RTEMS_RECORD_SYSTEM_203,
+ RTEMS_RECORD_SYSTEM_204,
+ RTEMS_RECORD_SYSTEM_205,
+ RTEMS_RECORD_SYSTEM_206,
+ RTEMS_RECORD_SYSTEM_207,
+ RTEMS_RECORD_SYSTEM_208,
+ RTEMS_RECORD_SYSTEM_209,
+ RTEMS_RECORD_SYSTEM_210,
+ RTEMS_RECORD_SYSTEM_211,
+ RTEMS_RECORD_SYSTEM_212,
+ RTEMS_RECORD_SYSTEM_213,
+ RTEMS_RECORD_SYSTEM_214,
+ RTEMS_RECORD_SYSTEM_215,
+ RTEMS_RECORD_SYSTEM_216,
+ RTEMS_RECORD_SYSTEM_217,
+ RTEMS_RECORD_SYSTEM_218,
+ RTEMS_RECORD_SYSTEM_219,
+ RTEMS_RECORD_SYSTEM_220,
+ RTEMS_RECORD_SYSTEM_221,
+ RTEMS_RECORD_SYSTEM_222,
+ RTEMS_RECORD_SYSTEM_223,
+ RTEMS_RECORD_SYSTEM_224,
+ RTEMS_RECORD_SYSTEM_225,
+ RTEMS_RECORD_SYSTEM_226,
+ RTEMS_RECORD_SYSTEM_227,
+ RTEMS_RECORD_SYSTEM_228,
+ RTEMS_RECORD_SYSTEM_229,
+ RTEMS_RECORD_SYSTEM_230,
+ RTEMS_RECORD_SYSTEM_231,
+ RTEMS_RECORD_SYSTEM_232,
+ RTEMS_RECORD_SYSTEM_233,
+ RTEMS_RECORD_SYSTEM_234,
+ RTEMS_RECORD_SYSTEM_235,
+ RTEMS_RECORD_SYSTEM_236,
+ RTEMS_RECORD_SYSTEM_237,
+ RTEMS_RECORD_SYSTEM_238,
+ RTEMS_RECORD_SYSTEM_239,
+ RTEMS_RECORD_SYSTEM_240,
+ RTEMS_RECORD_SYSTEM_241,
+ RTEMS_RECORD_SYSTEM_242,
+ RTEMS_RECORD_SYSTEM_243,
+ RTEMS_RECORD_SYSTEM_244,
+ RTEMS_RECORD_SYSTEM_245,
+ RTEMS_RECORD_SYSTEM_246,
+ RTEMS_RECORD_SYSTEM_247,
+ RTEMS_RECORD_SYSTEM_248,
+ RTEMS_RECORD_SYSTEM_249,
+ RTEMS_RECORD_SYSTEM_250,
+ RTEMS_RECORD_SYSTEM_251,
+ RTEMS_RECORD_SYSTEM_252,
+ RTEMS_RECORD_SYSTEM_253,
+ RTEMS_RECORD_SYSTEM_254,
+ RTEMS_RECORD_SYSTEM_255,
+ RTEMS_RECORD_SYSTEM_256,
+ RTEMS_RECORD_SYSTEM_257,
+ RTEMS_RECORD_SYSTEM_258,
+ RTEMS_RECORD_SYSTEM_259,
+ RTEMS_RECORD_SYSTEM_260,
+ RTEMS_RECORD_SYSTEM_261,
+ RTEMS_RECORD_SYSTEM_262,
+ RTEMS_RECORD_SYSTEM_263,
+ RTEMS_RECORD_SYSTEM_264,
+ RTEMS_RECORD_SYSTEM_265,
+ RTEMS_RECORD_SYSTEM_266,
+ RTEMS_RECORD_SYSTEM_267,
+ RTEMS_RECORD_SYSTEM_268,
+ RTEMS_RECORD_SYSTEM_269,
+ RTEMS_RECORD_SYSTEM_270,
+ RTEMS_RECORD_SYSTEM_271,
+ RTEMS_RECORD_SYSTEM_272,
+ RTEMS_RECORD_SYSTEM_273,
+ RTEMS_RECORD_SYSTEM_274,
+ RTEMS_RECORD_SYSTEM_275,
+ RTEMS_RECORD_SYSTEM_276,
+ RTEMS_RECORD_SYSTEM_277,
+ RTEMS_RECORD_SYSTEM_278,
+ RTEMS_RECORD_SYSTEM_279,
+ RTEMS_RECORD_SYSTEM_280,
+ RTEMS_RECORD_SYSTEM_281,
+ RTEMS_RECORD_SYSTEM_282,
+ RTEMS_RECORD_SYSTEM_283,
+ RTEMS_RECORD_SYSTEM_284,
+ RTEMS_RECORD_SYSTEM_285,
+ RTEMS_RECORD_SYSTEM_286,
+ RTEMS_RECORD_SYSTEM_287,
+ RTEMS_RECORD_SYSTEM_288,
+ RTEMS_RECORD_SYSTEM_289,
+ RTEMS_RECORD_SYSTEM_290,
+ RTEMS_RECORD_SYSTEM_291,
+ RTEMS_RECORD_SYSTEM_292,
+ RTEMS_RECORD_SYSTEM_293,
+ RTEMS_RECORD_SYSTEM_294,
+ RTEMS_RECORD_SYSTEM_295,
+ RTEMS_RECORD_SYSTEM_296,
+ RTEMS_RECORD_SYSTEM_297,
+ RTEMS_RECORD_SYSTEM_298,
+ RTEMS_RECORD_SYSTEM_299,
+ RTEMS_RECORD_SYSTEM_300,
+ RTEMS_RECORD_SYSTEM_301,
+ RTEMS_RECORD_SYSTEM_302,
+ RTEMS_RECORD_SYSTEM_303,
+ RTEMS_RECORD_SYSTEM_304,
+ RTEMS_RECORD_SYSTEM_305,
+ RTEMS_RECORD_SYSTEM_306,
+ RTEMS_RECORD_SYSTEM_307,
+ RTEMS_RECORD_SYSTEM_308,
+ RTEMS_RECORD_SYSTEM_309,
+ RTEMS_RECORD_SYSTEM_310,
+ RTEMS_RECORD_SYSTEM_311,
+ RTEMS_RECORD_SYSTEM_312,
+ RTEMS_RECORD_SYSTEM_313,
+ RTEMS_RECORD_SYSTEM_314,
+ RTEMS_RECORD_SYSTEM_315,
+ RTEMS_RECORD_SYSTEM_316,
+ RTEMS_RECORD_SYSTEM_317,
+ RTEMS_RECORD_SYSTEM_318,
+ RTEMS_RECORD_SYSTEM_319,
+ RTEMS_RECORD_SYSTEM_320,
+ RTEMS_RECORD_SYSTEM_321,
+ RTEMS_RECORD_SYSTEM_322,
+ RTEMS_RECORD_SYSTEM_323,
+ RTEMS_RECORD_SYSTEM_324,
+ RTEMS_RECORD_SYSTEM_325,
+ RTEMS_RECORD_SYSTEM_326,
+ RTEMS_RECORD_SYSTEM_327,
+ RTEMS_RECORD_SYSTEM_328,
+ RTEMS_RECORD_SYSTEM_329,
+ RTEMS_RECORD_SYSTEM_330,
+ RTEMS_RECORD_SYSTEM_331,
+ RTEMS_RECORD_SYSTEM_332,
+ RTEMS_RECORD_SYSTEM_333,
+ RTEMS_RECORD_SYSTEM_334,
+ RTEMS_RECORD_SYSTEM_335,
+ RTEMS_RECORD_SYSTEM_336,
+ RTEMS_RECORD_SYSTEM_337,
+ RTEMS_RECORD_SYSTEM_338,
+ RTEMS_RECORD_SYSTEM_339,
+ RTEMS_RECORD_SYSTEM_340,
+ RTEMS_RECORD_SYSTEM_341,
+ RTEMS_RECORD_SYSTEM_342,
+ RTEMS_RECORD_SYSTEM_343,
+ RTEMS_RECORD_SYSTEM_344,
+ RTEMS_RECORD_SYSTEM_345,
+ RTEMS_RECORD_SYSTEM_346,
+ RTEMS_RECORD_SYSTEM_347,
+ RTEMS_RECORD_SYSTEM_348,
+ RTEMS_RECORD_SYSTEM_349,
+ RTEMS_RECORD_SYSTEM_350,
+ RTEMS_RECORD_SYSTEM_351,
+ RTEMS_RECORD_SYSTEM_352,
+ RTEMS_RECORD_SYSTEM_353,
+ RTEMS_RECORD_SYSTEM_354,
+ RTEMS_RECORD_SYSTEM_355,
+ RTEMS_RECORD_SYSTEM_356,
+ RTEMS_RECORD_SYSTEM_357,
+ RTEMS_RECORD_SYSTEM_358,
+ RTEMS_RECORD_SYSTEM_359,
+ RTEMS_RECORD_SYSTEM_360,
+ RTEMS_RECORD_SYSTEM_361,
+ RTEMS_RECORD_SYSTEM_362,
+ RTEMS_RECORD_SYSTEM_363,
+ RTEMS_RECORD_SYSTEM_364,
+ RTEMS_RECORD_SYSTEM_365,
+ RTEMS_RECORD_SYSTEM_366,
+ RTEMS_RECORD_SYSTEM_367,
+ RTEMS_RECORD_SYSTEM_368,
+ RTEMS_RECORD_SYSTEM_369,
+ RTEMS_RECORD_SYSTEM_370,
+ RTEMS_RECORD_SYSTEM_371,
+ RTEMS_RECORD_SYSTEM_372,
+ RTEMS_RECORD_SYSTEM_373,
+ RTEMS_RECORD_SYSTEM_374,
+ RTEMS_RECORD_SYSTEM_375,
+ RTEMS_RECORD_SYSTEM_376,
+ RTEMS_RECORD_SYSTEM_377,
+ RTEMS_RECORD_SYSTEM_378,
+ RTEMS_RECORD_SYSTEM_379,
+ RTEMS_RECORD_SYSTEM_380,
+ RTEMS_RECORD_SYSTEM_381,
+ RTEMS_RECORD_SYSTEM_382,
+ RTEMS_RECORD_SYSTEM_383,
+ RTEMS_RECORD_SYSTEM_384,
+ RTEMS_RECORD_SYSTEM_385,
+ RTEMS_RECORD_SYSTEM_386,
+ RTEMS_RECORD_SYSTEM_387,
+ RTEMS_RECORD_SYSTEM_388,
+ RTEMS_RECORD_SYSTEM_389,
+ RTEMS_RECORD_SYSTEM_390,
+ RTEMS_RECORD_SYSTEM_391,
+ RTEMS_RECORD_SYSTEM_392,
+ RTEMS_RECORD_SYSTEM_393,
+ RTEMS_RECORD_SYSTEM_394,
+ RTEMS_RECORD_SYSTEM_395,
+ RTEMS_RECORD_SYSTEM_396,
+ RTEMS_RECORD_SYSTEM_397,
+ RTEMS_RECORD_SYSTEM_398,
+ RTEMS_RECORD_SYSTEM_399,
+ RTEMS_RECORD_SYSTEM_400,
+ RTEMS_RECORD_SYSTEM_401,
+ RTEMS_RECORD_SYSTEM_402,
+ RTEMS_RECORD_SYSTEM_403,
+ RTEMS_RECORD_SYSTEM_404,
+ RTEMS_RECORD_SYSTEM_405,
+ RTEMS_RECORD_SYSTEM_406,
+ RTEMS_RECORD_SYSTEM_407,
+ RTEMS_RECORD_SYSTEM_408,
+ RTEMS_RECORD_SYSTEM_409,
+ RTEMS_RECORD_SYSTEM_410,
+ RTEMS_RECORD_SYSTEM_411,
+ RTEMS_RECORD_SYSTEM_412,
+ RTEMS_RECORD_SYSTEM_413,
+ RTEMS_RECORD_SYSTEM_414,
+ RTEMS_RECORD_SYSTEM_415,
+ RTEMS_RECORD_SYSTEM_416,
+ RTEMS_RECORD_SYSTEM_417,
+ RTEMS_RECORD_SYSTEM_418,
+ RTEMS_RECORD_SYSTEM_419,
+ RTEMS_RECORD_SYSTEM_420,
+ RTEMS_RECORD_SYSTEM_421,
+ RTEMS_RECORD_SYSTEM_422,
+ RTEMS_RECORD_SYSTEM_423,
+ RTEMS_RECORD_SYSTEM_424,
+ RTEMS_RECORD_SYSTEM_425,
+ RTEMS_RECORD_SYSTEM_426,
+ RTEMS_RECORD_SYSTEM_427,
+ RTEMS_RECORD_SYSTEM_428,
+ RTEMS_RECORD_SYSTEM_429,
+ RTEMS_RECORD_SYSTEM_430,
+ RTEMS_RECORD_SYSTEM_431,
+ RTEMS_RECORD_SYSTEM_432,
+ RTEMS_RECORD_SYSTEM_433,
+ RTEMS_RECORD_SYSTEM_434,
+ RTEMS_RECORD_SYSTEM_435,
+ RTEMS_RECORD_SYSTEM_436,
+ RTEMS_RECORD_SYSTEM_437,
+ RTEMS_RECORD_SYSTEM_438,
+ RTEMS_RECORD_SYSTEM_439,
+ RTEMS_RECORD_SYSTEM_440,
+ RTEMS_RECORD_SYSTEM_441,
+ RTEMS_RECORD_SYSTEM_442,
+ RTEMS_RECORD_SYSTEM_443,
+ RTEMS_RECORD_SYSTEM_444,
+ RTEMS_RECORD_SYSTEM_445,
+ RTEMS_RECORD_SYSTEM_446,
+ RTEMS_RECORD_SYSTEM_447,
+ RTEMS_RECORD_SYSTEM_448,
+ RTEMS_RECORD_SYSTEM_449,
+ RTEMS_RECORD_SYSTEM_450,
+ RTEMS_RECORD_SYSTEM_451,
+ RTEMS_RECORD_SYSTEM_452,
+ RTEMS_RECORD_SYSTEM_453,
+ RTEMS_RECORD_SYSTEM_454,
+ RTEMS_RECORD_SYSTEM_455,
+ RTEMS_RECORD_SYSTEM_456,
+ RTEMS_RECORD_SYSTEM_457,
+ RTEMS_RECORD_SYSTEM_458,
+ RTEMS_RECORD_SYSTEM_459,
+ RTEMS_RECORD_SYSTEM_460,
+ RTEMS_RECORD_SYSTEM_461,
+ RTEMS_RECORD_SYSTEM_462,
+ RTEMS_RECORD_SYSTEM_463,
+ RTEMS_RECORD_SYSTEM_464,
+ RTEMS_RECORD_SYSTEM_465,
+ RTEMS_RECORD_SYSTEM_466,
+ RTEMS_RECORD_SYSTEM_467,
+ RTEMS_RECORD_SYSTEM_468,
+ RTEMS_RECORD_SYSTEM_469,
+ RTEMS_RECORD_SYSTEM_470,
+ RTEMS_RECORD_SYSTEM_471,
+ RTEMS_RECORD_SYSTEM_472,
+ RTEMS_RECORD_SYSTEM_473,
+ RTEMS_RECORD_SYSTEM_474,
+ RTEMS_RECORD_SYSTEM_475,
+ RTEMS_RECORD_SYSTEM_476,
+ RTEMS_RECORD_SYSTEM_477,
+ RTEMS_RECORD_SYSTEM_478,
+ RTEMS_RECORD_SYSTEM_479,
+ RTEMS_RECORD_SYSTEM_480,
+ RTEMS_RECORD_SYSTEM_481,
+ RTEMS_RECORD_SYSTEM_482,
+ RTEMS_RECORD_SYSTEM_483,
+ RTEMS_RECORD_SYSTEM_484,
+ RTEMS_RECORD_SYSTEM_485,
+ RTEMS_RECORD_SYSTEM_486,
+ RTEMS_RECORD_SYSTEM_487,
+ RTEMS_RECORD_SYSTEM_488,
+ RTEMS_RECORD_SYSTEM_489,
+ RTEMS_RECORD_SYSTEM_490,
+ RTEMS_RECORD_SYSTEM_491,
+ RTEMS_RECORD_SYSTEM_492,
+ RTEMS_RECORD_SYSTEM_493,
+ RTEMS_RECORD_SYSTEM_494,
+ RTEMS_RECORD_SYSTEM_495,
+ RTEMS_RECORD_SYSTEM_496,
+ RTEMS_RECORD_SYSTEM_497,
+ RTEMS_RECORD_SYSTEM_498,
+ RTEMS_RECORD_SYSTEM_499,
+ RTEMS_RECORD_SYSTEM_500,
+ RTEMS_RECORD_SYSTEM_501,
+ RTEMS_RECORD_SYSTEM_502,
+ RTEMS_RECORD_SYSTEM_503,
+ RTEMS_RECORD_SYSTEM_504,
+ RTEMS_RECORD_SYSTEM_505,
+ RTEMS_RECORD_SYSTEM_506,
+ RTEMS_RECORD_SYSTEM_507,
+ RTEMS_RECORD_SYSTEM_508,
+ RTEMS_RECORD_SYSTEM_509,
+ RTEMS_RECORD_SYSTEM_510,
+ RTEMS_RECORD_SYSTEM_511,
+
+ /* There are 512 events reserved for the user */
+ RTEMS_RECORD_USER_0,
+ RTEMS_RECORD_USER_1,
+ RTEMS_RECORD_USER_2,
+ RTEMS_RECORD_USER_3,
+ RTEMS_RECORD_USER_4,
+ RTEMS_RECORD_USER_5,
+ RTEMS_RECORD_USER_6,
+ RTEMS_RECORD_USER_7,
+ RTEMS_RECORD_USER_8,
+ RTEMS_RECORD_USER_9,
+ RTEMS_RECORD_USER_10,
+ RTEMS_RECORD_USER_11,
+ RTEMS_RECORD_USER_12,
+ RTEMS_RECORD_USER_13,
+ RTEMS_RECORD_USER_14,
+ RTEMS_RECORD_USER_15,
+ RTEMS_RECORD_USER_16,
+ RTEMS_RECORD_USER_17,
+ RTEMS_RECORD_USER_18,
+ RTEMS_RECORD_USER_19,
+ RTEMS_RECORD_USER_20,
+ RTEMS_RECORD_USER_21,
+ RTEMS_RECORD_USER_22,
+ RTEMS_RECORD_USER_23,
+ RTEMS_RECORD_USER_24,
+ RTEMS_RECORD_USER_25,
+ RTEMS_RECORD_USER_26,
+ RTEMS_RECORD_USER_27,
+ RTEMS_RECORD_USER_28,
+ RTEMS_RECORD_USER_29,
+ RTEMS_RECORD_USER_30,
+ RTEMS_RECORD_USER_31,
+ RTEMS_RECORD_USER_32,
+ RTEMS_RECORD_USER_33,
+ RTEMS_RECORD_USER_34,
+ RTEMS_RECORD_USER_35,
+ RTEMS_RECORD_USER_36,
+ RTEMS_RECORD_USER_37,
+ RTEMS_RECORD_USER_38,
+ RTEMS_RECORD_USER_39,
+ RTEMS_RECORD_USER_40,
+ RTEMS_RECORD_USER_41,
+ RTEMS_RECORD_USER_42,
+ RTEMS_RECORD_USER_43,
+ RTEMS_RECORD_USER_44,
+ RTEMS_RECORD_USER_45,
+ RTEMS_RECORD_USER_46,
+ RTEMS_RECORD_USER_47,
+ RTEMS_RECORD_USER_48,
+ RTEMS_RECORD_USER_49,
+ RTEMS_RECORD_USER_50,
+ RTEMS_RECORD_USER_51,
+ RTEMS_RECORD_USER_52,
+ RTEMS_RECORD_USER_53,
+ RTEMS_RECORD_USER_54,
+ RTEMS_RECORD_USER_55,
+ RTEMS_RECORD_USER_56,
+ RTEMS_RECORD_USER_57,
+ RTEMS_RECORD_USER_58,
+ RTEMS_RECORD_USER_59,
+ RTEMS_RECORD_USER_60,
+ RTEMS_RECORD_USER_61,
+ RTEMS_RECORD_USER_62,
+ RTEMS_RECORD_USER_63,
+ RTEMS_RECORD_USER_64,
+ RTEMS_RECORD_USER_65,
+ RTEMS_RECORD_USER_66,
+ RTEMS_RECORD_USER_67,
+ RTEMS_RECORD_USER_68,
+ RTEMS_RECORD_USER_69,
+ RTEMS_RECORD_USER_70,
+ RTEMS_RECORD_USER_71,
+ RTEMS_RECORD_USER_72,
+ RTEMS_RECORD_USER_73,
+ RTEMS_RECORD_USER_74,
+ RTEMS_RECORD_USER_75,
+ RTEMS_RECORD_USER_76,
+ RTEMS_RECORD_USER_77,
+ RTEMS_RECORD_USER_78,
+ RTEMS_RECORD_USER_79,
+ RTEMS_RECORD_USER_80,
+ RTEMS_RECORD_USER_81,
+ RTEMS_RECORD_USER_82,
+ RTEMS_RECORD_USER_83,
+ RTEMS_RECORD_USER_84,
+ RTEMS_RECORD_USER_85,
+ RTEMS_RECORD_USER_86,
+ RTEMS_RECORD_USER_87,
+ RTEMS_RECORD_USER_88,
+ RTEMS_RECORD_USER_89,
+ RTEMS_RECORD_USER_90,
+ RTEMS_RECORD_USER_91,
+ RTEMS_RECORD_USER_92,
+ RTEMS_RECORD_USER_93,
+ RTEMS_RECORD_USER_94,
+ RTEMS_RECORD_USER_95,
+ RTEMS_RECORD_USER_96,
+ RTEMS_RECORD_USER_97,
+ RTEMS_RECORD_USER_98,
+ RTEMS_RECORD_USER_99,
+ RTEMS_RECORD_USER_100,
+ RTEMS_RECORD_USER_101,
+ RTEMS_RECORD_USER_102,
+ RTEMS_RECORD_USER_103,
+ RTEMS_RECORD_USER_104,
+ RTEMS_RECORD_USER_105,
+ RTEMS_RECORD_USER_106,
+ RTEMS_RECORD_USER_107,
+ RTEMS_RECORD_USER_108,
+ RTEMS_RECORD_USER_109,
+ RTEMS_RECORD_USER_110,
+ RTEMS_RECORD_USER_111,
+ RTEMS_RECORD_USER_112,
+ RTEMS_RECORD_USER_113,
+ RTEMS_RECORD_USER_114,
+ RTEMS_RECORD_USER_115,
+ RTEMS_RECORD_USER_116,
+ RTEMS_RECORD_USER_117,
+ RTEMS_RECORD_USER_118,
+ RTEMS_RECORD_USER_119,
+ RTEMS_RECORD_USER_120,
+ RTEMS_RECORD_USER_121,
+ RTEMS_RECORD_USER_122,
+ RTEMS_RECORD_USER_123,
+ RTEMS_RECORD_USER_124,
+ RTEMS_RECORD_USER_125,
+ RTEMS_RECORD_USER_126,
+ RTEMS_RECORD_USER_127,
+ RTEMS_RECORD_USER_128,
+ RTEMS_RECORD_USER_129,
+ RTEMS_RECORD_USER_130,
+ RTEMS_RECORD_USER_131,
+ RTEMS_RECORD_USER_132,
+ RTEMS_RECORD_USER_133,
+ RTEMS_RECORD_USER_134,
+ RTEMS_RECORD_USER_135,
+ RTEMS_RECORD_USER_136,
+ RTEMS_RECORD_USER_137,
+ RTEMS_RECORD_USER_138,
+ RTEMS_RECORD_USER_139,
+ RTEMS_RECORD_USER_140,
+ RTEMS_RECORD_USER_141,
+ RTEMS_RECORD_USER_142,
+ RTEMS_RECORD_USER_143,
+ RTEMS_RECORD_USER_144,
+ RTEMS_RECORD_USER_145,
+ RTEMS_RECORD_USER_146,
+ RTEMS_RECORD_USER_147,
+ RTEMS_RECORD_USER_148,
+ RTEMS_RECORD_USER_149,
+ RTEMS_RECORD_USER_150,
+ RTEMS_RECORD_USER_151,
+ RTEMS_RECORD_USER_152,
+ RTEMS_RECORD_USER_153,
+ RTEMS_RECORD_USER_154,
+ RTEMS_RECORD_USER_155,
+ RTEMS_RECORD_USER_156,
+ RTEMS_RECORD_USER_157,
+ RTEMS_RECORD_USER_158,
+ RTEMS_RECORD_USER_159,
+ RTEMS_RECORD_USER_160,
+ RTEMS_RECORD_USER_161,
+ RTEMS_RECORD_USER_162,
+ RTEMS_RECORD_USER_163,
+ RTEMS_RECORD_USER_164,
+ RTEMS_RECORD_USER_165,
+ RTEMS_RECORD_USER_166,
+ RTEMS_RECORD_USER_167,
+ RTEMS_RECORD_USER_168,
+ RTEMS_RECORD_USER_169,
+ RTEMS_RECORD_USER_170,
+ RTEMS_RECORD_USER_171,
+ RTEMS_RECORD_USER_172,
+ RTEMS_RECORD_USER_173,
+ RTEMS_RECORD_USER_174,
+ RTEMS_RECORD_USER_175,
+ RTEMS_RECORD_USER_176,
+ RTEMS_RECORD_USER_177,
+ RTEMS_RECORD_USER_178,
+ RTEMS_RECORD_USER_179,
+ RTEMS_RECORD_USER_180,
+ RTEMS_RECORD_USER_181,
+ RTEMS_RECORD_USER_182,
+ RTEMS_RECORD_USER_183,
+ RTEMS_RECORD_USER_184,
+ RTEMS_RECORD_USER_185,
+ RTEMS_RECORD_USER_186,
+ RTEMS_RECORD_USER_187,
+ RTEMS_RECORD_USER_188,
+ RTEMS_RECORD_USER_189,
+ RTEMS_RECORD_USER_190,
+ RTEMS_RECORD_USER_191,
+ RTEMS_RECORD_USER_192,
+ RTEMS_RECORD_USER_193,
+ RTEMS_RECORD_USER_194,
+ RTEMS_RECORD_USER_195,
+ RTEMS_RECORD_USER_196,
+ RTEMS_RECORD_USER_197,
+ RTEMS_RECORD_USER_198,
+ RTEMS_RECORD_USER_199,
+ RTEMS_RECORD_USER_200,
+ RTEMS_RECORD_USER_201,
+ RTEMS_RECORD_USER_202,
+ RTEMS_RECORD_USER_203,
+ RTEMS_RECORD_USER_204,
+ RTEMS_RECORD_USER_205,
+ RTEMS_RECORD_USER_206,
+ RTEMS_RECORD_USER_207,
+ RTEMS_RECORD_USER_208,
+ RTEMS_RECORD_USER_209,
+ RTEMS_RECORD_USER_210,
+ RTEMS_RECORD_USER_211,
+ RTEMS_RECORD_USER_212,
+ RTEMS_RECORD_USER_213,
+ RTEMS_RECORD_USER_214,
+ RTEMS_RECORD_USER_215,
+ RTEMS_RECORD_USER_216,
+ RTEMS_RECORD_USER_217,
+ RTEMS_RECORD_USER_218,
+ RTEMS_RECORD_USER_219,
+ RTEMS_RECORD_USER_220,
+ RTEMS_RECORD_USER_221,
+ RTEMS_RECORD_USER_222,
+ RTEMS_RECORD_USER_223,
+ RTEMS_RECORD_USER_224,
+ RTEMS_RECORD_USER_225,
+ RTEMS_RECORD_USER_226,
+ RTEMS_RECORD_USER_227,
+ RTEMS_RECORD_USER_228,
+ RTEMS_RECORD_USER_229,
+ RTEMS_RECORD_USER_230,
+ RTEMS_RECORD_USER_231,
+ RTEMS_RECORD_USER_232,
+ RTEMS_RECORD_USER_233,
+ RTEMS_RECORD_USER_234,
+ RTEMS_RECORD_USER_235,
+ RTEMS_RECORD_USER_236,
+ RTEMS_RECORD_USER_237,
+ RTEMS_RECORD_USER_238,
+ RTEMS_RECORD_USER_239,
+ RTEMS_RECORD_USER_240,
+ RTEMS_RECORD_USER_241,
+ RTEMS_RECORD_USER_242,
+ RTEMS_RECORD_USER_243,
+ RTEMS_RECORD_USER_244,
+ RTEMS_RECORD_USER_245,
+ RTEMS_RECORD_USER_246,
+ RTEMS_RECORD_USER_247,
+ RTEMS_RECORD_USER_248,
+ RTEMS_RECORD_USER_249,
+ RTEMS_RECORD_USER_250,
+ RTEMS_RECORD_USER_251,
+ RTEMS_RECORD_USER_252,
+ RTEMS_RECORD_USER_253,
+ RTEMS_RECORD_USER_254,
+ RTEMS_RECORD_USER_255,
+ RTEMS_RECORD_USER_256,
+ RTEMS_RECORD_USER_257,
+ RTEMS_RECORD_USER_258,
+ RTEMS_RECORD_USER_259,
+ RTEMS_RECORD_USER_260,
+ RTEMS_RECORD_USER_261,
+ RTEMS_RECORD_USER_262,
+ RTEMS_RECORD_USER_263,
+ RTEMS_RECORD_USER_264,
+ RTEMS_RECORD_USER_265,
+ RTEMS_RECORD_USER_266,
+ RTEMS_RECORD_USER_267,
+ RTEMS_RECORD_USER_268,
+ RTEMS_RECORD_USER_269,
+ RTEMS_RECORD_USER_270,
+ RTEMS_RECORD_USER_271,
+ RTEMS_RECORD_USER_272,
+ RTEMS_RECORD_USER_273,
+ RTEMS_RECORD_USER_274,
+ RTEMS_RECORD_USER_275,
+ RTEMS_RECORD_USER_276,
+ RTEMS_RECORD_USER_277,
+ RTEMS_RECORD_USER_278,
+ RTEMS_RECORD_USER_279,
+ RTEMS_RECORD_USER_280,
+ RTEMS_RECORD_USER_281,
+ RTEMS_RECORD_USER_282,
+ RTEMS_RECORD_USER_283,
+ RTEMS_RECORD_USER_284,
+ RTEMS_RECORD_USER_285,
+ RTEMS_RECORD_USER_286,
+ RTEMS_RECORD_USER_287,
+ RTEMS_RECORD_USER_288,
+ RTEMS_RECORD_USER_289,
+ RTEMS_RECORD_USER_290,
+ RTEMS_RECORD_USER_291,
+ RTEMS_RECORD_USER_292,
+ RTEMS_RECORD_USER_293,
+ RTEMS_RECORD_USER_294,
+ RTEMS_RECORD_USER_295,
+ RTEMS_RECORD_USER_296,
+ RTEMS_RECORD_USER_297,
+ RTEMS_RECORD_USER_298,
+ RTEMS_RECORD_USER_299,
+ RTEMS_RECORD_USER_300,
+ RTEMS_RECORD_USER_301,
+ RTEMS_RECORD_USER_302,
+ RTEMS_RECORD_USER_303,
+ RTEMS_RECORD_USER_304,
+ RTEMS_RECORD_USER_305,
+ RTEMS_RECORD_USER_306,
+ RTEMS_RECORD_USER_307,
+ RTEMS_RECORD_USER_308,
+ RTEMS_RECORD_USER_309,
+ RTEMS_RECORD_USER_310,
+ RTEMS_RECORD_USER_311,
+ RTEMS_RECORD_USER_312,
+ RTEMS_RECORD_USER_313,
+ RTEMS_RECORD_USER_314,
+ RTEMS_RECORD_USER_315,
+ RTEMS_RECORD_USER_316,
+ RTEMS_RECORD_USER_317,
+ RTEMS_RECORD_USER_318,
+ RTEMS_RECORD_USER_319,
+ RTEMS_RECORD_USER_320,
+ RTEMS_RECORD_USER_321,
+ RTEMS_RECORD_USER_322,
+ RTEMS_RECORD_USER_323,
+ RTEMS_RECORD_USER_324,
+ RTEMS_RECORD_USER_325,
+ RTEMS_RECORD_USER_326,
+ RTEMS_RECORD_USER_327,
+ RTEMS_RECORD_USER_328,
+ RTEMS_RECORD_USER_329,
+ RTEMS_RECORD_USER_330,
+ RTEMS_RECORD_USER_331,
+ RTEMS_RECORD_USER_332,
+ RTEMS_RECORD_USER_333,
+ RTEMS_RECORD_USER_334,
+ RTEMS_RECORD_USER_335,
+ RTEMS_RECORD_USER_336,
+ RTEMS_RECORD_USER_337,
+ RTEMS_RECORD_USER_338,
+ RTEMS_RECORD_USER_339,
+ RTEMS_RECORD_USER_340,
+ RTEMS_RECORD_USER_341,
+ RTEMS_RECORD_USER_342,
+ RTEMS_RECORD_USER_343,
+ RTEMS_RECORD_USER_344,
+ RTEMS_RECORD_USER_345,
+ RTEMS_RECORD_USER_346,
+ RTEMS_RECORD_USER_347,
+ RTEMS_RECORD_USER_348,
+ RTEMS_RECORD_USER_349,
+ RTEMS_RECORD_USER_350,
+ RTEMS_RECORD_USER_351,
+ RTEMS_RECORD_USER_352,
+ RTEMS_RECORD_USER_353,
+ RTEMS_RECORD_USER_354,
+ RTEMS_RECORD_USER_355,
+ RTEMS_RECORD_USER_356,
+ RTEMS_RECORD_USER_357,
+ RTEMS_RECORD_USER_358,
+ RTEMS_RECORD_USER_359,
+ RTEMS_RECORD_USER_360,
+ RTEMS_RECORD_USER_361,
+ RTEMS_RECORD_USER_362,
+ RTEMS_RECORD_USER_363,
+ RTEMS_RECORD_USER_364,
+ RTEMS_RECORD_USER_365,
+ RTEMS_RECORD_USER_366,
+ RTEMS_RECORD_USER_367,
+ RTEMS_RECORD_USER_368,
+ RTEMS_RECORD_USER_369,
+ RTEMS_RECORD_USER_370,
+ RTEMS_RECORD_USER_371,
+ RTEMS_RECORD_USER_372,
+ RTEMS_RECORD_USER_373,
+ RTEMS_RECORD_USER_374,
+ RTEMS_RECORD_USER_375,
+ RTEMS_RECORD_USER_376,
+ RTEMS_RECORD_USER_377,
+ RTEMS_RECORD_USER_378,
+ RTEMS_RECORD_USER_379,
+ RTEMS_RECORD_USER_380,
+ RTEMS_RECORD_USER_381,
+ RTEMS_RECORD_USER_382,
+ RTEMS_RECORD_USER_383,
+ RTEMS_RECORD_USER_384,
+ RTEMS_RECORD_USER_385,
+ RTEMS_RECORD_USER_386,
+ RTEMS_RECORD_USER_387,
+ RTEMS_RECORD_USER_388,
+ RTEMS_RECORD_USER_389,
+ RTEMS_RECORD_USER_390,
+ RTEMS_RECORD_USER_391,
+ RTEMS_RECORD_USER_392,
+ RTEMS_RECORD_USER_393,
+ RTEMS_RECORD_USER_394,
+ RTEMS_RECORD_USER_395,
+ RTEMS_RECORD_USER_396,
+ RTEMS_RECORD_USER_397,
+ RTEMS_RECORD_USER_398,
+ RTEMS_RECORD_USER_399,
+ RTEMS_RECORD_USER_400,
+ RTEMS_RECORD_USER_401,
+ RTEMS_RECORD_USER_402,
+ RTEMS_RECORD_USER_403,
+ RTEMS_RECORD_USER_404,
+ RTEMS_RECORD_USER_405,
+ RTEMS_RECORD_USER_406,
+ RTEMS_RECORD_USER_407,
+ RTEMS_RECORD_USER_408,
+ RTEMS_RECORD_USER_409,
+ RTEMS_RECORD_USER_410,
+ RTEMS_RECORD_USER_411,
+ RTEMS_RECORD_USER_412,
+ RTEMS_RECORD_USER_413,
+ RTEMS_RECORD_USER_414,
+ RTEMS_RECORD_USER_415,
+ RTEMS_RECORD_USER_416,
+ RTEMS_RECORD_USER_417,
+ RTEMS_RECORD_USER_418,
+ RTEMS_RECORD_USER_419,
+ RTEMS_RECORD_USER_420,
+ RTEMS_RECORD_USER_421,
+ RTEMS_RECORD_USER_422,
+ RTEMS_RECORD_USER_423,
+ RTEMS_RECORD_USER_424,
+ RTEMS_RECORD_USER_425,
+ RTEMS_RECORD_USER_426,
+ RTEMS_RECORD_USER_427,
+ RTEMS_RECORD_USER_428,
+ RTEMS_RECORD_USER_429,
+ RTEMS_RECORD_USER_430,
+ RTEMS_RECORD_USER_431,
+ RTEMS_RECORD_USER_432,
+ RTEMS_RECORD_USER_433,
+ RTEMS_RECORD_USER_434,
+ RTEMS_RECORD_USER_435,
+ RTEMS_RECORD_USER_436,
+ RTEMS_RECORD_USER_437,
+ RTEMS_RECORD_USER_438,
+ RTEMS_RECORD_USER_439,
+ RTEMS_RECORD_USER_440,
+ RTEMS_RECORD_USER_441,
+ RTEMS_RECORD_USER_442,
+ RTEMS_RECORD_USER_443,
+ RTEMS_RECORD_USER_444,
+ RTEMS_RECORD_USER_445,
+ RTEMS_RECORD_USER_446,
+ RTEMS_RECORD_USER_447,
+ RTEMS_RECORD_USER_448,
+ RTEMS_RECORD_USER_449,
+ RTEMS_RECORD_USER_450,
+ RTEMS_RECORD_USER_451,
+ RTEMS_RECORD_USER_452,
+ RTEMS_RECORD_USER_453,
+ RTEMS_RECORD_USER_454,
+ RTEMS_RECORD_USER_455,
+ RTEMS_RECORD_USER_456,
+ RTEMS_RECORD_USER_457,
+ RTEMS_RECORD_USER_458,
+ RTEMS_RECORD_USER_459,
+ RTEMS_RECORD_USER_460,
+ RTEMS_RECORD_USER_461,
+ RTEMS_RECORD_USER_462,
+ RTEMS_RECORD_USER_463,
+ RTEMS_RECORD_USER_464,
+ RTEMS_RECORD_USER_465,
+ RTEMS_RECORD_USER_466,
+ RTEMS_RECORD_USER_467,
+ RTEMS_RECORD_USER_468,
+ RTEMS_RECORD_USER_469,
+ RTEMS_RECORD_USER_470,
+ RTEMS_RECORD_USER_471,
+ RTEMS_RECORD_USER_472,
+ RTEMS_RECORD_USER_473,
+ RTEMS_RECORD_USER_474,
+ RTEMS_RECORD_USER_475,
+ RTEMS_RECORD_USER_476,
+ RTEMS_RECORD_USER_477,
+ RTEMS_RECORD_USER_478,
+ RTEMS_RECORD_USER_479,
+ RTEMS_RECORD_USER_480,
+ RTEMS_RECORD_USER_481,
+ RTEMS_RECORD_USER_482,
+ RTEMS_RECORD_USER_483,
+ RTEMS_RECORD_USER_484,
+ RTEMS_RECORD_USER_485,
+ RTEMS_RECORD_USER_486,
+ RTEMS_RECORD_USER_487,
+ RTEMS_RECORD_USER_488,
+ RTEMS_RECORD_USER_489,
+ RTEMS_RECORD_USER_490,
+ RTEMS_RECORD_USER_491,
+ RTEMS_RECORD_USER_492,
+ RTEMS_RECORD_USER_493,
+ RTEMS_RECORD_USER_494,
+ RTEMS_RECORD_USER_495,
+ RTEMS_RECORD_USER_496,
+ RTEMS_RECORD_USER_497,
+ RTEMS_RECORD_USER_498,
+ RTEMS_RECORD_USER_499,
+ RTEMS_RECORD_USER_500,
+ RTEMS_RECORD_USER_501,
+ RTEMS_RECORD_USER_502,
+ RTEMS_RECORD_USER_503,
+ RTEMS_RECORD_USER_504,
+ RTEMS_RECORD_USER_505,
+ RTEMS_RECORD_USER_506,
+ RTEMS_RECORD_USER_507,
+ RTEMS_RECORD_USER_508,
+ RTEMS_RECORD_USER_509,
+ RTEMS_RECORD_USER_510,
+ RTEMS_RECORD_USER_511
+} rtems_record_event;
+
+#define RTEMS_RECORD_LAST RTEMS_RECORD_USER_511
+
+#define RTEMS_RECORD_USER( index ) ( RTEMS_RECORD_USER_0 + ( index ) )
+
+/**
+ * @brief Bits in the record item event member reserved for the actual event.
+ */
+#define RTEMS_RECORD_EVENT_BITS 10
+
+/**
+ * @brief Bits in the record item event member reserved for the time of the
+ * event.
+ */
+#define RTEMS_RECORD_TIME_BITS 22
+
+/**
+ * @brief Builds a time event for the specified time stamp and event.
+ *
+ * The events are stored in the record item with a time stamp. There are 22
+ * bits allocated to the time stamp and 10 bits allocated to the event. The 22
+ * bits are enough to get reliable time stamps on a system with a 4GHz CPU
+ * counter and a 1000Hz clock tick.
+ */
+#define RTEMS_RECORD_TIME_EVENT( time, event ) \
+ ( ( ( time ) << RTEMS_RECORD_EVENT_BITS ) | ( event ) )
+
+/**
+ * @brief Gets the time of a time event.
+ */
+#define RTEMS_RECORD_GET_TIME( time_event ) \
+ ( ( time_event ) >> RTEMS_RECORD_EVENT_BITS )
+
+/**
+ * @brief Gets the event of a time event.
+ */
+#define RTEMS_RECORD_GET_EVENT( time_event ) \
+ ( ( time_event ) & ( ( 1U << RTEMS_RECORD_EVENT_BITS ) - 1U ) )
+
+/**
+ * @brief The record data integer type.
+ *
+ * It is big enough to store 32-bit integers and pointers.
+ */
+typedef unsigned long rtems_record_data;
+
+/**
+ * @brief The native record item.
+ */
+typedef struct __attribute__((__packed__)) {
+ uint32_t event;
+ rtems_record_data data;
+} rtems_record_item;
+
+/**
+ * @brief The 32-bit format record item.
+ */
+typedef struct {
+ uint32_t event;
+ uint32_t data;
+} rtems_record_item_32;
+
+/**
+ * @brief The 64-bit format record item.
+ */
+typedef struct __attribute__((__packed__)) {
+ uint32_t event;
+ uint64_t data;
+} rtems_record_item_64;
+
+const char *rtems_record_event_text( rtems_record_event event );
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* _RTEMS_RECORDDATA_H */
diff --git a/misc/record/tree.h b/misc/record/tree.h
new file mode 100644
index 0000000..f4167c4
--- /dev/null
+++ b/misc/record/tree.h
@@ -0,0 +1,801 @@
+/* $NetBSD: tree.h,v 1.8 2004/03/28 19:38:30 provos Exp $ */
+/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */
+/* $FreeBSD$ */
+
+/*-
+ * Copyright 2002 Niels Provos <provos at citi.umich.edu>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _SYS_TREE_H_
+#define _SYS_TREE_H_
+
+#include <sys/cdefs.h>
+
+/*
+ * This file defines data structures for different types of trees:
+ * splay trees and red-black trees.
+ *
+ * A splay tree is a self-organizing data structure. Every operation
+ * on the tree causes a splay to happen. The splay moves the requested
+ * node to the root of the tree and partly rebalances it.
+ *
+ * This has the benefit that request locality causes faster lookups as
+ * the requested nodes move to the top of the tree. On the other hand,
+ * every lookup causes memory writes.
+ *
+ * The Balance Theorem bounds the total access time for m operations
+ * and n inserts on an initially empty tree as O((m + n)lg n). The
+ * amortized cost for a sequence of m accesses to a splay tree is O(lg n);
+ *
+ * A red-black tree is a binary search tree with the node color as an
+ * extra attribute. It fulfills a set of conditions:
+ * - every search path from the root to a leaf consists of the
+ * same number of black nodes,
+ * - each red node (except for the root) has a black parent,
+ * - each leaf node is black.
+ *
+ * Every operation on a red-black tree is bounded as O(lg n).
+ * The maximum height of a red-black tree is 2lg (n+1).
+ */
+
+#define SPLAY_HEAD(name, type) \
+struct name { \
+ struct type *sph_root; /* root of the tree */ \
+}
+
+#define SPLAY_INITIALIZER(root) \
+ { NULL }
+
+#define SPLAY_INIT(root) do { \
+ (root)->sph_root = NULL; \
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_ENTRY(type) \
+struct { \
+ struct type *spe_left; /* left element */ \
+ struct type *spe_right; /* right element */ \
+}
+
+#define SPLAY_LEFT(elm, field) (elm)->field.spe_left
+#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right
+#define SPLAY_ROOT(head) (head)->sph_root
+#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL)
+
+/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */
+#define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \
+ SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \
+ SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
+ (head)->sph_root = tmp; \
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \
+ SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \
+ SPLAY_LEFT(tmp, field) = (head)->sph_root; \
+ (head)->sph_root = tmp; \
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_LINKLEFT(head, tmp, field) do { \
+ SPLAY_LEFT(tmp, field) = (head)->sph_root; \
+ tmp = (head)->sph_root; \
+ (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_LINKRIGHT(head, tmp, field) do { \
+ SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
+ tmp = (head)->sph_root; \
+ (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_ASSEMBLE(head, node, left, right, field) do { \
+ SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \
+ SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\
+ SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \
+ SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \
+} while (/*CONSTCOND*/ 0)
+
+/* Generates prototypes and inline functions */
+
+#define SPLAY_PROTOTYPE(name, type, field, cmp) \
+void name##_SPLAY(struct name *, struct type *); \
+void name##_SPLAY_MINMAX(struct name *, int); \
+struct type *name##_SPLAY_INSERT(struct name *, struct type *); \
+struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \
+ \
+/* Finds the node with the same key as elm */ \
+static __inline struct type * \
+name##_SPLAY_FIND(struct name *head, struct type *elm) \
+{ \
+ if (SPLAY_EMPTY(head)) \
+ return(NULL); \
+ name##_SPLAY(head, elm); \
+ if ((cmp)(elm, (head)->sph_root) == 0) \
+ return (head->sph_root); \
+ return (NULL); \
+} \
+ \
+static __inline struct type * \
+name##_SPLAY_NEXT(struct name *head, struct type *elm) \
+{ \
+ name##_SPLAY(head, elm); \
+ if (SPLAY_RIGHT(elm, field) != NULL) { \
+ elm = SPLAY_RIGHT(elm, field); \
+ while (SPLAY_LEFT(elm, field) != NULL) { \
+ elm = SPLAY_LEFT(elm, field); \
+ } \
+ } else \
+ elm = NULL; \
+ return (elm); \
+} \
+ \
+static __inline struct type * \
+name##_SPLAY_MIN_MAX(struct name *head, int val) \
+{ \
+ name##_SPLAY_MINMAX(head, val); \
+ return (SPLAY_ROOT(head)); \
+}
+
+/* Main splay operation.
+ * Moves node close to the key of elm to top
+ */
+#define SPLAY_GENERATE(name, type, field, cmp) \
+struct type * \
+name##_SPLAY_INSERT(struct name *head, struct type *elm) \
+{ \
+ if (SPLAY_EMPTY(head)) { \
+ SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \
+ } else { \
+ int __comp; \
+ name##_SPLAY(head, elm); \
+ __comp = (cmp)(elm, (head)->sph_root); \
+ if(__comp < 0) { \
+ SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\
+ SPLAY_RIGHT(elm, field) = (head)->sph_root; \
+ SPLAY_LEFT((head)->sph_root, field) = NULL; \
+ } else if (__comp > 0) { \
+ SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\
+ SPLAY_LEFT(elm, field) = (head)->sph_root; \
+ SPLAY_RIGHT((head)->sph_root, field) = NULL; \
+ } else \
+ return ((head)->sph_root); \
+ } \
+ (head)->sph_root = (elm); \
+ return (NULL); \
+} \
+ \
+struct type * \
+name##_SPLAY_REMOVE(struct name *head, struct type *elm) \
+{ \
+ struct type *__tmp; \
+ if (SPLAY_EMPTY(head)) \
+ return (NULL); \
+ name##_SPLAY(head, elm); \
+ if ((cmp)(elm, (head)->sph_root) == 0) { \
+ if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \
+ (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\
+ } else { \
+ __tmp = SPLAY_RIGHT((head)->sph_root, field); \
+ (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\
+ name##_SPLAY(head, elm); \
+ SPLAY_RIGHT((head)->sph_root, field) = __tmp; \
+ } \
+ return (elm); \
+ } \
+ return (NULL); \
+} \
+ \
+void \
+name##_SPLAY(struct name *head, struct type *elm) \
+{ \
+ struct type __node, *__left, *__right, *__tmp; \
+ int __comp; \
+\
+ SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
+ __left = __right = &__node; \
+\
+ while ((__comp = (cmp)(elm, (head)->sph_root)) != 0) { \
+ if (__comp < 0) { \
+ __tmp = SPLAY_LEFT((head)->sph_root, field); \
+ if (__tmp == NULL) \
+ break; \
+ if ((cmp)(elm, __tmp) < 0){ \
+ SPLAY_ROTATE_RIGHT(head, __tmp, field); \
+ if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
+ break; \
+ } \
+ SPLAY_LINKLEFT(head, __right, field); \
+ } else if (__comp > 0) { \
+ __tmp = SPLAY_RIGHT((head)->sph_root, field); \
+ if (__tmp == NULL) \
+ break; \
+ if ((cmp)(elm, __tmp) > 0){ \
+ SPLAY_ROTATE_LEFT(head, __tmp, field); \
+ if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
+ break; \
+ } \
+ SPLAY_LINKRIGHT(head, __left, field); \
+ } \
+ } \
+ SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
+} \
+ \
+/* Splay with either the minimum or the maximum element \
+ * Used to find minimum or maximum element in tree. \
+ */ \
+void name##_SPLAY_MINMAX(struct name *head, int __comp) \
+{ \
+ struct type __node, *__left, *__right, *__tmp; \
+\
+ SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
+ __left = __right = &__node; \
+\
+ while (1) { \
+ if (__comp < 0) { \
+ __tmp = SPLAY_LEFT((head)->sph_root, field); \
+ if (__tmp == NULL) \
+ break; \
+ if (__comp < 0){ \
+ SPLAY_ROTATE_RIGHT(head, __tmp, field); \
+ if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
+ break; \
+ } \
+ SPLAY_LINKLEFT(head, __right, field); \
+ } else if (__comp > 0) { \
+ __tmp = SPLAY_RIGHT((head)->sph_root, field); \
+ if (__tmp == NULL) \
+ break; \
+ if (__comp > 0) { \
+ SPLAY_ROTATE_LEFT(head, __tmp, field); \
+ if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
+ break; \
+ } \
+ SPLAY_LINKRIGHT(head, __left, field); \
+ } \
+ } \
+ SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
+}
+
+#define SPLAY_NEGINF -1
+#define SPLAY_INF 1
+
+#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y)
+#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y)
+#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y)
+#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y)
+#define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \
+ : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF))
+#define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \
+ : name##_SPLAY_MIN_MAX(x, SPLAY_INF))
+
+#define SPLAY_FOREACH(x, name, head) \
+ for ((x) = SPLAY_MIN(name, head); \
+ (x) != NULL; \
+ (x) = SPLAY_NEXT(name, head, x))
+
+/* Macros that define a red-black tree */
+#define RB_HEAD(name, type) \
+struct name { \
+ struct type *rbh_root; /* root of the tree */ \
+}
+
+#define RB_INITIALIZER(root) \
+ { NULL }
+
+#define RB_INIT(root) do { \
+ (root)->rbh_root = NULL; \
+} while (/*CONSTCOND*/ 0)
+
+#define RB_BLACK 0
+#define RB_RED 1
+#define RB_ENTRY(type) \
+struct { \
+ struct type *rbe_left; /* left element */ \
+ struct type *rbe_right; /* right element */ \
+ struct type *rbe_parent; /* parent element */ \
+ int rbe_color; /* node color */ \
+}
+
+#define RB_LEFT(elm, field) (elm)->field.rbe_left
+#define RB_RIGHT(elm, field) (elm)->field.rbe_right
+#define RB_PARENT(elm, field) (elm)->field.rbe_parent
+#define RB_COLOR(elm, field) (elm)->field.rbe_color
+#define RB_ROOT(head) (head)->rbh_root
+#define RB_EMPTY(head) (RB_ROOT(head) == NULL)
+
+#define RB_SET(elm, parent, field) do { \
+ RB_PARENT(elm, field) = parent; \
+ RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \
+ RB_COLOR(elm, field) = RB_RED; \
+} while (/*CONSTCOND*/ 0)
+
+#define RB_SET_BLACKRED(black, red, field) do { \
+ RB_COLOR(black, field) = RB_BLACK; \
+ RB_COLOR(red, field) = RB_RED; \
+} while (/*CONSTCOND*/ 0)
+
+#ifndef RB_AUGMENT
+#define RB_AUGMENT(x) do {} while (0)
+#endif
+
+#define RB_ROTATE_LEFT(head, elm, tmp, field) do { \
+ (tmp) = RB_RIGHT(elm, field); \
+ if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) { \
+ RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \
+ } \
+ RB_AUGMENT(elm); \
+ if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \
+ if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \
+ RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
+ else \
+ RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
+ } else \
+ (head)->rbh_root = (tmp); \
+ RB_LEFT(tmp, field) = (elm); \
+ RB_PARENT(elm, field) = (tmp); \
+ RB_AUGMENT(tmp); \
+ if ((RB_PARENT(tmp, field))) \
+ RB_AUGMENT(RB_PARENT(tmp, field)); \
+} while (/*CONSTCOND*/ 0)
+
+#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \
+ (tmp) = RB_LEFT(elm, field); \
+ if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) { \
+ RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \
+ } \
+ RB_AUGMENT(elm); \
+ if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \
+ if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \
+ RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
+ else \
+ RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
+ } else \
+ (head)->rbh_root = (tmp); \
+ RB_RIGHT(tmp, field) = (elm); \
+ RB_PARENT(elm, field) = (tmp); \
+ RB_AUGMENT(tmp); \
+ if ((RB_PARENT(tmp, field))) \
+ RB_AUGMENT(RB_PARENT(tmp, field)); \
+} while (/*CONSTCOND*/ 0)
+
+/* Generates prototypes and inline functions */
+#define RB_PROTOTYPE(name, type, field, cmp) \
+ RB_PROTOTYPE_INTERNAL(name, type, field, cmp,)
+#define RB_PROTOTYPE_STATIC(name, type, field, cmp) \
+ RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static)
+#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \
+ RB_PROTOTYPE_INSERT_COLOR(name, type, attr); \
+ RB_PROTOTYPE_REMOVE_COLOR(name, type, attr); \
+ RB_PROTOTYPE_INSERT(name, type, attr); \
+ RB_PROTOTYPE_REMOVE(name, type, attr); \
+ RB_PROTOTYPE_FIND(name, type, attr); \
+ RB_PROTOTYPE_NFIND(name, type, attr); \
+ RB_PROTOTYPE_NEXT(name, type, attr); \
+ RB_PROTOTYPE_PREV(name, type, attr); \
+ RB_PROTOTYPE_MINMAX(name, type, attr);
+#define RB_PROTOTYPE_INSERT_COLOR(name, type, attr) \
+ attr void name##_RB_INSERT_COLOR(struct name *, struct type *)
+#define RB_PROTOTYPE_REMOVE_COLOR(name, type, attr) \
+ attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *)
+#define RB_PROTOTYPE_REMOVE(name, type, attr) \
+ attr struct type *name##_RB_REMOVE(struct name *, struct type *)
+#define RB_PROTOTYPE_INSERT(name, type, attr) \
+ attr struct type *name##_RB_INSERT(struct name *, struct type *)
+#define RB_PROTOTYPE_FIND(name, type, attr) \
+ attr struct type *name##_RB_FIND(struct name *, struct type *)
+#define RB_PROTOTYPE_NFIND(name, type, attr) \
+ attr struct type *name##_RB_NFIND(struct name *, struct type *)
+#define RB_PROTOTYPE_NEXT(name, type, attr) \
+ attr struct type *name##_RB_NEXT(struct type *)
+#define RB_PROTOTYPE_PREV(name, type, attr) \
+ attr struct type *name##_RB_PREV(struct type *)
+#define RB_PROTOTYPE_MINMAX(name, type, attr) \
+ attr struct type *name##_RB_MINMAX(struct name *, int)
+
+/* Main rb operation.
+ * Moves node close to the key of elm to top
+ */
+#define RB_GENERATE(name, type, field, cmp) \
+ RB_GENERATE_INTERNAL(name, type, field, cmp,)
+#define RB_GENERATE_STATIC(name, type, field, cmp) \
+ RB_GENERATE_INTERNAL(name, type, field, cmp, __unused static)
+#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \
+ RB_GENERATE_INSERT_COLOR(name, type, field, attr) \
+ RB_GENERATE_REMOVE_COLOR(name, type, field, attr) \
+ RB_GENERATE_INSERT(name, type, field, cmp, attr) \
+ RB_GENERATE_REMOVE(name, type, field, attr) \
+ RB_GENERATE_FIND(name, type, field, cmp, attr) \
+ RB_GENERATE_NFIND(name, type, field, cmp, attr) \
+ RB_GENERATE_NEXT(name, type, field, attr) \
+ RB_GENERATE_PREV(name, type, field, attr) \
+ RB_GENERATE_MINMAX(name, type, field, attr)
+
+#define RB_GENERATE_INSERT_COLOR(name, type, field, attr) \
+attr void \
+name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \
+{ \
+ struct type *parent, *gparent, *tmp; \
+ while ((parent = RB_PARENT(elm, field)) != NULL && \
+ RB_COLOR(parent, field) == RB_RED) { \
+ gparent = RB_PARENT(parent, field); \
+ if (parent == RB_LEFT(gparent, field)) { \
+ tmp = RB_RIGHT(gparent, field); \
+ if (tmp && RB_COLOR(tmp, field) == RB_RED) { \
+ RB_COLOR(tmp, field) = RB_BLACK; \
+ RB_SET_BLACKRED(parent, gparent, field);\
+ elm = gparent; \
+ continue; \
+ } \
+ if (RB_RIGHT(parent, field) == elm) { \
+ RB_ROTATE_LEFT(head, parent, tmp, field);\
+ tmp = parent; \
+ parent = elm; \
+ elm = tmp; \
+ } \
+ RB_SET_BLACKRED(parent, gparent, field); \
+ RB_ROTATE_RIGHT(head, gparent, tmp, field); \
+ } else { \
+ tmp = RB_LEFT(gparent, field); \
+ if (tmp && RB_COLOR(tmp, field) == RB_RED) { \
+ RB_COLOR(tmp, field) = RB_BLACK; \
+ RB_SET_BLACKRED(parent, gparent, field);\
+ elm = gparent; \
+ continue; \
+ } \
+ if (RB_LEFT(parent, field) == elm) { \
+ RB_ROTATE_RIGHT(head, parent, tmp, field);\
+ tmp = parent; \
+ parent = elm; \
+ elm = tmp; \
+ } \
+ RB_SET_BLACKRED(parent, gparent, field); \
+ RB_ROTATE_LEFT(head, gparent, tmp, field); \
+ } \
+ } \
+ RB_COLOR(head->rbh_root, field) = RB_BLACK; \
+}
+
+#define RB_GENERATE_REMOVE_COLOR(name, type, field, attr) \
+attr void \
+name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \
+{ \
+ struct type *tmp; \
+ while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \
+ elm != RB_ROOT(head)) { \
+ if (RB_LEFT(parent, field) == elm) { \
+ tmp = RB_RIGHT(parent, field); \
+ if (RB_COLOR(tmp, field) == RB_RED) { \
+ RB_SET_BLACKRED(tmp, parent, field); \
+ RB_ROTATE_LEFT(head, parent, tmp, field);\
+ tmp = RB_RIGHT(parent, field); \
+ } \
+ if ((RB_LEFT(tmp, field) == NULL || \
+ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
+ (RB_RIGHT(tmp, field) == NULL || \
+ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
+ RB_COLOR(tmp, field) = RB_RED; \
+ elm = parent; \
+ parent = RB_PARENT(elm, field); \
+ } else { \
+ if (RB_RIGHT(tmp, field) == NULL || \
+ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\
+ struct type *oleft; \
+ if ((oleft = RB_LEFT(tmp, field)) \
+ != NULL) \
+ RB_COLOR(oleft, field) = RB_BLACK;\
+ RB_COLOR(tmp, field) = RB_RED; \
+ RB_ROTATE_RIGHT(head, tmp, oleft, field);\
+ tmp = RB_RIGHT(parent, field); \
+ } \
+ RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
+ RB_COLOR(parent, field) = RB_BLACK; \
+ if (RB_RIGHT(tmp, field)) \
+ RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\
+ RB_ROTATE_LEFT(head, parent, tmp, field);\
+ elm = RB_ROOT(head); \
+ break; \
+ } \
+ } else { \
+ tmp = RB_LEFT(parent, field); \
+ if (RB_COLOR(tmp, field) == RB_RED) { \
+ RB_SET_BLACKRED(tmp, parent, field); \
+ RB_ROTATE_RIGHT(head, parent, tmp, field);\
+ tmp = RB_LEFT(parent, field); \
+ } \
+ if ((RB_LEFT(tmp, field) == NULL || \
+ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
+ (RB_RIGHT(tmp, field) == NULL || \
+ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
+ RB_COLOR(tmp, field) = RB_RED; \
+ elm = parent; \
+ parent = RB_PARENT(elm, field); \
+ } else { \
+ if (RB_LEFT(tmp, field) == NULL || \
+ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\
+ struct type *oright; \
+ if ((oright = RB_RIGHT(tmp, field)) \
+ != NULL) \
+ RB_COLOR(oright, field) = RB_BLACK;\
+ RB_COLOR(tmp, field) = RB_RED; \
+ RB_ROTATE_LEFT(head, tmp, oright, field);\
+ tmp = RB_LEFT(parent, field); \
+ } \
+ RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
+ RB_COLOR(parent, field) = RB_BLACK; \
+ if (RB_LEFT(tmp, field)) \
+ RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\
+ RB_ROTATE_RIGHT(head, parent, tmp, field);\
+ elm = RB_ROOT(head); \
+ break; \
+ } \
+ } \
+ } \
+ if (elm) \
+ RB_COLOR(elm, field) = RB_BLACK; \
+}
+
+#define RB_GENERATE_REMOVE(name, type, field, attr) \
+attr struct type * \
+name##_RB_REMOVE(struct name *head, struct type *elm) \
+{ \
+ struct type *child, *parent, *old = elm; \
+ int color; \
+ if (RB_LEFT(elm, field) == NULL) \
+ child = RB_RIGHT(elm, field); \
+ else if (RB_RIGHT(elm, field) == NULL) \
+ child = RB_LEFT(elm, field); \
+ else { \
+ struct type *left; \
+ elm = RB_RIGHT(elm, field); \
+ while ((left = RB_LEFT(elm, field)) != NULL) \
+ elm = left; \
+ child = RB_RIGHT(elm, field); \
+ parent = RB_PARENT(elm, field); \
+ color = RB_COLOR(elm, field); \
+ if (child) \
+ RB_PARENT(child, field) = parent; \
+ if (parent) { \
+ if (RB_LEFT(parent, field) == elm) \
+ RB_LEFT(parent, field) = child; \
+ else \
+ RB_RIGHT(parent, field) = child; \
+ RB_AUGMENT(parent); \
+ } else \
+ RB_ROOT(head) = child; \
+ if (RB_PARENT(elm, field) == old) \
+ parent = elm; \
+ (elm)->field = (old)->field; \
+ if (RB_PARENT(old, field)) { \
+ if (RB_LEFT(RB_PARENT(old, field), field) == old)\
+ RB_LEFT(RB_PARENT(old, field), field) = elm;\
+ else \
+ RB_RIGHT(RB_PARENT(old, field), field) = elm;\
+ RB_AUGMENT(RB_PARENT(old, field)); \
+ } else \
+ RB_ROOT(head) = elm; \
+ RB_PARENT(RB_LEFT(old, field), field) = elm; \
+ if (RB_RIGHT(old, field)) \
+ RB_PARENT(RB_RIGHT(old, field), field) = elm; \
+ if (parent) { \
+ left = parent; \
+ do { \
+ RB_AUGMENT(left); \
+ } while ((left = RB_PARENT(left, field)) != NULL); \
+ } \
+ goto color; \
+ } \
+ parent = RB_PARENT(elm, field); \
+ color = RB_COLOR(elm, field); \
+ if (child) \
+ RB_PARENT(child, field) = parent; \
+ if (parent) { \
+ if (RB_LEFT(parent, field) == elm) \
+ RB_LEFT(parent, field) = child; \
+ else \
+ RB_RIGHT(parent, field) = child; \
+ RB_AUGMENT(parent); \
+ } else \
+ RB_ROOT(head) = child; \
+color: \
+ if (color == RB_BLACK) \
+ name##_RB_REMOVE_COLOR(head, parent, child); \
+ return (old); \
+} \
+
+#define RB_GENERATE_INSERT(name, type, field, cmp, attr) \
+/* Inserts a node into the RB tree */ \
+attr struct type * \
+name##_RB_INSERT(struct name *head, struct type *elm) \
+{ \
+ struct type *tmp; \
+ struct type *parent = NULL; \
+ int comp = 0; \
+ tmp = RB_ROOT(head); \
+ while (tmp) { \
+ parent = tmp; \
+ comp = (cmp)(elm, parent); \
+ if (comp < 0) \
+ tmp = RB_LEFT(tmp, field); \
+ else if (comp > 0) \
+ tmp = RB_RIGHT(tmp, field); \
+ else \
+ return (tmp); \
+ } \
+ RB_SET(elm, parent, field); \
+ if (parent != NULL) { \
+ if (comp < 0) \
+ RB_LEFT(parent, field) = elm; \
+ else \
+ RB_RIGHT(parent, field) = elm; \
+ RB_AUGMENT(parent); \
+ } else \
+ RB_ROOT(head) = elm; \
+ name##_RB_INSERT_COLOR(head, elm); \
+ return (NULL); \
+}
+
+#define RB_GENERATE_FIND(name, type, field, cmp, attr) \
+/* Finds the node with the same key as elm */ \
+attr struct type * \
+name##_RB_FIND(struct name *head, struct type *elm) \
+{ \
+ struct type *tmp = RB_ROOT(head); \
+ int comp; \
+ while (tmp) { \
+ comp = cmp(elm, tmp); \
+ if (comp < 0) \
+ tmp = RB_LEFT(tmp, field); \
+ else if (comp > 0) \
+ tmp = RB_RIGHT(tmp, field); \
+ else \
+ return (tmp); \
+ } \
+ return (NULL); \
+}
+
+#define RB_GENERATE_NFIND(name, type, field, cmp, attr) \
+/* Finds the first node greater than or equal to the search key */ \
+attr struct type * \
+name##_RB_NFIND(struct name *head, struct type *elm) \
+{ \
+ struct type *tmp = RB_ROOT(head); \
+ struct type *res = NULL; \
+ int comp; \
+ while (tmp) { \
+ comp = cmp(elm, tmp); \
+ if (comp < 0) { \
+ res = tmp; \
+ tmp = RB_LEFT(tmp, field); \
+ } \
+ else if (comp > 0) \
+ tmp = RB_RIGHT(tmp, field); \
+ else \
+ return (tmp); \
+ } \
+ return (res); \
+}
+
+#define RB_GENERATE_NEXT(name, type, field, attr) \
+/* ARGSUSED */ \
+attr struct type * \
+name##_RB_NEXT(struct type *elm) \
+{ \
+ if (RB_RIGHT(elm, field)) { \
+ elm = RB_RIGHT(elm, field); \
+ while (RB_LEFT(elm, field)) \
+ elm = RB_LEFT(elm, field); \
+ } else { \
+ if (RB_PARENT(elm, field) && \
+ (elm == RB_LEFT(RB_PARENT(elm, field), field))) \
+ elm = RB_PARENT(elm, field); \
+ else { \
+ while (RB_PARENT(elm, field) && \
+ (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\
+ elm = RB_PARENT(elm, field); \
+ elm = RB_PARENT(elm, field); \
+ } \
+ } \
+ return (elm); \
+}
+
+#define RB_GENERATE_PREV(name, type, field, attr) \
+/* ARGSUSED */ \
+attr struct type * \
+name##_RB_PREV(struct type *elm) \
+{ \
+ if (RB_LEFT(elm, field)) { \
+ elm = RB_LEFT(elm, field); \
+ while (RB_RIGHT(elm, field)) \
+ elm = RB_RIGHT(elm, field); \
+ } else { \
+ if (RB_PARENT(elm, field) && \
+ (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \
+ elm = RB_PARENT(elm, field); \
+ else { \
+ while (RB_PARENT(elm, field) && \
+ (elm == RB_LEFT(RB_PARENT(elm, field), field)))\
+ elm = RB_PARENT(elm, field); \
+ elm = RB_PARENT(elm, field); \
+ } \
+ } \
+ return (elm); \
+}
+
+#define RB_GENERATE_MINMAX(name, type, field, attr) \
+attr struct type * \
+name##_RB_MINMAX(struct name *head, int val) \
+{ \
+ struct type *tmp = RB_ROOT(head); \
+ struct type *parent = NULL; \
+ while (tmp) { \
+ parent = tmp; \
+ if (val < 0) \
+ tmp = RB_LEFT(tmp, field); \
+ else \
+ tmp = RB_RIGHT(tmp, field); \
+ } \
+ return (parent); \
+}
+
+#define RB_NEGINF -1
+#define RB_INF 1
+
+#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y)
+#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y)
+#define RB_FIND(name, x, y) name##_RB_FIND(x, y)
+#define RB_NFIND(name, x, y) name##_RB_NFIND(x, y)
+#define RB_NEXT(name, x, y) name##_RB_NEXT(y)
+#define RB_PREV(name, x, y) name##_RB_PREV(y)
+#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF)
+#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF)
+
+#define RB_FOREACH(x, name, head) \
+ for ((x) = RB_MIN(name, head); \
+ (x) != NULL; \
+ (x) = name##_RB_NEXT(x))
+
+#define RB_FOREACH_FROM(x, name, y) \
+ for ((x) = (y); \
+ ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \
+ (x) = (y))
+
+#define RB_FOREACH_SAFE(x, name, head, y) \
+ for ((x) = RB_MIN(name, head); \
+ ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \
+ (x) = (y))
+
+#define RB_FOREACH_REVERSE(x, name, head) \
+ for ((x) = RB_MAX(name, head); \
+ (x) != NULL; \
+ (x) = name##_RB_PREV(x))
+
+#define RB_FOREACH_REVERSE_FROM(x, name, y) \
+ for ((x) = (y); \
+ ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
+ (x) = (y))
+
+#define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \
+ for ((x) = RB_MAX(name, head); \
+ ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
+ (x) = (y))
+
+#endif /* _SYS_TREE_H_ */
diff --git a/misc/wscript b/misc/wscript
index 95c7bde..d5070c1 100644
--- a/misc/wscript
+++ b/misc/wscript
@@ -67,5 +67,15 @@ def build(bld):
cflags = conf['cflags'] + conf['warningflags'],
linkflags = conf['linkflags'])
+ #
+ # Build rtems-record
+ #
+ bld.program(target = 'rtems-record',
+ source = ['record/record-client.c', 'record/record-main.c', 'record/record-text.c'],
+ includes = ['record'],
+ defines = defines,
+ cflags = conf['cflags'] + conf['warningflags'],
+ linkflags = conf['linkflags'])
+
def tags(ctx):
ctx.exec_command('etags $(find . -name \*.[sSch])', shell = True)
--
2.16.4
More information about the devel
mailing list