8 years, 10 months ago.

New to mbed: question regarding threading

I'm new to this website, and I'm scouting around for our project. I need to use threads in our project, and I saw this: https://developer.mbed.org/users/mbed_official/code/mbed-rtos/

which has a bunch of classes for threads. Do I need to use this or can I stick with the regular C-posix thread api/C++ threads api? (I saw the post title "do not reinvent the wheel", and I'm just wondering if there's any advantage of using this API over the regular C-posix thread api/C++ threads api Thanks!

Question relating to:

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

2 Answers

8 years, 10 months ago.

I don't think this is supported by the normal arm compilers, so that's an easy choice not to use it ;).

8 years, 10 months ago.

Embedded C/C++ programming isn't quite the same as conventional C/C++ programming. In conventional C/C++, your program will be running on top of an operating system of some sort (i.e. Windows, Unix, etc). Therefore, the conventional threading APIs will be interacting with the underlying OS to create native threads behind the scenes. In embedded programming, your programs are usually running directly on the hardware without an operating system. As a result, there is no concept of "threading". Your program basically has two contexts: program context, and interrupt handler context. This is fine for most cases, but if you need true multi-threading, you'll need a lightweight operating system of some sort. That's what the mbed-rtos library provides.

C/C++ programming is very much useful to learn another advanced programming language but to learn properly any language you should do the practical practice of it but the software turbo c except win xp was not supported properly in another operating system of Microsoft but in <a href="http://howtogethelpinwindows10.co/"> windows 10 get help</a> you can use turbo c properly with all features available.

posted by windos 10 get help 10 Mar 2018