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 __program_h__ 00027 #define __program_h__ 00028 00029 #ifdef __cplusplus 00030 extern "C" { 00031 #endif 00032 00033 #include <config.h> 00034 00035 #ifdef CONF_PROGRAM 00036 00037 #include <tm.h> 00038 00040 // 00041 // Definitions 00042 // 00044 00045 #define PROG_MAX 8 00046 00047 #ifndef DOXYGEN_SHOULD_SKIP_INTERNALS 00048 00052 typedef struct { 00053 void *text; 00054 void *data; 00055 void *bss; 00056 void *data_orig; 00057 00058 size_t text_size; 00059 size_t data_size; 00060 size_t bss_size; 00061 size_t stack_size; 00062 size_t start; 00063 priority_t prio; 00064 00065 size_t downloaded; 00066 } program_t; 00067 00071 typedef enum { 00072 CMDacknowledge, 00073 CMDdelete, 00074 CMDcreate, 00075 // s[bsssize] s[stacksize] 00076 // s[start] b[prio] 00077 CMDoffsets, 00078 CMDdata, 00079 CMDrun, 00080 CMDirmode, 00081 CMDsethost, 00082 CMDlast 00083 } packet_cmd_t; 00084 00085 #endif /* DOXYGEN_SHOULD_SKIP_INTERNALS */ 00086 00088 // 00089 // Variables 00090 // 00092 00093 extern volatile unsigned cprog; 00094 00096 // 00097 // Functions 00098 // 00100 00102 extern void program_stop(int flag); 00103 00105 00106 extern int program_valid(unsigned nr); 00107 00109 extern void program_init(); 00110 00112 extern void program_shutdown(); 00113 00114 #endif // CONF_PROGRAM 00115 00116 #ifdef __cplusplus 00117 } 00118 #endif 00119 00120 #endif // __program_h__
brickOS is released under the
Mozilla Public License.
Original code copyright 1998-2002 by the authors. |