c/thread/thrd errors

Identifiers for thread states and errors.