Hello,
section 3.3.6 Terminating Tasks in Freescale MQX RTOS User's Guide gives some information. User is responsible for destroying lightweight components. This can be tricky as it comes into I/O drivers, as many of them use lightweight components such as lightweight events or lightweight semaphores for their own operation.
3.3.6 Terminating Tasks
A task can terminate itself or any other task, whose task ID it knows. When a task is terminated, its children are not terminated. When a task is terminated, MQX frees the
task's MQX-managed resources. These resources include:
• dynamically allocated memory blocks and partition blocks
• message queues
• messages
• mutexes
• non-strict semaphores
• strict semaphores after posting them
• queued connections are dequeued
• task descriptor
Note The user is responsible for destroying all lightweight objects (lightweight semaphores, lightweight events,
lightweight timers, etc.) before terminating a task as this is not done by the MQX task termination functions!