r/programming • • Oct 19 '09

djb

http://www.aaronsw.com/weblog/djb
97 Upvotes

129 comments sorted by

View all comments

Show parent comment

3

u/dwdwdw2 Oct 20 '09 edited Oct 20 '09

Thanks for the clarification. Incidentally, how is errno supposed to work on architectures with no TLS?

2

u/geocar Oct 20 '09

The easy way is to implement __errno_location() so that it initially returns &errno but when a thread is created, have it return the address in the thread state pointer.