setlock
err = setlock(devfd, lock);
int setlock(int, int);
if (setlock(fd, 1)) {
if (setlock(fd, 0)) {
setlock(fd, 0);
if (setlock(fd, 1)) {
if (setlock(fd, 0)) {