> I'm basically porting all the mysql-client headers which i > thought would be pretty straight forward but it's taking a > little more thought than i anticipated. Can I ask why? And the part of code you are asking is from pthread headers not from mysql.