semaphore *lock;
pthread_mutex_t *mutex;
void fd_unlock(int fd, int lock_type){	semaphore *lock;	if (!(fd_table[fd]->lockcount)) {		lock = &(fd_table[fd]->lock);		while (SEMAPHORE_TEST_AND_SET(lock)) {			pthread_yield();		}		fd_basic_unlock(fd, lock_type);		SEMAPHORE_RESET(lock);	}}