Design
Express Logic and IAR Launch Thread-Safe Library Support Joint effort boosts application reliability
Express Logic has announced thread-safe library support for the IAR Embedded Workbench for ARM (EWARM). Thread-safe support protects applications by ensuring that only one thread has access to a function and its data at a time. Developers using Express Logic’s popular ThreadX® RTOS and IAR Embedded Workbench for ARM can use IAR’s DLIB C/C++ library functions in application threads without risk of interference from other threads’ use of the same functions.
In a“Many of our customers desire the advanced RTOS services of ThreadX, but also must make use of DLIB functions in the same application threads,” said Lotta Frimanson, Product Manager at IAR Systems. “Now, Express Logic’s support for thread-safe library operation enables DLIB to be used in a multithreaded environment without risk of error from simultaneous multithreaded access.”
To prevent such errors, DLIB locks such vulnerable functions with a mutex, preventing more than one thread from using the function. Once that thread completes its use of the function, it returns the mutex, allowing another thread to gain access to the function. To implement this protection, each such function “gets” a mutex at the beginning of a function call and “puts” it back at the end. The mutex is a service provided by ThreadX, and is automatically used by the DLIB function as a result of this joint development by Express Logic and IAR.
“Achieving this joint solution extends the long-standing relationship Express Logic and IAR share in supporting customers with technology that contributes secure, robust solutions,” noted William E. Lamie, founder and CEO of Express Logic. “Now joint customers can safely use DLIB functions in a multithreaded environment, protected by ThreadX mutex objects that make certain that only one thread at a time has access to critical sections within these routines.”