Can rtems keep track of nested calls to disable/enable preemption? E.g. within a task: lock lock lock unlock unlock unlock Where preemption is disabled on the first lock and not re-enabled until the last unlock is called? And lock and unlock could be accomplished by a call to rtems_task_mode. But is there anything in rtems to ensure a balance? -gene