core: fixed more doc in thread.h and flags.h