Using pthreads w/o OS?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using pthreads w/o OS?

Jump to solution
1,949 Views
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.

Labels (1)
0 Kudos
1 Solution
1,646 Views
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.

View solution in original post

2 Replies
1,647 Views
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.

1,646 Views
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 Kudos