Ignore:
Timestamp:
Aug 30, 2018, 10:26:27 PM (6 years ago)
Author:
viala@…
Message:

Rewrite if-then-else return function into switch case.

For safety reason and performance:

1) Safety: GCC complain with a warning if you forgot an enum variant.
2) code-gen just outperform naive if-then-else.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/thread.h

    r503 r527  
    205205 * returns pointer on string.
    206206 **************************************************************************************/
    207 char * thread_type_str( uint32_t type );
     207const char * thread_type_str( thread_type_t type );
    208208
    209209/***************************************************************************************
Note: See TracChangeset for help on using the changeset viewer.