static comparable_t del(int idx, array_t list) { __list(list); __list_emp(list); __list_idx(idx, list); return __del(idx, list); }
static iOMutex _inst( const char* name, Boolean create ) { iOMutex mutex = allocIDMem( sizeof( struct OMutex ), RocsMutexID ); iOMutexData data = allocIDMem( sizeof( struct OMutexData ), RocsMutexID ); Boolean ok = False; MemOp.basecpy( mutex, &MutexOp, 0, sizeof( struct OMutex ), data ); data->name = StrOp.dupID( name, RocsMutexID ); if( data->name == NULL ) { data->name = StrOp.fmtID( RocsMutexID, "MUX%08X", data ); } if( create ) ok = rocs_mutex_create( data ); else ok = rocs_mutex_open( data ); if( !ok ) { /* error */ fprintf( stderr, "Error Mutex: %s rc=%d", data->name, data->rc); __del( mutex ); return NULL; } instCnt++; return mutex; }
Cluster& Cluster::operator=(const Cluster & other){ if(this != &other){ //delete & copy __size = other.__size; __del(); __cpy(other.__points); } return *this; }
void cache_del(struct cache *c, struct cache_object *obj) { /* * Do not increase stats if we are trying to * kill an entry was previously deleted via * __cache_del_timer. */ if (obj->status != C_OBJ_DEAD) { c->stats.del_ok++; c->stats.active--; } __del(c, obj); }
Cluster& Cluster::operator=(const Cluster & other){ if(__dimensionality != other.__dimensionality){ throw DimensionalityMismatchEx(__dimensionality,other.__dimensionality); } if(this != &other){ //delete & copy __id = other.__id; __size = other.__size; __del(); if(other.__points != nullptr){ __cpy(other.__points); } else{ __points = nullptr; } } return *this; }
Cluster::~Cluster(){ __del(); }
static void del(struct smq_policy *mq, struct entry *e) { __del(mq, e->dirty ? &mq->dirty : &mq->clean, e); }
static comparable_t del_last(array_t list) { __list(list); __list_emp(list); return __del(list->priv->count-1, list); }
static comparable_t del_first(array_t list) { __list(list); __list_emp(list); return __del(0, list); }