Developing Multitasking Applications with C++
The C++ programming language is increasingly finding use in the implementation of large embedded systems, which are typically designed around a multitasking Real-Time Operating System (RTOS). Since existing application-RTOS interfaces were designed to be used with C, they fail to take advantage of C++ language features that improve the readability and modularity of the code. This paper demonstrates the implementation of a C++ class library interface for a RTOS, and how it can aid program clarity. It also considers how the object-oriented programming (OOP) constructs supported by C++ can be used in designing a real-time multitasking system, and review the impact of factors such as real-time performance, determinism, and re-entrancy.
This paper does not cover object-oriented design, which is defined here as the process of determining what objects need to be implemented for the whole system. Changing from a structured design
method to an object-oriented method is poSSibly the biggest challenge in learning to make effective use of C++. It is often worth first undertaking a small pilot project to gain experience of object oriented design. Since the contents of this paper are intended as a practical aid to those considering development in C++ today, we have based the implementation examples of a C++-to-RTOS interface on the widely used pSOS+ real-time operating system. However, the techniques can easily be applied to many commercially available and proprietary RTOSs, given that they function in a similar manner to pSOS+.
ESC_1992_Vol2_Page149_Lethaby&Weinberg - Developing Multitasking Applications with C++.pdf