__task Allows functions to exit without restoring registers. This keyword is typically used for the main function. By default, functions save the contents of used non-scratch registers (permanent registers) on the stack upon entry, and restore them at exit. Functions declared as __task do not save any registers, and therefore require less stack space. Such functions should only be called from assembler routines. The function main may be declared __task, unless it is explicitly called from the application. In real-time applications with more than one task, the root function of each task may be declared __task. The keyword is placed in front of the return type, for instance: __task void my_handler(void); The #pragma type_attribute directive can also be used. The following declaration of my_handler is equivalent with the previous one: #pragma type_attribute=__task void my_handler(void); The __task keyword must be specified both in the function declaration and when the function is defined.