c++ threads

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Guys, whats the story with c++ thread support in GNU GCC?  Does it even support threads?  In the standard library std::thread does not exists.

EDITED: Threads are there in the gcc compiler folder, I guess I'm looking for a flag switch.

EDITED: passed through the #defines at the start of threads and came up with mutex errors. That's good.

This topic has a solution.
Last Edited: Thu. Feb 27, 2020 - 03:48 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry but I'm going to stop this now. There is NO point in repeatedly asking about the ARM compiler in the AVR forum. So I'll move this and any subsequent threads to the ARM forum where they belong.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry about that clawson. I thought this forum would be okay as it is a compiler issue.

Once again, sorry.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


guys, I tried to use the -pthread flag in the linker but it can't be found.  I'm using the arm-none-eabi 7.3.1 GCC Compiler... 

I've attached the pthread.h file that has the two calls that are failing.

 

 

 

Attachment(s): 

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

pthread is usually a library - where is the code to implement it? Since you wrote the rtos - you need to write the pthread interface.

Nothing to do with the compiler.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:

pthread is usually a library - where is the code to implement it? Since you wrote the rtos - you need to write the pthread interface.

Nothing to do with the compiler.

 

I guess the same applies to c++ threads?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Almost right. But in addition one has to implement the C++ standard compliant threading support for the particular OS and integrate it into the cross-compiler (libraries).