summaryrefslogtreecommitdiff
path: root/schedsim/shell/shared/getthreadheir.c
blob: 61b9f9bdc6fdb60c0be4b2cb424c3732b4b7cb92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
}