You can enable interrupts using the ctl_enable_interrupts function call.

    int
    ctl_enable_interrupts(void);

You can disable interrupts using the ctl_disable_interrupts function call.

    int
    ctl_disable_interrupts(void);

These functions return the enabled state of interrupts before the operation which you can pass to ctl_set_interrupts to restore the previous interrupt enabled state.

    void
    ctl_set_interrupts(int e);

Note that you can call a function that causes a task switch with interrupts disabled. The CrossWorks tasking library will ensure that when a task is scheduled that interrupts are enabled.

You can remove a task from the waiting task list using the ctl_task_remove function call.

    void
    ctl_task_remove(CTL_TASK_t *);;

Note that once you have removed a task the only way to re-introduce it to the system is to call ctl_task_run.

You can change the priority of a task using the TaskSetPriority function call.

    void
    ctl_task_set_priority(CTL_TASK_t *,
                          unsigned char priority);

If you want to change the priority of the currently executing task then pass ctl_task_executing as the task parameter.