• Lv0
    粉丝0

积分6 / 贡献0

提问3答案被采纳0文章0

作者动态

VScode

zhangzihan 来自手机 显示全部楼层 发表于 2024-4-6 13:59:18
在内部编程的VS code IntelliSense案例程序中创建一个线程养将其加入活跃线程组中
osThreadId-to-sThreadNew(oSThreadFunc-t-func,Void*argument,constosTreadAttr-t*attr)
func线程要运行的函数
argument指针,指向传递给线程函数的参数

为什么不能在中断服务调用该函数
您尚未登录,无法参与评论,登录后可以:
参与开源共建问题交流
认同或收藏高质量问答
获取积分成为开源共建先驱

精彩评论1

dragon

沙发 发表于 2024-4-6 17:25:01

VScode

您的问题表述有点难以读懂。

是想问osThreadNew函数为什么不能在中断服务中调用么?

看了一下OH源码,好像并没有这个约束


/**
* @brief Creates an active thread.
*
* The task priority ranges from 9 (highest priority) to 38 (lowest priority). {@code LOSCFG_BASE_CORE_TSK_LIMIT} declared in target_config.h specifies the
maximum number of tasks running in this system.
* @param func Indicates the entry of the thread callback function.
* @param argument Indicates the pointer to the argument passed to the thread.
* @param attr Indicates the thread attributes.
* @return Returns the thread ID; returns NULL in the case of an error.
* @since 1.0
* @version 1.0
*/
osThreadId_t osThreadNew (osThreadFunc_t func, void *argument, const osThreadAttr_t *attr);

Copyright   ©2023  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

返回顶部