replaced raw glib's locks with MLPL's read write lock to remove ifdef lines.