pthread_test read/write offset fix