Code cleanup. Added TLS support.
Code clean-up. Added TLS support.
Code clean-up. Bunch of macros are transformed into inline functions.
FIX: sched_insert_i() and sched_remove_i() will now look up for thread sys context. Better sys context handling.