marked usage of signed ints for lengths, counts, and other questionable acts in nsthread.h