Using pthreads w/o OS?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Using pthreads w/o OS?

跳至解决方案
3,296 次查看
roymessinger
Contributor V

I have a working bare metal project on K64 and need to update it with some extra features.

As it seems, I will need to use threads in my application, and since I'm new with this concept I wanted to ask, can I use posix threads or any other thread library for that matter without migrating my code to OS code? 

It is currently runing at various customer sites with remote update amd boot loader features and I'm afraid doing large changes in the code which will take alot of time to debug.

Thanks.

标签 (1)
标记 (3)
0 项奖励
回复
1 解答
2,993 次查看
bobpaddock
Senior Contributor III

Prototreads will run on bare metal C.
Works best with GCC due to its calculated GOTO, which is all hidden from you.

Protothreads - Lightweight, Stackless Threads in C 

You will have to change 'something' no matter what path you take.

在原帖中查看解决方案

2 回复数
2,994 次查看
bobpaddock
Senior Contributor III

Prototreads will run on bare metal C.
Works best with GCC due to its calculated GOTO, which is all hidden from you.

Protothreads - Lightweight, Stackless Threads in C 

You will have to change 'something' no matter what path you take.

2,993 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi roymessinger,

It seems pthread can't run in bare metal mode. It must base on a unix-like OS, such as FreeBSD, Linux. That is to say, you can't use posix threads or any other thread library for that matter without migrating you code to OS code.

Regards,

Jing

0 项奖励
回复