00001 00006 /* 00007 * The contents of this file are subject to the Mozilla Public License 00008 * Version 1.0 (the "License"); you may not use this file except in 00009 * compliance with the License. You may obtain a copy of the License 00010 * at http://www.mozilla.org/MPL/ 00011 * 00012 * Software distributed under the License is distributed on an "AS IS" 00013 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00014 * the License for the specific language governing rights and 00015 * limitations under the License. 00016 * 00017 * The Original Code is legOS code, released October 17, 1999. 00018 * 00019 * The Initial Developer of the Original Code is Markus L. Noga. 00020 * Portions created by Markus L. Noga are Copyright (C) 1999 00021 * Markus L. Noga. All Rights Reserved. 00022 * 00023 * Contributor(s): Markus L. Noga <markus@noga.de> 00024 */ 00025 00026 #ifndef __sys_tm_h__ 00027 #define __sys_tm_h__ 00028 00029 #ifdef __cplusplus 00030 extern "C" { 00031 #endif 00032 00033 #include <config.h> 00034 00035 #ifdef CONF_TM 00036 00037 #include "../tm.h" 00038 00040 // 00041 // Definitions 00042 // 00044 00045 00046 #define SP_RETURN_OFFSET 10 00047 00048 #define IDLE_STACK_SIZE 128 00049 00050 00051 // 00052 // Variables 00053 // 00055 00056 extern tdata_t td_single; 00057 00058 extern tdata_t *ctid; 00059 00060 extern volatile unsigned int nb_tasks; 00061 00062 // nb_system_tasks is maintained in execi and kill/killall 00063 // T_KERNEL tasks are counted as they are started 00064 extern volatile unsigned int nb_system_tasks; 00065 00066 // tm_timeslice is from kernel/systime.c 00067 extern volatile unsigned char tm_timeslice; 00068 00069 00071 // 00072 // Functions 00073 // 00075 00077 /* called in single tasking mode before task setup. 00078 */ 00079 extern void tm_init(void); 00080 00081 00083 00085 extern void tm_start(void); 00086 00087 00089 00091 extern void tm_switcher(void); 00092 00093 00095 00100 extern size_t *tm_scheduler(size_t *old_sp); 00101 00102 00104 00106 extern int tm_idle_task(int,char**); 00107 00108 #endif // CONF_TM 00109 00110 #ifdef __cplusplus 00111 } 00112 #endif 00113 00114 #endif // __sys_tm_h__ 00115
brickOS is released under the
Mozilla Public License.
Original code copyright 1998-2002 by the authors. |