add: int init_cell_lock( struct cell *cell ) { cell->reply_mutex.semaphore_set=reply_semaphore; cell->reply_mutex.semaphore_index = cell->hash_index % sem_nr; cell->ack_mutex.semaphore_set=ack_semaphore; cell->ack_mutex.semaphore_index = cell->hash_index % sem_nr; }  int init_entry_lock( struct s_table* hash_table, struct entry *entry ) {  entry->mutex.semaphore_set=entry_semaphore; entry->mutex.semaphore_index = ( ((void *)entry - (void *)(hash_table->entrys ) ) / sizeof(struct entry) ) % sem_nr;  }  int init_timerlist_lock( struct s_table* hash_table, enum lists timerlist_id) {    hash_table->timers[timerlist_id].mutex=timer_group_lock[ timer_group[timerlist_id] ]; }  int release_cell_lock( struct cell *cell ) {  }  int release_entry_lock( struct entry *entry ) {  }  release_timerlist_lock( struct timer *timerlist ) {  }
context: static int change_semaphore( ser_lock_t s  , int val ){	struct sembuf pbuf;	int r;	pbuf.sem_num = s.semaphore_index ;	pbuf.sem_op =val;	pbuf.sem_flg = 0;tryagain:	r=semop( s.semaphore_set, &pbuf ,  1 /* just 1 op */ );	if (r==-1) {		if (errno==EINTR) {			DBG("signal received in a semaphore\n");			goto tryagain;		} else LOG(L_CRIT, "ERROR: change_semaphore: %s\n", strerror(errno));	}	return r;}