summaryrefslogtreecommitdiff
path: root/schedsim/shell/shared/getthreadheir.c
diff options
context:
space:
mode:
Diffstat (limited to 'schedsim/shell/shared/getthreadheir.c')
-rw-r--r--schedsim/shell/shared/getthreadheir.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/schedsim/shell/shared/getthreadheir.c b/schedsim/shell/shared/getthreadheir.c
new file mode 100644
index 0000000..61b9f9b
--- /dev/null
+++ b/schedsim/shell/shared/getthreadheir.c
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * @brief Get Thread Heir Helper
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2014.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "shell.h"
+#include <schedsim_shell.h>
+#include <rtems/score/threaddispatch.h>
+
+Thread_Control *get_thread_heir(void)
+{
+ Thread_Control *e;
+
+ _Thread_Disable_dispatch();
+ e = _Thread_Heir;
+ _Thread_Enable_dispatch();
+ return e;
+}