Add a mutex to make Pread, Pwrite and Writev thread safe in GLIB