wrapper of writer prefer lock in linux.