rem: DBG("DEBUG: lock_initialize:  failure to initialize a semaphore\n");
add: DBG("DEBUG: init_semaphore_set:  failure to initialize a semaphore\n");
context: int init_semaphore_set( int size ){	int new_semaphore, i;	new_semaphore=semget ( IPC_PRIVATE, size, IPC_CREAT | IPC_PERMISSIONS );	if (new_semaphore==-1) {		DBG("DEBUG: lock_initialize:  failure to allocate a semaphore\n");		return -1;	}	for (i=0; i<size; i++) {                union semun {                        int val;                        struct semid_ds *buf;                        ushort *array;                } argument;                /* binary lock */                argument.val = +1;                if (semctl( new_semaphore, i , SETVAL , argument )==-1) {			DBG("DEBUG: lock_initialize:  failure to initialize a semaphore\n");			if (semctl( entry_semaphore, 0 , IPC_RMID , 0 )==-1)				DBG("DEBUG: lock_initialize:  failure to release a semaphore\n");			return -2;                }        }	return new_semaphore;}