梅科尔工作室OpenHarmony设备开发培训笔记-第二章学习笔记
任务管理:实例讲解(代码版):include<stdio.h>include<string.h>include<unistd.h>include"ohosinit.h"include"cmsisos2.h"osThreadIdtthread1ID;定义任务IDosThreadIdtthread2ID;定义任务ID任务一voidthread1(void){printf("enterthread1\r\n");osDelay(1);导致thread1阻塞,thread2运行printf("thread1delaydone\r\n");thread1阻塞超时,thread1开始运行,thread2就绪osThreadSuspend(thread1ID);挂起thread1printf("threa...