📄 ml_typw.h
字号:
#endif
#endif
#ifndef XMK_USE_RECEIVER_PID_IN_SIGNAL
#ifdef XMK_USE_PREEMPTIVE
#error "ERROR_in_ml_typ.h\IllegalCombinationOfDefines_03"
#endif
#ifdef XMK_USE_TIMESLICE
#error "ERROR_in_ml_typ.h\IllegalCombinationOfDefines_04"
#endif
#ifdef XMK_USED_DYNAMIC_CREATE
#error "ERROR_in_ml_typ.h\IllegalCombinationOfDefines_05"
#endif
#ifndef XMK_USED_ONLY_X_1
#error "ERROR_in_ml_typ.h\IllegalCombinationOfDefines_06"
#endif
#endif
/* in case of undef : SDL-Addressing not available */
/* in case of define : SDL-Addressing is available */
/*
** Note:XMK_USE_PID_ADDRESSING is used in generated C code !
*/
#if defined(XMK_USED_PARENT) || defined(XMK_USED_OFFSPRING)
#define XMK_USE_PID_ADDRESSING
#endif
#ifdef XMK_ADD_PRINTF
/*
** For each C-Module there is s separate printf
*/
#define XMK_ADD_PRINTF_KERNEL
#define XMK_ADD_PRINTF_LIBRARY
#define XMK_ADD_PRINTF_TESTER
#define XMK_ADD_PRINTF_SDL
#define XMK_ADD_PRINTF_ADDITIONAL
#define XMK_USE_MON
#endif
#ifdef XMK_ADD_PRINTF_KERNEL
#define XMK_ADD_PRINTF_CPU
#define XMK_ADD_PRINTF_MAIN
#define XMK_ADD_PRINTF_OUTPUT
#define XMK_ADD_PRINTF_QUEUE
#define XMK_ADD_PRINTF_SCHEDULER
#define XMK_ADD_PRINTF_TIMER
#define XMK_ADD_PRINTF_USER
#endif
#ifdef XMK_ADD_PRINTF_LIBRARY
#define XMK_ADD_PRINTF_COD
#define XMK_ADD_PRINTF_DL
#define XMK_ADD_PRINTF_COM
#define XMK_ADD_PRINTF_ERROR
#define XMK_ADD_PRINTF_MONITOR
#define XMK_ADD_PRINTF_MEMORY
#define XMK_ADD_PRINTF_PREDEFINED
#endif
#ifdef XMK_ADD_PRINTF_TESTER
#define XMK_ADD_PRINTF_RUL
#define XMK_ADD_PRINTF_OPT
#define XMK_ADD_PRINTF_RING
#define XMK_ADD_PRINTF_TSDL
#define XMK_ADD_PRINTF_TSYS
#define XMK_ADD_PRINTF_REC
#define XMK_ADD_PRINTF_PLAY
#endif
#endif /* ... ! defined(SDTMT) && !defined(SDTGATE) */
/*
** -----------------------------------------------------------------
** Overall control over allowed configurations
** -----------------------------------------------------------------
*/
#ifndef XMK_ADD_MICRO_TESTER
/*
** Per default, it is not allowed to use any part
** of the Cmicro Tester, without using the Cmicro Tester itself.
*/
#ifdef XMK_USE_DISTRIBUTED
#undef XMK_USE_DISTRIBUTED
#endif
#ifdef XMK_ADD_MICRO_RECORDER
#undef XMK_ADD_MICRO_RECORDER
#endif
#ifdef XMK_ADD_MICRO_COMMAND
#undef XMK_ADD_MICRO_COMMAND
#endif
#ifdef XMK_USE_DEBUGGING
#undef XMK_USE_DEBUGGING
#endif
#ifdef XMK_ADD_PROFILE
#undef XMK_ADD_PROFILE
#endif
#ifdef XMK_ADD_TRACE_BUF
#undef XMK_ADD_TRACE_BUF
#endif
#ifdef XMK_ADD_MICRO_TRACER
#undef XMK_ADD_MICRO_TRACER
#endif
#ifdef XMK_ADD_SDLE_TRACE
#undef XMK_ADD_SDLE_TRACE
#endif
#ifdef XMK_ADD_PSC_TRACE
#undef XMK_ADD_PSC_TRACE
#endif
#ifdef XMK_ADD_MICRO_RECORDER
#undef XMK_ADD_MICRO_RECORDER
#endif
#ifdef XMK_ADD_SIGNAL_FILTER
#undef XMK_ADD_SIGNAL_FILTER
#endif
#ifdef XMK_ADD_STDOUT_TRACE
#undef XMK_ADD_STDOUT_TRACE
#endif
#ifdef XMK_ADD_FILE_TRACE
#undef XMK_ADD_FILE_TRACE
#endif
#ifdef XMK_USE_COMMLINK
#undef XMK_USE_COMMLINK
#endif
#endif /* ... XMK_ADD_MICRO_TESTER */
/*
** -----------------------------------------------------------------
** Control of Cmicro Kernel configuration
** -----------------------------------------------------------------
*/
#if defined(XMK_USE_PREEMPTIVE) && defined(XMK_USE_NO_RECURSION)
/*
** Caution : The Cmicro Kernel uses recursion, if it
** is scaled preemptive !
*/
#error "ERROR_in_ml_typ.h\IllegalCombinationOfDefines_12"
#endif
#if defined(XSYSID)
/*
** If Partitioning is used
*/
#if defined(XMK_USE_PREEMPTIVE)
/*
** Caution : Preemption cannot be used together
** with Partitioning !
*/
#error "ERROR_in_ml_typ.h\PreemptionNotAllowedWithPartitioning"
#endif
/*
** Over-define macro
*/
#define XMAKENAME(P1,P2) XCAT(P1,P2)
/*
** main function in mk_main module cannot be used because
** users have to initialize the several systems by hand.
** For all partitions, first xmk_InitQueue, then xmk_InitSDL
** must be called. After each xmk_InitSDL is called, xmk_RunSDL
** might be called.
*/
#ifndef XNOMAIN
#define XNOMAIN
#endif
/*
** Rename global variables and tables from User C code
*/
#ifndef XMK_NO_REENTRANCY_PROBLEM
/*
GBU 990729 Modified since we don't want ErrorHandler when XMK_USE_NO_ERR_CHECK is defined.
*/
/*
// GBU 990409 ErrorHandler already exists in OSE.
// #define ErrorHandler XMAKENAME(XSYSID,ErrorHandler)
#define ErrorHandler XMAKENAME(XSYSID,cmicroErrorHandler)
*/
#ifndef XMK_USE_NO_ERR_CHECK
#define ErrorHandler XMAKENAME(XSYSID,cmicroErrorHandler)
#else
#define ErrorHandler(errnum)
#endif
#define xmk_InitSystime XMAKENAME(XSYSID,InitializeSystemTime)
#define xmk_SetTime XMAKENAME(XSYSID,SetSystemTime)
#define xmk_NOW XMAKENAME(XSYSID,GetSystemTime)
#define xAlloc XMAKENAME(XSYSID,OSalloc)
#define xFree XMAKENAME(XSYSID,OSfree)
#define xAlloc_SDL_Bit_String XMAKENAME(XSYSID,AllocSDLBitstring)
#define xFree_SDL_Bit_String XMAKENAME(XSYSID,FreeSDLBitstring)
#define xAlloc_SDL_Charstring XMAKENAME(XSYSID,AllocSDLCharstring)
#define xFree_SDL_Charstring XMAKENAME(XSYSID,FreeSDLCharstring)
#endif /* XMK_NO_REENTRANCY_PROBLEM */
/*
** Rename global variables and tables from generated C code
*/
#define yInit XMAKENAME(XSYSID,yInit)
#define xPDTBL XMAKENAME(XSYSID,RootPrsTableVar)
/*
** Rename environment functions
*/
#define xInitEnv XMAKENAME(XSYSID,xInitEnv)
#define xInEnv XMAKENAME(XSYSID,xInEnv)
#define xOutEnv XMAKENAME(XSYSID,xOutEnv)
#define xCloseEnv XMAKENAME(XSYSID,xCloseEnv)
/*
** Rename global variables and tables from Cmicro Kernel
*/
#define xRunPID XMAKENAME(XSYSID,RunPIDVar)
#define pRunData XMAKENAME(XSYSID,RunDataPtr)
#define pRunPIDTable XMAKENAME(XSYSID,RunPIDTablePtr)
#define xmk_EmptySignalVar XMAKENAME(XSYSID,EmptySignalVar)
#define xmk_SymbolNrVar XMAKENAME(XSYSID,SymbolNrVar)
#define xmk_SignalInstPtr XMAKENAME(XSYSID,SignalInstPtr)
#define xmk_SignalArrayVar XMAKENAME(XSYSID,SignalArrayVar)
#define xmk_FreeListPointer XMAKENAME(XSYSID,FreeListPtr)
#define xmk_Queue XMAKENAME(XSYSID,QueueVar)
#define xmk_CurrentSignal XMAKENAME(XSYSID,CurrentSignalPtr)
#define xmk_InterruptsDisabled XMAKENAME(XSYSID,InterruptsDisabled)
#define xmk_InitState XMAKENAME(XSYSID,QueueInitState)
#define xmk_TimerArrayVar XMAKENAME(XSYSID,TimerArray)
#define xmk_PassiveTimerPtr XMAKENAME(XSYSID,PassiveTimerPtr)
#define xmk_ActiveTimerPtr XMAKENAME(XSYSID,ActiveTimerPtr)
/*
** Rename global variables and tables from C Library
** Users must take care upon implementation
** and especially the problem of reentrancy for these functions.
*/
#define xSDLOpError XMAKENAME(XSYSID,xSDLOpError)
#ifndef XMK_NO_REENTRANCY_PROBLEM
#define fprintf XMAKENAME(XSYSID,fprintf)
#define printf XMAKENAME(XSYSID,printf)
#endif /* ... XMK_NO_REENTRANCY_PROBLEM */
#else
#define XMAKENAME(P1,P2) P2
/*
GBU 990729 Added since we don't want ErrorHandler when XMK_USE_NO_ERR_CHECK is defined.
*/
#ifdef XMK_USE_NO_ERR_CHECK
#define ErrorHandler(errnum)
#endif
#endif /* ... defined(XSYSID) && defined(XMK_USE_PREEMPTIVE) */
/*
** -----------------------------------------------------------------
** Control of internal functions
** -----------------------------------------------------------------
*/
#ifdef XMK_USE_SDL_MEM
#define XMK_USE_memshrink
#define XMK_USE_memset
#define XMK_USE_memcpy
#endif
/****+***************************************************************
03 C Library
********************************************************************/
/* General */
#ifdef XNOPROTO
#define PROTO(x) ()
#define XMK_B
#define XMK_E
#define XCAT(P1,P2) P1/**/P2
#define XPP_PROTO(P)
#define XPP_NOPROTO(P) P
#else
#define PROTO(x) x
#define XMK_B {
#define XMK_E }
#define XCAT(P1,P2) P1##P2
#define XPP_PROTO(P) P
#define XPP_NOPROTO(P)
#endif
#ifndef XMK_VOID
#define XMK_VOID (void)
#endif
/*
** Define XCONST as const, if the compiler in use supports "const"
** This is only the default setting for XCONST ...
*/
#define XCONST const
/* Define X_REGISTER register, if the compiler in use has good support
** for register ...
*/
#define X_REGISTER
/*
** Define X_STATIC as static, if the compiler / target in use
** has more static RAM than stack memory ...
*/
#define X_STATIC
/*
** Define XMK_END_CRITICAL_PATH and XMK_BEGIN_CRITICAL_PATH per default empty ...
** These macros are used to lock critical pathes in
** the Cmicro Kernel not only for preemption.
** The definition of these ias absolutely
** necessary if interrupts are used ...
*/
#define XMK_END_CRITICAL_PATH
#define XMK_BEGIN_CRITICAL_PATH
/*
** The intention of the following define
** is to suppress warnings of the compiler
** like "<ident> never used", which come
** in a few sections, where the user is free
** to use such variables or not
*/
#define XMK_SUPPRESS(variable)
#ifndef xmk_T_ERR_NUM
/*
** Error numbering, may also be char, if numbering is within the
** range of 1 .... 250
*/
#define xmk_T_ERR_NUM int
#endif
#ifndef xmk_OPT_INT
/*
** Loop counters, result values and some other variables within the
** Cmicro Kernel can be defined as char, or as int. It depends just on
** the machine in use, what should be defined behind this macro.
** For instance, a 8051
** produces a lot of overhead for int, long and pointer variables.
** On the other hand, some machines, like 68xxx produce more code, if
** they should handle char, instead of int. Define xmk_OPT_INT as what
** you want to in your compiler section or on the compiler command line
** or whatever.
*/
#define xmk_OPT_INT int
#endif
/*
** For Controllers in Harvard architecture (e.g. Intel 8051) several
** variables can be stored in internal or external RAM/ROM.
** For controllers in 'von Neumann' architecture the following macros
** have to be defines as follows:
*/
#define xmk_ROM_ptr *
#define xmk_RAM_ptr *
#ifndef XMK_KERNEL_EXIT
#define XMK_KERNEL_EXIT(x)
#endif
/*
** default for path and filename separation, for Unix versions
*/
#define XMK_PATH_SEPARATION_CHAR '/' /* path/filename for unix */
/*
** Size of one char value in octet
*/
#define XMK_SIZEOF_CHAR 1
#ifdef XMK_UNIX
#undef XMK_UNIX
#endif
/****+***************************************************************
03a C Compilersection begins
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -