Developing Multitasking Applications with C++ -

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

1 thought on “Developing Multitasking Applications with C++

  1. “The situation is not any different now – 24 years after the paper was published. Almost all embedded RTOSes have C-only API. Support for C++ in these RTOSes usually ranges from “problematic” to “explicitly disabled”, so doing your C++ project with a m

    Log in to Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.