summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuites/validation/tx-support.c21
-rw-r--r--testsuites/validation/tx-support.h6
2 files changed, 27 insertions, 0 deletions
diff --git a/testsuites/validation/tx-support.c b/testsuites/validation/tx-support.c
index 9f55a64fa4..6a65055b19 100644
--- a/testsuites/validation/tx-support.c
+++ b/testsuites/validation/tx-support.c
@@ -83,6 +83,27 @@ void DeleteTask( rtems_id id )
}
}
+void SuspendTask( rtems_id id )
+{
+ rtems_status_code sc;
+
+ sc = rtems_task_suspend( id );
+ T_quiet_rsc_success( sc );
+}
+
+void SuspendSelf( void )
+{
+ SuspendTask( RTEMS_SELF );
+}
+
+void ResumeTask( rtems_id id )
+{
+ rtems_status_code sc;
+
+ sc = rtems_task_resume( id );
+ T_quiet_rsc_success( sc );
+}
+
rtems_event_set ReceiveAnyEvents( void )
{
rtems_status_code sc;
diff --git a/testsuites/validation/tx-support.h b/testsuites/validation/tx-support.h
index 48559379e6..c867879606 100644
--- a/testsuites/validation/tx-support.h
+++ b/testsuites/validation/tx-support.h
@@ -81,6 +81,12 @@ void StartTask( rtems_id id, rtems_task_entry entry, void *arg );
void DeleteTask( rtems_id id );
+void SuspendTask( rtems_id id );
+
+void SuspendSelf( void );
+
+void ResumeTask( rtems_id id );
+
rtems_event_set ReceiveAnyEvents( void );
void ReceiveAllEvents( rtems_event_set events );