thread_info: Use unsigned long for flags