Newer
Older
ubixos-old / doc / doxygen / html / sched_8h-source.html
@CloudNine CloudNine on 28 Apr 2004 6 KB doxygen documentation added
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Ubixos: sched.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.3 -->
<h1>sched.h</h1><div class="fragment"><pre>00001 <span class="comment">/**************************************************************************************</span>
00002 <span class="comment"> Copyright (c) 2002 The UbixOS Project</span>
00003 <span class="comment"> All rights reserved.</span>
00004 <span class="comment"></span>
00005 <span class="comment">Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</span>
00006 <span class="comment"></span>
00007 <span class="comment">Redistributions of source code must retain the above copyright notice, this list of conditions, the following disclaimer and the list of authors.</span>
00008 <span class="comment">Redistributions in binary form must reproduce the above copyright notice, this list of conditions, the following disclaimer and the list of authors</span>
00009 <span class="comment">in the documentation and/or other materials provided with the distribution. Neither the name of the UbixOS Project nor the names of its</span>
00010 <span class="comment">contributors may be used to endorse or promote products derived from this software without specific prior written permission.</span>
00011 <span class="comment"></span>
00012 <span class="comment">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED</span>
00013 <span class="comment">WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR</span>
00014 <span class="comment">PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,</span>
00015 <span class="comment">INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE</span>
00016 <span class="comment">GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY</span>
00017 <span class="comment">OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY</span>
00018 <span class="comment">OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>
00019 <span class="comment"></span>
00020 <span class="comment"> $Id$</span>
00021 <span class="comment"></span>
00022 <span class="comment">**************************************************************************************/</span>
00023 
00024 <span class="preprocessor">#ifndef _SCHED_H</span>
00025 <span class="preprocessor"></span><span class="preprocessor">#define _SCHED_H</span>
00026 <span class="preprocessor"></span>
00027 <span class="preprocessor">#ifdef __cplusplus</span>
00028 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
00029 <span class="preprocessor">#endif</span>
00030 <span class="preprocessor"></span>
00031 <span class="preprocessor">#include &lt;ubixos/types.h&gt;</span>
00032 <span class="preprocessor">#include &lt;ubixos/elf.h&gt;</span>
00033 <span class="preprocessor">#include &lt;vfs/file.h&gt;</span>
00034 <span class="preprocessor">#include &lt;sys/tss.h&gt;</span>
00035 
00036 
00037 <span class="keyword">typedef</span> <span class="keyword">enum</span> { DEAD=-1,NEW=0,READY=1,RUNNING=2,IDLE=3 } tState;
00038 
00039 <span class="keyword">struct </span>osInfo {
00040   <span class="keyword">struct </span>mountPoints   *container;
00041   elfSectionheader     *sectionHeader;
00042   <span class="keyword">struct </span>taskFileInfo   fileInfo;
00043   <span class="keyword">struct </span>consoleStruct *terminal;
00044   uInt16                sectionCount;
00045   uInt16                stringSection;
00046   uInt8                 timer;
00047   uInt8                 v86Task;
00048   <span class="keywordtype">bool</span>                  v86If;
00049   uInt32                curDir;
00050   uInt32                vmStart;
00051   uInt32                stdinSize;
00052   uInt32                controlKeys;
00053   <span class="keywordtype">char</span>                 *stdin;
00054   <span class="keywordtype">char</span>                 *shstrtab;
00055   <span class="keywordtype">char</span>                 *cwd;
00056   };
00057 
00058 <span class="keyword">typedef</span> <span class="keyword">struct </span>taskStruct {
00059   pidType           id;
00060   <span class="keyword">struct </span>taskStruct *prev;
00061   <span class="keyword">struct </span>taskStruct *next;
00062   <span class="keyword">struct </span>tssStruct  tss;
00063   <span class="keyword">struct </span>i387Struct i387;
00064   <span class="keyword">struct </span>osInfo     oInfo;
00065   tState            state;
00066   uInt32            gid;
00067   uInt32            uid;
00068   uInt16            usedMath;
00069   } kTask_t;
00070 
00071 
00072 <span class="keywordtype">int</span> schedInit();
00073 <span class="keywordtype">void</span> sched();
00074 <span class="keywordtype">void</span> schedYield();
00075 <span class="keywordtype">int</span> schedEndTask(pidType pid);
00076 kTask_t *schedNewTask();
00077 kTask_t *schedFindTask(uInt32 id);
00078 <span class="keywordtype">int</span> deleteTask(uInt32);
00079 
00080 <span class="keyword">extern</span> kTask_t *taskList;
00081 <span class="keyword">extern</span> uInt32  nextID;
00082 <span class="keyword">extern</span> kTask_t *_current;
00083 <span class="keyword">extern</span> kTask_t *_usedMath;
00084 
00085 <span class="preprocessor">#ifdef __cplusplus</span>
00086 <span class="preprocessor"></span>}
00087 <span class="preprocessor">#endif</span>
00088 <span class="preprocessor"></span>
00089 <span class="preprocessor">#endif</span>
00090 <span class="preprocessor"></span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Apr 28 17:49:39 2004 for Ubixos by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.3 </small></address>
</body>
</html>