/******************************************************************************* * ---------------------------------------- * Copyright TEVERO AS, Norway, 2000-2007 * www.tevero.no * ---------------------------------------- * This source code is the property of Tevero AS, Norway. The source/compiled * code may not be used or modified without a written consent from Tevero AS. * The consent shall specify under which conditions the code may be used. * * This copyright notice may not be removed from the source code nor changed. * * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Tevero AS has no obligation to * support this Software. Tevero AS is providing the Software "AS IS", with no * express or implied warranties of any kind, including, but not limited to, any * implied warranties of merchantability or fitness for any particular purpose * or warranties against infringement of any proprietary rights of a third party. * Tevero AS will not be liable for any consequential, incidental, or special * damages, or any other relief, or for any claim by any third party, arising * from your use of this Software. * *******************************************************************************/ /******************************************************************************* ******************************************************************************** ******************************************************************************** * * File: rdcconf.h * Version: 1.2.2 * Descr.: RAM Disk Controller Configuration include file used in order to * customize RDC target/user specific definitions. This file is * typically modified per target in order to make RDC work in the * desired environment. * * Author: Tevero AS * Date: 2002-02-05 * ******************************************************************************** ******************************************************************************** *******************************************************************************/ #ifndef RDCCONF_H #define RDCCONF_H /******************************************************************************* TARGET INCLUDE FILES AND EXTERNALS ******************************************************************************* Add include files and external functions here if it is needed due to customized defines in this file or for possible other reasons. These include files will be included in all RDC source code when compiling. *******************************************************************************/ void falRdcFatal(int id); /******************************************************************************* DEBUGGING ******************************************************************************/ /******************************************************************************* ---------------- RDC_DEBUG_LEVEL: ---------------- Define whether to include code for more extensive debugging for development purposes. Set this to 0 for normal usage, in order to avoid inclusion of debug code. Inclusion of debug code may affect the code size and performance, since it adds printout and internal SW checks that should be avoided for normal usage. (The amount of internal checks may change with new releases.) 0 - Do not include debug 1 - Basic debugging included, monitoring for internal programming faults 2 - Includes level 1 and some major progress printout 3 - Includes level 2 and detailed progress printout Notice that RDC_DIAG must be enabled if RDC_DEBUG_LEVEL is enabled. All debug printouts are done via rdcPrintf(), which must be defined below under the C glue functions. ******************************************************************************/ #define RDC_DEBUG_LEVEL 0 /* [0, 1, 2, 3] */ /******************************************************************************* --------- RDC_DIAG: --------- Define whether to include code to enable runtime control of RDC diagnostics. If set to 1, then diagnostics can be enabled/disabled runtime by the application. If set to 0, diagnostics code is not included, reducing the total codesize somewhat. Inclusion of diagnostics code hardly affects performance if not enabled runtime, since mainly only error situations are reported. 0 - Don't include diagnostics code (thus diagnostics can not be enabled) 1 - Include diagnostics code Notice that RDC_DIAG must be enabled if RDC_DEBUG_LEVEL is enabled. All diagnostics printouts are done via rdcPrintf(), which must be defined below under the C glue functions. *******************************************************************************/ #define RDC_DIAG 1 /* [0, 1] */ /******************************************************************************* FATAL HANDLING ******************************************************************************* In some cases, RDC can detect inconsistencies in internal memory structures. In theory, this is only possible by for instance memory corruption (by external sources). Under such circumstances, it may be wise to restart the system or possibly close and reopen the partition. Write operations on an inconsistent RDC partition could corrupt the partition. The RDC_FATAL(id) macro should either be defined to nothing (in this case RDC will continue execution with error codes to the user) or it should be defined to a function with the following prototype: void rdcFatal(int id) where id is the partition ID of the partition being used. In this case, the prototype should also be defined above along with the include files. *******************************************************************************/ #define RDC_FATAL(id) falRdcFatal(id) /******************************************************************************* C GLUE FUNCTIONS ******************************************************************************* In some rare cases, some of the standard C functions may be overrided for the RDC SW only. The defines below can be used to achieve this. If such overriding for RDC is not needed, then leave the below defines unchanged. The below functions are defined to C library functions, appropriate standard C include files may need to be added to the top of this file. This depends on the environment. All the below glue functions MUST be reentrant if running in a preemptive environment! *******************************************************************************/ /* Prototype: void free(void *memblock); */ #define rdcFree shrdFree /* Prototype: void *malloc(size_t size); */ /* Requirement: Allocated memory must start at a 32 bit aligned address */ #define rdcMalloc shrdMalloc /* Prototype: int printf(const char *format [, argument]...); */ #define rdcPrintf(x) shrdPrintf(x) #endif /* RDCCONF_H */