source: rtems-schedsim/schedsim/shell/shared/schedsim_disable_dispatch.c @ 6d31eca

Last change on this file since 6d31eca was 6d31eca, checked in by Joel Sherrill <joel.sherrill@…>, on Apr 30, 2014 at 7:17:04 PM

schedsim/shell/shared/schedsim_disable_dispatch.c: New file missed earlier

  • Property mode set to 100644
File size: 681 bytes
Line 
1/*
2 *  COPYRIGHT (c) 1989-2014.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 */
9
10#ifdef HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#include <rtems.h>
15
16#include "shell.h"
17#include <schedsim_shell.h>
18#include <rtems/score/threadimpl.h>
19
20static bool  allow_dispatch = true;
21
22void schedsim_set_allow_dispatch(bool value)
23{
24  bool old = allow_dispatch;
25
26  allow_dispatch = value;
27  if ( value == true && old != value )
28    _Thread_Dispatch();
29}
30
31bool schedsim_is_dispatch_allowed(void)
32{
33  return allow_dispatch;
34}
35
Note: See TracBrowser for help on using the repository browser.