• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ pool_Address函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中pool_Address函数的典型用法代码示例。如果您正苦于以下问题:C++ pool_Address函数的具体用法?C++ pool_Address怎么用?C++ pool_Address使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了pool_Address函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: maximumNode

static pool_tRef maximumNode(ptree_sTable* tp, pool_tRef nr)
{
  pwr_tStatus sts;
  ptree_sNode* np = pool_Address(&sts, tp->php, nr);

  for (; np->right != tp->g->null;
       nr = np->right, np = pool_Address(&sts, tp->php, nr))
    ;
  return nr;
}
开发者ID:siamect,项目名称:proview,代码行数:10,代码来源:rt_ptree.c


示例2: ptree_Create

ptree_sTable* ptree_Create(pwr_tStatus* sts, pool_sHead* php, ptree_sTable* ttp,
    ptree_sGtable* gttp,
    int (*compareFunc)(ptree_sTable* tp, ptree_sNode* x, ptree_sNode* y))
{
  ttp->php = php;
  ttp->g = gttp;
  ttp->nullp = pool_Address(sts, php, gttp->null);
  ttp->keyp = pool_Address(sts, php, gttp->key);
  ttp->compareFunc = compareFunc;

  *sts = TREE__SUCCESS;
  return ttp;
}
开发者ID:siamect,项目名称:proview,代码行数:13,代码来源:rt_ptree.c


示例3: decodeObject

static pwr_tBoolean
decodeObject (
  pwr_tStatus		*sts,
  gdb_sObject		*op,
  gdb_sClass		*cp,
  co_eBO 		bo
)
{
  char			*p;
  int			i;
  gdb_sAttribute	*ap;

  if (op->u.n.flags.b.bodyDecoded) return TRUE;

  p = pool_Address(sts, gdbroot->rtdb, op->u.n.body);
  if (p == NULL) return NO;

  for (i = 0, ap = cp->attr; i < cp->acount; i++, ap++) {
    if (ap->flags.b.state) 
      continue;
    if (convFctn[pwr_Tix(ap->type)] == NULL) 
      continue;
    if (!convFctn[pwr_Tix(ap->type)](p, ap, bo)) 
      return NO;
  }

  op->u.n.flags.b.bodyDecoded = 1;

  return TRUE;
}
开发者ID:Strongc,项目名称:proview,代码行数:30,代码来源:rt_ivol.c


示例4: predecessorNode

static pool_tRef predecessorNode(ptree_sTable* tp, pool_tRef nr)
{
  pwr_tStatus sts;
  ptree_sNode* p;
  pool_tRef pr;
  ptree_sNode* np = pool_Address(&sts, tp->php, nr);

  if (np->left != tp->g->null)
    return maximumNode(tp, np->left);

  for (pr = np->parent, p = pool_Address(&sts, tp->php, pr);
       pr != tp->g->null && nr == p->left;
       np = p, nr = pr, pr = p->parent, p = pool_Address(&sts, tp->php, pr))
    ;
  return pr;
}
开发者ID:siamect,项目名称:proview,代码行数:16,代码来源:rt_ptree.c


示例5: sanc_Subscribe

pwr_tBoolean sanc_Subscribe(pwr_tStatus* sts, gdb_sObject* op)
{
  gdb_sVolume* vp;
  gdb_sNode* np;

  if (sts != NULL)
    *sts = 1;

  gdb_AssumeLocked;

  if (op->l.flags.b.isNative)
    pwr_Return(NO, sts, SAN__NATIVE);

  if (op->u.c.flags.m & (gdb_mCo_sancAdd | gdb_mCo_sancAct)) {
    op->u.c.sanexp = 0;
    return YES;
  }

  vp = pool_Address(NULL, gdbroot->pool, op->l.vr);
  np = pool_Address(NULL, gdbroot->pool, vp->l.nr);

  if (op->u.c.flags.b.sancRem) {
    pool_Qremove(NULL, gdbroot->pool, &op->u.c.sanc_ll);
    op->u.c.flags.b.sancRem = 0;
    pwr_Assert(np->sancRem_lc != 0);
    np->sancRem_lc--;
    pool_QinsertPred(NULL, gdbroot->pool, &op->u.c.sanc_ll, &np->sancAct_lh);
    op->u.c.flags.b.sancAct = 1;
    np->sancAct_lc++;
    return YES;
  }

  pwr_Assert(!pool_QisLinked(NULL, gdbroot->pool, &op->u.c.sanc_ll));

  pool_QinsertPred(NULL, gdbroot->pool, &op->u.c.sanc_ll, &np->sancAdd_lh);
  op->u.c.flags.b.sancAdd = 1;
  memset(&op->l.al, 0, sizeof(op->l.al));
  np->sancAdd_lc++;
  ++gdbroot->db->sancid.rix;
  op->u.c.sanid = gdbroot->db->sancid;
  op->u.c.sanexp = 0;

  return YES;
}
开发者ID:siamect,项目名称:proview,代码行数:44,代码来源:rt_sanc.c


示例6: freeNode

static void freeNode(ptree_sTable* tp, pool_tRef nr)
{
  pwr_tStatus sts;
  ptree_sNode* np = pool_Address(&sts, tp->php, nr);

  memset(np, 0, tp->g->recordSize);
  np->right = tp->g->free;
  tp->g->free = nr;
  tp->g->nFree++;
  return;
}
开发者ID:siamect,项目名称:proview,代码行数:11,代码来源:rt_ptree.c


示例7: ptree_Predecessor

void* ptree_Predecessor(pwr_tStatus* sts, ptree_sTable* tp, void* np)
{
  pool_tRef nr = pool_Reference(sts, tp->php, np);

  nr = predecessorNode(tp, nr);

  if (nr == tp->g->null)
    pwr_Return(NULL, sts, TREE__NOTFOUND);

  np = pool_Address(sts, tp->php, nr);
  pwr_Return(np, sts, TREE__FOUND);
}
开发者ID:siamect,项目名称:proview,代码行数:12,代码来源:rt_ptree.c


示例8: dvol_DeleteObject

pwr_tBoolean
dvol_DeleteObject (
  pwr_tStatus		*sts,
  pwr_tObjid		oid
)
{
  static cvol_sNotify	dm;		/* Cannot be on the stack for VAXELN */

  gdb_sObject		*op;
  gdb_sObject		*p_op;
  gdb_sVolume		*vp;

  gdb_AssumeLocked;

  if (oid.oix == pwr_cNObjectIx)
    pwr_Return(FALSE, sts, GDH__VOLDELETE);

  op = vol_OidToObject(sts, oid, gdb_mLo_dynamic, vol_mTrans_none, cvol_eHint_none);
  if (op == NULL) return FALSE;

  if (op->g.flags.b.isParent && cdh_ObjidIsNotNull(op->g.soid))
    pwr_Return(FALSE, sts, GDH__CHILDREN);

  p_op	= pool_Address(NULL, gdbroot->pool, op->l.por);
  vp	= pool_Address(NULL, gdbroot->pool, op->l.vr);

  cvols_InitNotify(op, &dm, net_eMsg_deleteObject);

  unadoptObject(sts, op, p_op, &dm);

  vol_UnlinkObject(sts, vp, op, vol_mLink_delete);

  cvols_Notify(&dm);

  pwr_Return(TRUE, sts, GDH__SUCCESS);
}
开发者ID:hfuhuang,项目名称:proview,代码行数:36,代码来源:rt_dvol.c


示例9: ptreePrintInorder

static void ptreePrintInorder(
    ptree_sTable* tp, pool_tRef nr, void (*printNode)(ptree_sNode*, pool_tRef))
{
  pwr_tStatus sts;

  if (nr == tp->g->null)
    return;

  ptree_sNode* np = pool_Address(&sts, tp->php, nr);
  if (np->right != tp->g->null)
    ptreePrintInorder(tp, np->right, printNode);

  printNode(np, nr);

  if (np->left != tp->g->null)
    ptreePrintInorder(tp, np->left, printNode);
}
开发者ID:siamect,项目名称:proview,代码行数:17,代码来源:rt_ptree.c


示例10: cvolcm_TrimOld

void cvolcm_TrimOld()
{
  gdb_sTouchQ* oqp = &gdbroot->db->cacheOld;
  gdb_sTouchQ* fqp = &gdbroot->db->cacheFree;
  pool_sQlink* ol;
  gdb_sObject* op;
  gdb_sVolume* vp;

  gdb_AssumeLocked;

  while (fqp->lc < fqp->lc_min) {
    ol = pool_Qpred(NULL, gdbroot->pool, &oqp->lh);
    if (ol == &oqp->lh)
      break;
    op = pool_Qitem(ol, gdb_sObject, u.c.cache_ll);
    vp = pool_Address(NULL, gdbroot->pool, op->l.vr);
    cvol_FreeObject(NULL, vp, op, vol_mLink_cacheTrim);
  }
}
开发者ID:siamect,项目名称:proview,代码行数:19,代码来源:rt_cvolcm.c


示例11: subc_SetOld

void
subc_SetOld (
    sub_sClient		*cp
)
{
    void   *adrs;

    cp->old = TRUE;

    if (cp->userdata != pool_cNRef) {
        adrs = pool_Address(NULL, gdbroot->rtdb, cp->userdata);
        if (adrs != NULL) {
            memset(adrs, 0, cp->usersize);
        }
    }

    subc_RemoveFromMessage(cp);

}
开发者ID:hfuhuang,项目名称:proview,代码行数:19,代码来源:rt_subc.c


示例12: cvolcm_DeleteObject

void
cvolcm_DeleteObject (
  qcom_sGet		*get
)
{
  pwr_tStatus		sts;
  gdb_sObject		*op;
  gdb_sObject		*pop;
  gdb_sObject		*sop;
  pwr_tObjid		soid;
  gdb_sVolume		*vp;
  net_sDeleteObject	*dop = (net_sDeleteObject *) get->data;

  gdb_AssumeUnlocked;

  gdb_ScopeLock {
    pop = hash_Search(&sts, gdbroot->oid_ht, &dop->par.oid);
    op = hash_Search(&sts, gdbroot->oid_ht, &dop->notify.oid);
    if (op != NULL) {
      pwr_Assert(cdh_ObjidIsEqual(op->g.f.poid, dop->par.oid)); 
      vp = pool_Address(NULL, gdbroot->pool, op->l.vr);
      cvol_FreeObject(&sts, vp, op, vol_mLink_cacheDelete);
    }

    if (pop == NULL) break;

    pop->g.soid = dop->par.soid;
    if (cdh_ObjidIsNull(pop->g.soid)) {
      pop->g.flags.b.isParent = 0;
    }

    soid = dop->par.oid;
    soid.oix = dop->sib.blink;
    sop = hash_Search(&sts, gdbroot->oid_ht, &soid);
    if (sop != NULL)
      sop->g.sib.flink = dop->sib.newflink;

    soid.oix = dop->sib.flink;
    sop = hash_Search(&sts, gdbroot->oid_ht, &soid);
    if (sop != NULL)
      sop->g.sib.blink = dop->sib.newblink;
  } gdb_ScopeUnlock;
}
开发者ID:jordibrus,项目名称:proview,代码行数:43,代码来源:rt_cvolcm.c


示例13: ivol_GetBody

ivol_sBody *
ivol_GetBody (
  pwr_tStatus		*status,
  pwr_tObjid		oid,
  ivol_sBody		*lb
)
{
  static ivol_sBody	body;

  pwr_dStatus(sts, status, GDH__SUCCESS);

  if (lb == NULL) lb = &body;

  lb->op = hash_Search(sts, gdbroot->oid_ht, &oid);
  if ( !lb->op)
    return 0;
  lb->size = lb->op->g.size;
  lb->body = pool_Address(NULL, gdbroot->rtdb, lb->op->u.n.body);

  return lb;
}
开发者ID:Strongc,项目名称:proview,代码行数:21,代码来源:rt_ivol.c


示例14: subs_DeleteServer

void
subs_DeleteServer (
  sub_sServer		*sp
)
{
  pwr_tStatus		sts;
  sub_sBuffer		*bp;
  gdb_sObject		*op;

  gdb_AssumeLocked;

  bp = pool_Address(NULL, gdbroot->pool, sp->br);

  /* Disconnect from buffer. If the number of servers connected
     to the buffer reaches zero, the buffer gets disposed when
     it times out the next time.  */

  pool_Qremove(NULL, gdbroot->pool, &sp->bufsubs_ll);
  bp->bufsubs_lc -= 1;
  bp->totsize -= sp->aref.Size;

  /* Now give the subsrv entry back to the pool.  */

  pool_Qremove(NULL, gdbroot->pool, &sp->subs_ll);
  gdbroot->db->subs_lc--;
  pool_Qremove(NULL, gdbroot->pool, &sp->nodsubs_ll);

  /* Remove from server table.  */

  hash_Remove(&sts, gdbroot->subs_ht, sp);

  /* Decrement subcounter for referenced object */

  op = vol_OidToObject(&sts, sp->aref.Objid, gdb_mLo_owned, vol_mTrans_alias, cvol_eHint_none);
  if (op != NULL) {
    op->u.n.subcount--;
  }

  pool_Free(NULL, gdbroot->pool, sp);
}
开发者ID:ManfredHerrmann,项目名称:proview,代码行数:40,代码来源:rt_subs.c



注:本文中的pool_Address函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ pool_alloc函数代码示例发布时间:2022-05-30
下一篇:
C++ pool函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap