C pthread sample