add read/write lock c file'