[PATCH 06/25] thread: move thread bits accessors to separated file