2

I'm about to develop an FreeRTOS based embedded system that will run on a ESP32 chip. According to the API Reference I can create tasks and as well as pthreads.

Is there any rule of thumb that tells me if I should implement a functionality as a task or as thread? For example: If I'd like to handle three peripherals paralelly (just simple reading, so: short code, low performace, nearly any memory needed), I should create a new task or a new thread?

1
  • 'simple' and 'reading' are not often seen in the same sentence when discussing I/O in an RTOS environment. Interrupts, DMA and kenel signaling are usually required to perform I/O in any kind of efficient, RTOS-friendly manner:( Commented Jul 11, 2018 at 15:50

1 Answer 1

3

FreeRTOS have tasks. pthread is suggested as a wrapper to task for portability and compatability with POSIX systems and code.

Anyway, FreeRTOS do not have memory seperation, virtualization and remapping on context switch between tasks, so all it's tasks are what POSIX would call threads.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.