1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>OS_EnableScheduler</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">OS_EnableScheduler <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14  <DD>
15  <PRE><CODE>#include &lt;nitro/os.h&gt;</CODE></PRE>
16  <PRE><CODE>u32 OS_EnableScheduler( void );</CODE></PRE>
17</DL>
18<H2>Arguments</H2>
19<P>None.</P>
20
21<H2>Return Values</H2>
22<P>The internal counter value after canceling the suppression of the scheduler operation.</P>
23<P>When this value is larger than 0, the scheduler operation is suppressed.</P>
24
25<H2>Description</H2>
26<P> Cancels the suppressed operation of the thread system scheduler. In other words, rescheduling will be resumed.</P>
27<P> If the operation of the thread system scheduler is suppressed, the rescheduling of the thread will not occur, even when the functions such as <code><a href="OS_WakeupThread.html">OS_WakeupThread</a></code> and <code><a href="OS_SetThreadPriority.html">OS_SetThreadPriority</a></code> that have the possibility of generating the rescheduling of threads are called.</P>
28<P>Normally, this <CODE>OS_EnableScheduler</CODE> is called with <CODE><A href="OS_DisableScheduler.html">OS_DisableScheduler()</A></CODE> as a pair.</P>
29<P> Call <code>OS_DisableScheduler</code> and <code><a href="OS_EnableScheduler.html">OS_EnableScheduler</a></code> while the interrupts are prohibited.</P>
30<P> The scheduler has the internal counter. That counter, which is normally set to 0, increments by one with <code>OS_DisableScheduler</code> and decrements by one with <code><a href="OS_EnableScheduler.html">OS_EnableScheduler</a></code>. In addition, if it is larger than 0, this prevents rescheduling. The return value from this function is the value after the counter has changed. If it is larger than 0, it is the state that has not yet rescheduled.</P>
31<P> A set of <code>OS_DisableScheduler</code> and <code><a href="OS_EnableScheduler.html">OS_EnableScheduler</a></code> as a pair can be nested. For an example see the reference for <CODE><A href="OS_DisableScheduler.html">OS_DisableScheduler()</A></CODE>.</P>
32<H2>See Also</H2>
33<P><CODE><A href="OS_SelectThread.html">OS_SelectThread</A>, <A href="OS_RescheduleThread.html">OS_RescheduleThread</A>, <A href="OS_DisableScheduler.html">OS_DisableScheduler</A></CODE></P>
34<H2>Revision History</H2>
35<P>
362005/03/08 Standardized the Japanese term for &quot;interrupt.&quot;<br> 2005/01/21 Initial version.</P>
37<hr><p>CONFIDENTIAL</p></body>
38</HTML>