The CrossWorks C library ships as standard with callouts to functions that provide thread-safety in a multithreaded application. If your application has a single thread of execution, the default implementation of these functions does nothing and your application will run without modification.

If your application is intended for a multithreaded environment and you wish to use the CrossWorks C library, you must implement the following locking functions:

If you create a CTL project using the New Project wizard, CrossWorks provides implementations of these using CTL event sets. You're free to reimplement them as you see fit.

If you use a third-party RTOS with the CrossWorks C library, you will need to use whatever your RTOS provides for mutual exclusion, typically a semaphore, a mutex, or an event set.