timer: Fix integer length issue on gcc2
main: Remove warning and make a comment
types: Fix types and use proper UVAL32 / VAL32 wrappers
spinlocks: Rewrite spinlocks to be more portable