diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-08 11:16:49 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-09 15:47:12 +0100 |
commit | 26841e92114a3e6770da054414e635b0d2e9a32c (patch) | |
tree | 504d63d367fcaae7bc053d21449f11102485dbd9 | |
parent | 95455229a89456adeb13a4a8877f7b3f62118ef5 (diff) |
testsuites/validation/tc-sem-smp.c
-rw-r--r-- | testsuites/validation/tc-sem-smp.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/testsuites/validation/tc-sem-smp.c b/testsuites/validation/tc-sem-smp.c index a7432fa8f1..cfe82b3982 100644 --- a/testsuites/validation/tc-sem-smp.c +++ b/testsuites/validation/tc-sem-smp.c @@ -144,40 +144,6 @@ typedef struct { static RtemsSemValSmp_Context RtemsSemValSmp_Instance; -static void RtemsSemValSmp_Setup( RtemsSemValSmp_Context *ctx ) -{ - SetSelfPriority( PRIO_NORMAL ); -} - -static void RtemsSemValSmp_Setup_Wrap( void *arg ) -{ - RtemsSemValSmp_Context *ctx; - - ctx = arg; - RtemsSemValSmp_Setup( ctx ); -} - -static void RtemsSemValSmp_Teardown( RtemsSemValSmp_Context *ctx ) -{ - RestoreRunnerPriority(); -} - -static void RtemsSemValSmp_Teardown_Wrap( void *arg ) -{ - RtemsSemValSmp_Context *ctx; - - ctx = arg; - RtemsSemValSmp_Teardown( ctx ); -} - -static T_fixture RtemsSemValSmp_Fixture = { - .setup = RtemsSemValSmp_Setup_Wrap, - .stop = NULL, - .teardown = RtemsSemValSmp_Teardown_Wrap, - .scope = NULL, - .initial_context = &RtemsSemValSmp_Instance -}; - typedef RtemsSemValSmp_Context Context; static void BadEnqueueFatal( @@ -241,6 +207,40 @@ static void ObtainRelease2Task( rtems_task_argument arg ) SuspendSelf(); } +static void RtemsSemValSmp_Setup( RtemsSemValSmp_Context *ctx ) +{ + SetSelfPriority( PRIO_NORMAL ); +} + +static void RtemsSemValSmp_Setup_Wrap( void *arg ) +{ + RtemsSemValSmp_Context *ctx; + + ctx = arg; + RtemsSemValSmp_Setup( ctx ); +} + +static void RtemsSemValSmp_Teardown( RtemsSemValSmp_Context *ctx ) +{ + RestoreRunnerPriority(); +} + +static void RtemsSemValSmp_Teardown_Wrap( void *arg ) +{ + RtemsSemValSmp_Context *ctx; + + ctx = arg; + RtemsSemValSmp_Teardown( ctx ); +} + +static T_fixture RtemsSemValSmp_Fixture = { + .setup = RtemsSemValSmp_Setup_Wrap, + .stop = NULL, + .teardown = RtemsSemValSmp_Teardown_Wrap, + .scope = NULL, + .initial_context = &RtemsSemValSmp_Instance +}; + /** * @brief Create a worker thread and a MrsP mutex. Use the mutex and the * worker to perform a bad sticky thread queue enqueue. |