📄 utl.c
字号:
/*
* Copyright 2001 by Texas Instruments Incorporated.
* All rights reserved. Property of Texas Instruments Incorporated.
* Restricted rights to use, duplicate or disclose this code are
* granted through contract.
* U.S. Patent Nos. 5,283,900 5,392,448
*/
/* "@(#) XDAS 2.12 05-21-01 (__imports)" */
/*
* ======== utl.c ========
*/
#include <std.h>
#include <utl.h>
#include <log.h>
static LOG_Obj *stdoutLog = NULL;
/*
* ======== UTL_bind ========
*/
Void UTL_bind(LOG_Obj *outLog)
{
stdoutLog = outLog;
}
/*
* ======== UTL_error ========
*/
Void UTL_error(String msg, Arg arg)
{
/* put message into system log and disable log (to preserve error) */
LOG_error(msg, arg);
LOG_disable(LOG_D_system);
/* loop forever so CPU state is preserved */
for (;;) {
UTL_break();
}
}
/*
* ======== UTL_load ========
*/
Void UTL_load(Void *client, UTL_Load *lp)
{
/* display confirmation of load change */
if (lp->prev != lp->load && stdoutLog != NULL) {
lp->prev = lp->load;
LOG_printf(stdoutLog,
"%r: new load = %d000 instructions per cycle", client, lp->load);
}
if (lp->load) {
UTL_loop(lp->load);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -