summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2023-03-17 15:54:32 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2023-03-17 15:54:32 +0100
commit6faa92633ab7a0d1dd0fdab8a98501918a4808ef (patch)
tree7c481f8ee753c9efe62fd3b43a06c12048bc5253
parentmodules: Update rtems (diff)
downloadrtems-central-6faa92633ab7a0d1dd0fdab8a98501918a4808ef.tar.bz2
spec: Replace enum Event with defines
There is a Doxygen limitation that all compound names (enum, struct, class, union, group) within a project must be unique.
-rw-r--r--spec/rtems/event/val/perf.yml9
-rw-r--r--spec/rtems/message/val/perf.yml18
-rw-r--r--spec/rtems/ratemon/req/timeout.yml12
-rw-r--r--spec/rtems/scheduler/req/remove-processor.yml32
-rw-r--r--spec/rtems/sem/val/perf.yml18
-rw-r--r--spec/rtems/task/val/perf.yml12
-rw-r--r--spec/score/sched/smp/val/smp.yml27
-rw-r--r--spec/score/thread/val/smp-one-cpu.yml6
-rw-r--r--spec/score/thread/val/smp.yml24
9 files changed, 90 insertions, 68 deletions
diff --git a/spec/rtems/event/val/perf.yml b/spec/rtems/event/val/perf.yml
index cb4cb662..0e08529f 100644
--- a/spec/rtems/event/val/perf.yml
+++ b/spec/rtems/event/val/perf.yml
@@ -39,12 +39,11 @@ test-setup:
description: null
test-stop: null
test-support: |
- typedef ${.:/test-context-type} Context;
+ #define EVENT_END RTEMS_EVENT_0
+
+ #define EVENT_OTHER RTEMS_EVENT_1
- typedef enum {
- EVENT_END = RTEMS_EVENT_0,
- EVENT_OTHER = RTEMS_EVENT_1
- } Event;
+ typedef ${.:/test-context-type} Context;
static void Send( const Context *ctx, rtems_event_set events )
{
diff --git a/spec/rtems/message/val/perf.yml b/spec/rtems/message/val/perf.yml
index 6613087f..08232c9d 100644
--- a/spec/rtems/message/val/perf.yml
+++ b/spec/rtems/message/val/perf.yml
@@ -59,15 +59,17 @@ test-support: |
#define MAXIMUM_MESSAGE_SIZE 8
- typedef ${.:/test-context-type} Context;
+ #define EVENT_END RTEMS_EVENT_0
+
+ #define EVENT_SEND RTEMS_EVENT_1
+
+ #define EVENT_SEND_END RTEMS_EVENT_2
- typedef enum {
- EVENT_END = RTEMS_EVENT_0,
- EVENT_SEND = RTEMS_EVENT_1,
- EVENT_SEND_END = RTEMS_EVENT_2,
- EVENT_RECEIVE = RTEMS_EVENT_3,
- EVENT_RECEIVE_END = RTEMS_EVENT_4
- } Event;
+ #define EVENT_RECEIVE RTEMS_EVENT_3
+
+ #define EVENT_RECEIVE_END RTEMS_EVENT_4
+
+ typedef ${.:/test-context-type} Context;
static RTEMS_MESSAGE_QUEUE_BUFFER( MAXIMUM_MESSAGE_SIZE )
storage_area[ MAXIMUM_PENDING_MESSAGES ];
diff --git a/spec/rtems/ratemon/req/timeout.yml b/spec/rtems/ratemon/req/timeout.yml
index 8dccab62..32bc488d 100644
--- a/spec/rtems/ratemon/req/timeout.yml
+++ b/spec/rtems/ratemon/req/timeout.yml
@@ -305,13 +305,13 @@ test-setup:
description: null
test-stop: null
test-support: |
- typedef ${.:/test-context-type} Context;
+ #define EVENT_RESET RTEMS_EVENT_0
+
+ #define EVENT_PERIOD_WAIT RTEMS_EVENT_1
- typedef enum {
- EVENT_RESET = RTEMS_EVENT_0,
- EVENT_PERIOD_WAIT = RTEMS_EVENT_1,
- EVENT_PERIOD_OTHER = RTEMS_EVENT_2
- } Event;
+ #define EVENT_PERIOD_OTHER RTEMS_EVENT_2
+
+ typedef ${.:/test-context-type} Context;
static void Tick( void *arg )
{
diff --git a/spec/rtems/scheduler/req/remove-processor.yml b/spec/rtems/scheduler/req/remove-processor.yml
index 2c77567e..9b011019 100644
--- a/spec/rtems/scheduler/req/remove-processor.yml
+++ b/spec/rtems/scheduler/req/remove-processor.yml
@@ -573,16 +573,22 @@ test-support: |
}
#if defined(RTEMS_SMP)
- typedef enum {
- EVENT_SYNC_RUNNER = RTEMS_EVENT_0,
- EVENT_OBTAIN = RTEMS_EVENT_1,
- EVENT_RELEASE = RTEMS_EVENT_2,
- EVENT_STICKY_OBTAIN = RTEMS_EVENT_3,
- EVENT_STICKY_RELEASE = RTEMS_EVENT_4,
- EVENT_RESTART = RTEMS_EVENT_5,
- EVENT_BUSY = RTEMS_EVENT_6,
- EVENT_SYNC_RUNNER_LATE = RTEMS_EVENT_7
- } Event;
+
+ #define EVENT_SYNC_RUNNER RTEMS_EVENT_0
+
+ #define EVENT_OBTAIN RTEMS_EVENT_1
+
+ #define EVENT_RELEASE RTEMS_EVENT_2
+
+ #define EVENT_STICKY_OBTAIN RTEMS_EVENT_3
+
+ #define EVENT_STICKY_RELEASE RTEMS_EVENT_4
+
+ #define EVENT_RESTART RTEMS_EVENT_5
+
+ #define EVENT_BUSY RTEMS_EVENT_6
+
+ #define EVENT_SYNC_RUNNER_LATE RTEMS_EVENT_7
static void Barriers( void *arg )
{
@@ -609,7 +615,11 @@ test-support: |
CallWithinISRSubmit( &ctx->request );
}
- static void SendAndSync( Context *ctx, WorkerIndex worker, Event event )
+ static void SendAndSync(
+ Context *ctx,
+ WorkerIndex worker,
+ rtems_event_set event
+ )
{
SendEvents( ctx->worker_id[ worker ], EVENT_SYNC_RUNNER | event );
ReceiveAllEvents( EVENT_SYNC_RUNNER );
diff --git a/spec/rtems/sem/val/perf.yml b/spec/rtems/sem/val/perf.yml
index a2e5722e..02e21c21 100644
--- a/spec/rtems/sem/val/perf.yml
+++ b/spec/rtems/sem/val/perf.yml
@@ -45,15 +45,17 @@ test-setup:
description: null
test-stop: null
test-support: |
- typedef ${.:/test-context-type} Context;
+ #define EVENT_END RTEMS_EVENT_0
+
+ #define EVENT_OBTAIN RTEMS_EVENT_1
+
+ #define EVENT_OBTAIN_END RTEMS_EVENT_2
- typedef enum {
- EVENT_END = RTEMS_EVENT_0,
- EVENT_OBTAIN = RTEMS_EVENT_1,
- EVENT_OBTAIN_END = RTEMS_EVENT_2,
- EVENT_RELEASE = RTEMS_EVENT_3,
- EVENT_RELEASE_END = RTEMS_EVENT_4
- } Event;
+ #define EVENT_RELEASE RTEMS_EVENT_3
+
+ #define EVENT_RELEASE_END RTEMS_EVENT_4
+
+ typedef ${.:/test-context-type} Context;
static void Send( const Context *ctx, rtems_event_set events )
{
diff --git a/spec/rtems/task/val/perf.yml b/spec/rtems/task/val/perf.yml
index f299b8b0..984f6c08 100644
--- a/spec/rtems/task/val/perf.yml
+++ b/spec/rtems/task/val/perf.yml
@@ -43,13 +43,13 @@ test-setup:
description: null
test-stop: null
test-support: |
- typedef ${.:/test-context-type} Context;
+ #define EVENT_RESTART RTEMS_EVENT_0
+
+ #define EVENT_SET_END RTEMS_EVENT_1
- enum {
- EVENT_RESTART = RTEMS_EVENT_0,
- EVENT_SET_END = RTEMS_EVENT_1,
- EVENT_BUSY = RTEMS_EVENT_2
- } Event;
+ #define EVENT_BUSY RTEMS_EVENT_2
+
+ typedef ${.:/test-context-type} Context;
RTEMS_ALIGNED( RTEMS_TASK_STORAGE_ALIGNMENT ) static char task_storage[
RTEMS_TASK_STORAGE_SIZE(
diff --git a/spec/score/sched/smp/val/smp.yml b/spec/score/sched/smp/val/smp.yml
index 0054e7d4..227f83be 100644
--- a/spec/score/sched/smp/val/smp.yml
+++ b/spec/score/sched/smp/val/smp.yml
@@ -592,18 +592,25 @@ test-setup:
description: null
test-stop: null
test-support: |
+ #define EVENT_OBTAIN RTEMS_EVENT_0
+
+ #define EVENT_RELEASE RTEMS_EVENT_1
+
+ #define EVENT_STICKY_OBTAIN RTEMS_EVENT_2
+
+ #define EVENT_STICKY_RELEASE RTEMS_EVENT_3
+
+ #define EVENT_SYNC_RUNNER RTEMS_EVENT_4
+
+ #define EVENT_BUSY RTEMS_EVENT_5
+
typedef ${.:/test-context-type} Context;
- typedef enum {
- EVENT_OBTAIN = RTEMS_EVENT_0,
- EVENT_RELEASE = RTEMS_EVENT_1,
- EVENT_STICKY_OBTAIN = RTEMS_EVENT_2,
- EVENT_STICKY_RELEASE = RTEMS_EVENT_3,
- EVENT_SYNC_RUNNER = RTEMS_EVENT_4,
- EVENT_BUSY = RTEMS_EVENT_5
- } Event;
-
- static void SendAndSync( Context *ctx, WorkerIndex worker, Event event )
+ static void SendAndSync(
+ Context *ctx,
+ WorkerIndex worker,
+ rtems_event_set event
+ )
{
SendEvents( ctx->worker_id[ worker ], EVENT_SYNC_RUNNER | event );
ReceiveAllEvents( EVENT_SYNC_RUNNER );
diff --git a/spec/score/thread/val/smp-one-cpu.yml b/spec/score/thread/val/smp-one-cpu.yml
index ba7a7076..7a522d8d 100644
--- a/spec/score/thread/val/smp-one-cpu.yml
+++ b/spec/score/thread/val/smp-one-cpu.yml
@@ -65,11 +65,9 @@ test-local-includes:
test-setup: null
test-stop: null
test-support: |
- typedef ${.:/test-context-type} Context;
+ #define EVENT_COUNT RTEMS_EVENT_0
- typedef enum {
- EVENT_COUNT = RTEMS_EVENT_0
- } Event;
+ typedef ${.:/test-context-type} Context;
static void WorkerTask( rtems_task_argument arg )
{
diff --git a/spec/score/thread/val/smp.yml b/spec/score/thread/val/smp.yml
index 51bac130..c2f59e0c 100644
--- a/spec/score/thread/val/smp.yml
+++ b/spec/score/thread/val/smp.yml
@@ -279,17 +279,21 @@ test-setup:
description: null
test-stop: null
test-support: |
- typedef ${.:/test-context-type} Context;
+ #define EVENT_OBTAIN RTEMS_EVENT_0
+
+ #define EVENT_RELEASE RTEMS_EVENT_1
+
+ #define EVENT_COUNT_EARLY RTEMS_EVENT_2
+
+ #define EVENT_BUSY RTEMS_EVENT_3
- typedef enum {
- EVENT_OBTAIN = RTEMS_EVENT_0,
- EVENT_RELEASE = RTEMS_EVENT_1,
- EVENT_COUNT_EARLY = RTEMS_EVENT_2,
- EVENT_BUSY = RTEMS_EVENT_3,
- EVENT_COUNT = RTEMS_EVENT_4,
- EVENT_LET_WORKER_C_COUNT = RTEMS_EVENT_5,
- EVENT_SET_TASK_SWITCH_EXTENSION = RTEMS_EVENT_6
- } Event;
+ #define EVENT_COUNT RTEMS_EVENT_4
+
+ #define EVENT_LET_WORKER_C_COUNT RTEMS_EVENT_5
+
+ #define EVENT_SET_TASK_SWITCH_EXTENSION RTEMS_EVENT_6
+
+ typedef ${.:/test-context-type} Context;
static void TaskSwitchExtension( rtems_tcb *executing, rtems_tcb *heir )
{