if ((ret = fd_lock(fd, FD_RDWR)) == OK) {
if ((ret = fd_lock(fd, FD_RDWR, NULL)) == OK) {
int dup(int fd){	int ret;	if ((ret = fd_lock(fd, FD_RDWR)) == OK) {		ret = fd_allocate();		fd_basic_dup(fd, ret);		fd_unlock(fd, FD_RDWR);	}	return(ret);}