Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

microC/OS-II and 'thread safe c library' option

Altera_Forum
Honored Contributor II
1,257 Views

Marking the 'thread safe c library' in ´RTOS Options´ when using microC/OS-II affects the performance.  

 

How does marking ´thread safe c library´ affect my system? 

Is there a reason for using it if DO NOT care about portability and OS independability? (as mentioned in the NiosII sw manual) 

 

/S
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
545 Views

This is the answer I got from Altera: 

Since "thread safe c library" will handle the synchronization of multi tasks to protect the shared resource, the performance will be lower than non thread safe c library. 

If you do not need any operation to protect the shared resource or there isn't any shared resource existed in your application, you do not need to choose thread safe c library option. 

 

My next question is: 

But if I use the mutexes or semaphores provided by microC/OS-II for protecting shared resources, then why should I use ´thread safe C library´? 

 

Anyone got a comment? 

/S
0 Kudos
Reply