?? tsktest.c
字號(hào):
/*
* 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.
*
*/
/* "@(#) DSP/BIOS 4.60.22 12-07-01 (barracuda-j15)" */
/*
* ======== tsktest.c =======
* In this example, 3 tasks have been created with the Configuration
* Tool. Each task has a computation loop consisting of a LOG_printf()
* followed by a TSK_yield(). This causes a round robin scheduling for
* these tasks of equal priority.
*/
#include <std.h>
#include <log.h>
#include <tsk.h>
#include "tsktestcfg.h"
#define NLOOPS 5
Void task(Arg id_arg); /* Function for tasks created with Config Tool */
/*
* ======== main ========
*/
Void main()
{
}
/*
* ======== task ========
*/
TSK_Handle TSK2;
Void task(Arg id_arg)
{
Int id = ArgToInt (id_arg);
Int i;
// if(id==1)
// TSK2=TSK_self();
for (i = 0; i < NLOOPS ; i++) {
// if((i == 2) && (id == 0))
// {
// TSK_setpri(TSK2,3);
// }
LOG_printf(&trace, "Loop %d: Task %d Working", i, id);
TSK_yield();
}
LOG_printf(&trace, "Task %d DONE", id);
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -