simplify pthread tsd key handling
3 files changed