⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 api_lldebug.h

📁 一个简单的小型操作系统
💻 H
字号:


/*****************************************************************************
 *
 * Module      : lldebug.h
 * Descripion  : Low Level Debug
 * OS          : SLOS 0.09
 * Platform    : generic
 * History     :
 *
 * 15th July 2002 Andrew N. Sloss
 * - added header		
 *
 *****************************************************************************/

/*****************************************************************************
 * IMPORT
 *****************************************************************************/

#ifndef LLDEBUG
#define LLDEBUG 1

#include "../e7t/events/swis.h"

/*****************************************************************************
 * MACRO
 *****************************************************************************/

/* -- bringUpTrace ------------------------------------------------------------
 *
 * Description : records ENTRY and EXIT into a routine
 *
 * Parameters  : UINT - ENTRY or EXIT
 *             : UINT - value 
 * Return      : none...
 * Notes       :
 *
 *  Example:
 *
 *       bringUpTrace(ENTRY,InitRoutine);
 *       initRoutine();
 *       bringUpTrace(EXIT,InitRoutine); 
 */

void bringUpTrace(UINT a, UID b);

/* -- bringUpFatalError -------------------------------------------------------
 *
 * Description : very low level fatal error
 *
 * Parameters  : none...
 * Return      : none...
 * Notes       : when this SWI is called SLOS goes into an infinite 
 *               loop. It is designed for basic fatal loops. For PANIC
 *               problems.
 * 
 */

void bringUpFatalError(UINT a);

/* -- lltrace -----------------------------------------------------------------
 *
 * Description : low level trace 
 *
 * Parameters  : r - routine u - uid
 * Return      : none
 * Notes       : Example of trace:
 *
 *   lltrace(print("hello"),DEVICEDRIVER);
 *
 * or alternatively using the primitives
 *
 *   lltracebefore(BEFORERETURN);
 *   a = anumber ();
 *   lltraceafter(AFTERRETURN);
 */

#define ENTRY	123
#define EXIT	321

#define lltracebefore(u) bringUpTrace(ENTRY,(u))
#define lltraceafter(u)  bringUpTrace(EXIT,(u))

#define lltrace(r,u) lltracebefore((u)); \
                     (r);                \
                     lltraceafter((u))

/* -- fatalerror --------------------------------------------------------------
 *
 * Description : set a fatal error - only occurs under a PANIC situration
 *
 * Parameters  : UINT
 * Return      : never returns
 * Notes       :
 *
 * Example: llfatalerror(PANIC);
 *
 */

#define llfatalerror(e) bringUpFatalError((e))

#endif 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -