union fd_data realfd; int ret, flags;
struct fd_table_entry * entry; pthread_mutex_t *mutex; union fd_data realfd; int ret, flags;
int close(int fd){	union fd_data realfd;	int ret, flags;	if ((ret = fd_lock(fd, FD_RDWR)) == OK) {		flags = fd_table[fd]->flags;		realfd = fd_table[fd]->fd;		if (fd_free(fd) == OK) {     		ret = fd_table[fd]->ops->close(realfd, flags);		}		fd_unlock(fd, FD_RDWR);	}	return(ret);}