add pthread rwlock hook