int ret;  if ((ret = fd_lock(fd, FD_WRITE)) == OK) { ret = fd_table[fd]->ops->write(fd_table[fd]->fd, fd_table[fd]->flags, buf, nbytes); fd_unlock(fd, FD_WRITE); } return(ret);
return(write_timedwait(fd,  buf, nbytes, NULL));
ssize_t write(int fd, const void *buf, size_t nbytes){	int ret;	 if ((ret = fd_lock(fd, FD_WRITE)) == OK) {     	ret = fd_table[fd]->ops->write(fd_table[fd]->fd,		  fd_table[fd]->flags, buf, nbytes);         fd_unlock(fd, FD_WRITE);    }    return(ret);}