make lock and unlock as system calls

missed it in the earlier