コード例 #1
0
ファイル: array.c プロジェクト: salma-rodriguez/algorithms
static comparable_t del(int idx, array_t list)
{
        __list(list);
        __list_emp(list);
        __list_idx(idx, list);
	return __del(idx, list);
}
コード例 #2
0
ファイル: mutex.c プロジェクト: KlausMerkert/FreeRail
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;
}
コード例 #3
0
 Cluster& Cluster::operator=(const Cluster & other){
     if(this != &other){
         //delete & copy
         __size = other.__size;
         __del();
         __cpy(other.__points);
     }
     return *this;
 }
コード例 #4
0
ファイル: cache.c プロジェクト: Distrotech/conntrack-tools
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);
}
コード例 #5
0
 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;
 }
コード例 #6
0
 Cluster::~Cluster(){
     __del();
 }
コード例 #7
0
static void del(struct smq_policy *mq, struct entry *e)
{
	__del(mq, e->dirty ? &mq->dirty : &mq->clean, e);
}
コード例 #8
0
ファイル: array.c プロジェクト: salma-rodriguez/algorithms
static comparable_t del_last(array_t list)
{
        __list(list);
        __list_emp(list);
	return __del(list->priv->count-1, list);
}
コード例 #9
0
ファイル: array.c プロジェクト: salma-rodriguez/algorithms
static comparable_t del_first(array_t list)
{
        __list(list);
        __list_emp(list);
	return __del(0, list);
}