学前班
最后登录1970-1-1
在线时间 小时
注册时间2018-3-23
|
楼主 |
发表于 2018-3-29 19:56:22
|
显示全部楼层
多谢回复。我这边也做了实验:起初是跑Task1,然后调用suspend让任务挂起状态,就会跑Task2。
U-Boot 1.1.6-g54d5e59d-dirty (Mar 29 2018 - 04:44:19) for SMDK6410
CPU: S3C6410@532MHz
Fclk = 532MHz, Hclk = 133MHz, Pclk = 66MHz, Serial = CLKUART (SYNC Mode)
Board: SMDK6410
DRAM: 256 MB
Flash: 0 kB
NAND: 1024 MB
MMC: => rca=0x0000cd9a
1887 MB
*** Warning - bad CRC or MoviNAND, using default environment
In: serial
Out: serial
Err: serial
Enter UCos loop(Mar 29 2018 04:44:19).
ucosii_main 96
ucosii_main 99, stack = 0xc7e4dff8
OSStart
Creating Application Events...
Creating Application Tasks...
AppTask1 open led // AppTask1 开始开关LEDS
AppTask1 close led
AppTask1 open led
AppTask1 close led
AppTask1 open led
AppTask1 enter suspend! // 进入休眠
OS_Sched 1637 // 切换到下一个就绪的任务
OS_Sched 1639
OS_Sched 1641
OS_Sched 1643
OS_Sched 1645
OS_Sched 1647
OS_Sched 1652
OS_Sched 1654
AppTask2 // 启动任务2
AppTask2 close led
AppTask2 open led
AppTask2 close led
AppTask2 open led
AppTask2 close led
--------------------------------------------------------------
另外我想请教下,如果想要几个任务在同时跑的效果,是不是需要一个Timer来定时切换(硬件中断)呢?
|
|