rem: switch( req_to_abort->state ) { case SCSI_STATE_FINISHED: case SCSI_STATE_SENT: RELEASE_BEN( &bus->mutex ); break;  case SCSI_STATE_QUEUED: { bool was_servicable, start_retry;  was_servicable = scsi_can_service_bus( bus );   scsi_remove_queued_request( req_to_abort );  start_retry = scsi_can_service_bus( bus ) && !was_servicable;
add: ACQUIRE_BEN(&bus->mutex);
context: uchar scsi_abort( scsi_ccb *req_to_abort ){	scsi_bus_info *bus = req_to_abort->bus;		if( bus == NULL ) {		// checking the validity of the request to abort is a nightmare		// this is just a beginning		return SCSI_REQ_INVALID;			} 		ACQUIRE_BEN( &bus->mutex );	switch( req_to_abort->state ) {	case SCSI_STATE_FINISHED:	case SCSI_STATE_SENT:		RELEASE_BEN( &bus->mutex );		break;		case SCSI_STATE_QUEUED: {		bool was_servicable, start_retry;				was_servicable = scsi_can_service_bus( bus );				// remove request from device queue		scsi_remove_queued_request( req_to_abort );				start_retry = scsi_can_service_bus( bus ) && !was_servicable;		RELEASE_BEN( &bus->mutex );		req_to_abort->subsys_status = SCSI_REQ_ABORTED;		// finish emulation				if( req_to_abort->emulated )			scsi_finish_emulation( req_to_abort );		// release DMA buffer		if( req_to_abort->buffered )			scsi_release_dma_buffer( req_to_abort );					// tell peripheral driver about		release_sem_etc( req_to_abort->completion_sem, 1, 0/*B_DO_NOT_RESCHEDULE*/ );				if( start_retry )			release_sem( bus->start_service );					break; }	}		return SCSI_REQ_CMP;}