eCosTM Reference Manual
Prev | Chapter 3. Requirements for programs | Next

# Assertions and bad parameter handling

This section describes how the eCos kernel and basic packages behave when system calls are invoked with bad parameters.

In eCos, the basic kernel assertion behavior is configuration-dependent, and you should consult Chapter 16 for more details.

By default, assertions are turned off in the kernel. If the kernel is configured to turn them on, the kernel will make basic assertions, such as checking for invalid parameters when system calls are invoked. If an assertion fails, the kernel will print a message to the diagnostic output channel and stop executing (see the section called Component: Asserts & Tracing in Chapter 16).

If the kernel is configured with assertions disabled (usually when the application has been thoroughly debugged), it will not do any checking.

The configuration sections referenced above also describe the use of preconditions, postconditions and loop invariants. These are no different from ordinary assertions, but they are used in specialized circumstances, and the programmer would wish to select their presence individually.

Prev | Home | Next
Memory allocation | Up | System start-up