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 00051 typedef struct { 00052 void *text; 00053 void *data; 00054 void *bss; 00055 void *data_orig; 00056 00057 size_t text_size; 00058 size_t data_size; 00059 size_t bss_size; 00060 size_t stack_size; 00061 size_t start; 00062 priority_t prio; 00063 00064 size_t downloaded; 00065 } program_t; 00066 00070 typedef enum { 00071 CMDacknowledge, 00072 CMDdelete, 00073 CMDcreate, 00074 // s[bsssize] s[stacksize] 00075 // s[start] b[prio] 00076 CMDoffsets, 00077 CMDdata, 00078 CMDrun, 00079 CMDirmode, 00080 CMDsethost, 00081 CMDlast 00082 } packet_cmd_t; 00083 00084 #endif /* DOXYGEN_SHOULD_SKIP_INTERNALS */ 00085 00087 // 00088 // Variables 00089 // 00091 00092 extern volatile unsigned cprog; 00093 00095 // 00096 // Functions 00097 // 00099 00101 extern void program_stop(int flag); 00102 00104 00105 extern int program_valid(unsigned nr); 00106 00108 extern void program_init(); 00109 00111 extern void program_shutdown(); 00112 00113 #endif // CONF_PROGRAM 00114 00115 #ifdef __cplusplus 00116 } 00117 #endif 00118 00119 #endif // __program_h__
brickOS is released under the
Mozilla Public License.
Original code copyright 1998-2002 by the authors. |