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

C++ INTUSE函数代码示例

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

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



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

示例1: load_dw

/* Try to start up libdw on DEBUGFILE.  */
static Dwfl_Error
load_dw (Dwfl_Module *mod, struct dwfl_file *debugfile)
{
  if (mod->e_type == ET_REL && !debugfile->relocated)
    {
      const Dwfl_Callbacks *const cb = mod->dwfl->callbacks;

      /* The debugging sections have to be relocated.  */
      if (cb->section_address == NULL)
	return DWFL_E_NOREL;

      Dwfl_Error error = __libdwfl_module_getebl (mod);
      if (error != DWFL_E_NOERROR)
	return error;

      find_symtab (mod);
      Dwfl_Error result = mod->symerr;
      if (result == DWFL_E_NOERROR)
	result = __libdwfl_relocate (mod, debugfile->elf, true);
      if (result != DWFL_E_NOERROR)
	return result;

      /* Don't keep the file descriptors around.  */
      if (mod->main.fd != -1 && elf_cntl (mod->main.elf, ELF_C_FDREAD) == 0)
	{
	  close (mod->main.fd);
	  mod->main.fd = -1;
	}
      if (debugfile->fd != -1 && elf_cntl (debugfile->elf, ELF_C_FDREAD) == 0)
	{
	  close (debugfile->fd);
	  debugfile->fd = -1;
	}
    }

  mod->dw = INTUSE(dwarf_begin_elf) (debugfile->elf, DWARF_C_READ, NULL);
  if (mod->dw == NULL)
    {
      int err = INTUSE(dwarf_errno) ();
      return err == DWARF_E_NO_DWARF ? DWFL_E_NO_DWARF : DWFL_E (LIBDW, err);
    }

  /* Until we have iterated through all CU's, we might do lazy lookups.  */
  mod->lazycu = 1;

  return DWFL_E_NOERROR;
}
开发者ID:0omega,项目名称:platform_external_elfutils,代码行数:48,代码来源:dwfl_module_getdwarf.c


示例2: xdr_keystatus

bool_t
xdr_keystatus (XDR * xdrs, keystatus * objp)
{
  if (!INTUSE(xdr_enum) (xdrs, (enum_t *) objp))
    return FALSE;

  return TRUE;
}
开发者ID:OSLL,项目名称:elfperf,代码行数:8,代码来源:key_prot.c


示例3: xdr_netnamestr

bool_t
xdr_netnamestr (XDR * xdrs, netnamestr * objp)
{
  if (!INTUSE(xdr_string) (xdrs, objp, MAXNETNAMELEN))
    return FALSE;

  return TRUE;
}
开发者ID:OSLL,项目名称:elfperf,代码行数:8,代码来源:key_prot.c


示例4: key_get_conv

int
key_get_conv (char *pkey, des_block *deskey)
{
  cryptkeyres res;

  if (!key_call ((u_long) KEY_GET_CONV, (xdrproc_t) INTUSE(xdr_keybuf), pkey,
		 (xdrproc_t) INTUSE(xdr_cryptkeyres), (char *) &res))
    return -1;

  if (res.status != KEY_SUCCESS)
    {
      debug ("get_conv status is nonzero");
      return -1;
    }
  *deskey = res.cryptkeyres_u.deskey;
  return 0;
}
开发者ID:Lind-Project,项目名称:Lind-GlibC,代码行数:17,代码来源:key_call.c


示例5: xdr_keybuf

bool_t
xdr_keybuf (XDR * xdrs, keybuf objp)
{
  if (!INTUSE(xdr_opaque) (xdrs, objp, HEXKEYBYTES))
    return FALSE;

  return TRUE;
}
开发者ID:OSLL,项目名称:elfperf,代码行数:8,代码来源:key_prot.c


示例6: key_setnet

int
key_setnet (struct key_netstarg *arg)
{
  keystatus status;

  if (!key_call ((u_long) KEY_NET_PUT, (xdrproc_t) INTUSE(xdr_key_netstarg),
		 (char *) arg,(xdrproc_t) INTUSE(xdr_keystatus),
		 (char *) &status))
    return -1;

  if (status != KEY_SUCCESS)
    {
      debug ("key_setnet status is nonzero");
      return -1;
    }
  return 1;
}
开发者ID:Lind-Project,项目名称:Lind-GlibC,代码行数:17,代码来源:key_call.c


示例7: __libdw_formptr

internal_function unsigned char *
__libdw_formptr (Dwarf_Attribute *attr, int sec_index,
		 int err_nodata, unsigned char **endpp,
		 Dwarf_Off *offsetp)
{
  if (attr == NULL)
    return NULL;

  const Elf_Data *d = attr->cu->dbg->sectiondata[sec_index];
  if (unlikely (d == NULL))
    {
      __libdw_seterrno (err_nodata);
      return NULL;
    }

  Dwarf_Word offset;
  if (attr->form == DW_FORM_sec_offset)
    {
      if (__libdw_read_offset (attr->cu->dbg, attr->cu->dbg,
			       cu_sec_idx (attr->cu), attr->valp,
			       attr->cu->offset_size, &offset, sec_index, 0))
	return NULL;
    }
  else if (attr->cu->version > 3)
    goto invalid;
  else
    switch (attr->form)
      {
      case DW_FORM_data4:
      case DW_FORM_data8:
	if (__libdw_read_offset (attr->cu->dbg, attr->cu->dbg,
				 cu_sec_idx (attr->cu),
				 attr->valp,
				 attr->form == DW_FORM_data4 ? 4 : 8,
				 &offset, sec_index, 0))
	  return NULL;
	break;

      default:
	if (INTUSE(dwarf_formudata) (attr, &offset))
	  return NULL;
      };

  unsigned char *readp = d->d_buf + offset;
  unsigned char *endp = d->d_buf + d->d_size;
  if (unlikely (readp >= endp))
    {
    invalid:
      __libdw_seterrno (DWARF_E_INVALID_DWARF);
      return NULL;
    }

  if (endpp != NULL)
    *endpp = endp;
  if (offsetp != NULL)
    *offsetp = offset;
  return readp;
}
开发者ID:Distrotech,项目名称:elfutils,代码行数:58,代码来源:dwarf_formudata.c


示例8: dwarf_begin

Dwarf *
dwarf_begin (int fd, Dwarf_Cmd cmd)
{
  Elf *elf;
  Elf_Cmd elfcmd;
  Dwarf *result = NULL;

  switch (cmd)
    {
    case DWARF_C_READ:
      elfcmd = ELF_C_READ_MMAP;
      break;
    case DWARF_C_WRITE:
      elfcmd = ELF_C_WRITE;
      break;
    case DWARF_C_RDWR:
      elfcmd = ELF_C_RDWR;
      break;
    default:
      /* No valid mode.  */
      __libdw_seterrno (DWARF_E_INVALID_CMD);
      return NULL;
    }

  /* We have to call `elf_version' here since the user might have not
     done it or initialized libelf with a different version.  This
     would break libdwarf since we are using the ELF data structures
     in a certain way.  */
  elf_version (EV_CURRENT);

  /* Get an ELF descriptor.  */
  elf = elf_begin (fd, elfcmd, NULL);
  if (elf == NULL)
    {
      /* Test why the `elf_begin" call failed.  */
      struct stat64 st;

      if (fstat64 (fd, &st) == 0 && ! S_ISREG (st.st_mode))
	__libdw_seterrno (DWARF_E_NO_REGFILE);
      else if (errno == EBADF)
	__libdw_seterrno (DWARF_E_INVALID_FILE);
      else
	__libdw_seterrno (DWARF_E_IO_ERROR);
    }
  else
    {
      /* Do the real work now that we have an ELF descriptor.  */
      result = INTUSE(dwarf_begin_elf) (elf, cmd, NULL);

      /* If this failed, free the resources.  */
      if (result == NULL)
	elf_end (elf);
      else
	result->free_elf = true;
    }

  return result;
}
开发者ID:nfxosp,项目名称:platform_external_elfutils,代码行数:58,代码来源:dwarf_begin.c


示例9: clntraw_create

/*
 * Create a client handle for memory based rpc.
 */
CLIENT *
clntraw_create (u_long prog, u_long vers)
{
  struct clntraw_private_s *clp = clntraw_private;
  struct rpc_msg call_msg;
  XDR *xdrs;
  CLIENT *client;

  if (clp == 0)
    {
      clp = (struct clntraw_private_s *) calloc (1, sizeof (*clp));
      if (clp == 0)
	return (0);
      clntraw_private = clp;
    }
  xdrs = &clp->xdr_stream;
  client = &clp->client_object;
  /*
   * pre-serialize the static part of the call msg and stash it away
   */
  call_msg.rm_direction = CALL;
  call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
  call_msg.rm_call.cb_prog = prog;
  call_msg.rm_call.cb_vers = vers;
  INTUSE(xdrmem_create) (xdrs, clp->mashl_callmsg.msg, MCALL_MSG_SIZE,
			 XDR_ENCODE);
  if (!INTUSE(xdr_callhdr) (xdrs, &call_msg))
    {
      perror (_ ("clnt_raw.c: fatal header serialization error"));
    }
  clp->mcnt = XDR_GETPOS (xdrs);
  XDR_DESTROY (xdrs);

  /*
   * Set xdrmem for client/server shared buffer
   */
  INTUSE(xdrmem_create) (xdrs, clp->_raw_buf, UDPMSGSIZE, XDR_FREE);

  /*
   * create client handle
   */
  client->cl_ops = (struct clnt_ops *) &client_ops;
  client->cl_auth = INTUSE(authnone_create) ();
  return client;
}
开发者ID:mseaborn,项目名称:plash-glibc,代码行数:48,代码来源:clnt_raw.c


示例10: xdr_rejected_reply

/*
 * XDR the MSG_DENIED part of a reply message union
 */
bool_t
xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr)
{
    /* personalized union, rather than calling xdr_union */
    if (!INTUSE(xdr_enum) (xdrs, (enum_t *) & (rr->rj_stat)))
        return FALSE;
    switch (rr->rj_stat)
    {
    case RPC_MISMATCH:
        if (!INTUSE(xdr_u_long) (xdrs, &(rr->rj_vers.low)))
            return FALSE;
        return INTUSE(xdr_u_long) (xdrs, &(rr->rj_vers.high));

    case AUTH_ERROR:
        return INTUSE(xdr_enum) (xdrs, (enum_t *) & (rr->rj_why));
    }
    return FALSE;
}
开发者ID:OpenInkpot-archive,项目名称:iplinux-eglibc,代码行数:21,代码来源:rpc_prot.c


示例11: svc_getreq

void
svc_getreq (int rdfds)
{
  fd_set readfds;

  FD_ZERO (&readfds);
  readfds.fds_bits[0] = rdfds;
  INTUSE(svc_getreqset) (&readfds);
}
开发者ID:KrisChaplin,项目名称:octeon_toolchain-4.1,代码行数:9,代码来源:svc.c


示例12: key_secretkey_is_set

/* key_secretkey_is_set() returns 1 if the keyserver has a secret key
 * stored for the caller's effective uid; it returns 0 otherwise
 *
 * N.B.:  The KEY_NET_GET key call is undocumented.  Applications shouldn't
 * be using it, because it allows them to get the user's secret key.
 */
int
key_secretkey_is_set (void)
{
  struct key_netstres kres;

  memset (&kres, 0, sizeof (kres));
  if (key_call ((u_long) KEY_NET_GET, (xdrproc_t) INTUSE(xdr_void),
		(char *) NULL, (xdrproc_t) INTUSE(xdr_key_netstres),
		(char *) &kres) &&
      (kres.status == KEY_SUCCESS) &&
      (kres.key_netstres_u.knet.st_priv_key[0] != 0))
    {
      /* avoid leaving secret key in memory */
      memset (kres.key_netstres_u.knet.st_priv_key, 0, HEXKEYBYTES);
      return 1;
    }
  return 0;
}
开发者ID:Lind-Project,项目名称:Lind-GlibC,代码行数:24,代码来源:key_call.c


示例13: module_callback

static int
module_callback (Dwfl_Module *mod, void **userdata,
		 const char *name, Dwarf_Addr start, void *arg)
{
  const struct module_callback_info *info = arg;
  Dwarf_Addr bias = 0;
  Dwarf *dw = INTUSE(dwfl_module_getdwarf) (mod, &bias);
  return (*info->callback) (mod, userdata, name, start, dw, bias, info->arg);
}
开发者ID:Distrotech,项目名称:elfutils,代码行数:9,代码来源:dwfl_getdwarf.c


示例14: _IO_obstack_vprintf

int
_IO_obstack_vprintf (struct obstack *obstack, const char *format, va_list args)
{
  struct obstack_FILE
    {
      struct _IO_obstack_file ofile;
  } new_f;
  int result;
  int size;
  int room;

#ifdef _IO_MTSAFE_IO
  new_f.ofile.file.file._lock = NULL;
#endif

  _IO_no_init (&new_f.ofile.file.file, _IO_USER_LOCK, -1, NULL, NULL);
  _IO_JUMPS (&new_f.ofile.file) = &_IO_obstack_jumps;
  room = obstack_room (obstack);
  size = obstack_object_size (obstack) + room;
  if (size == 0)
    {
      /* We have to handle the allocation a bit different since the
	 `_IO_str_init_static' function would handle a size of zero
	 different from what we expect.  */

      /* Get more memory.  */
      obstack_make_room (obstack, 64);

      /* Recompute how much room we have.  */
      room = obstack_room (obstack);
      size = room;

      assert (size != 0);
    }

  _IO_str_init_static_internal ((struct _IO_strfile_ *) &new_f.ofile,
				obstack_base (obstack),
				size, obstack_next_free (obstack));
  /* Now allocate the rest of the current chunk.  */
  assert (size == (new_f.ofile.file.file._IO_write_end
		   - new_f.ofile.file.file._IO_write_base));
  assert (new_f.ofile.file.file._IO_write_ptr
	  == (new_f.ofile.file.file._IO_write_base
	      + obstack_object_size (obstack)));
  obstack_blank_fast (obstack, room);

  new_f.ofile.obstack = obstack;

  result = INTUSE(_IO_vfprintf) (&new_f.ofile.file.file, format, args);

  /* Shrink the buffer to the space we really currently need.  */
  obstack_blank_fast (obstack, (new_f.ofile.file.file._IO_write_ptr
				- new_f.ofile.file.file._IO_write_end));

  return result;
}
开发者ID:KrisChaplin,项目名称:octeon_toolchain-4.1,代码行数:56,代码来源:obprintf.c


示例15: __nldbl_vfprintf

int
attribute_compat_text_section
__nldbl_vfprintf (FILE *s, const char *fmt, va_list ap)
{
  int done;
  set_no_long_double ();
  done = INTUSE(_IO_vfprintf) (s, fmt, ap);
  clear_no_long_double ();
  return done;
}
开发者ID:chonghw,项目名称:pemu,代码行数:10,代码来源:nldbl-compat.c


示例16: __nldbl__IO_vsprintf

int
attribute_compat_text_section
__nldbl__IO_vsprintf (char *string, const char *fmt, va_list ap)
{
  int done;
  __no_long_double = 1;
  done = INTUSE(_IO_vsprintf) (string, fmt, ap);
  __no_long_double = 0;
  return done;
}
开发者ID:chonghw,项目名称:pemu,代码行数:10,代码来源:nldbl-compat.c


示例17: __nldbl___vfscanf

int
attribute_compat_text_section
__nldbl___vfscanf (FILE *s, const char *fmt, va_list ap)
{
  int res;
  set_no_long_double ();
  res = INTUSE(_IO_vfscanf) (s, fmt, ap, NULL);
  clear_no_long_double ();
  return res;
}
开发者ID:chonghw,项目名称:pemu,代码行数:10,代码来源:nldbl-compat.c


示例18: _compat_vaddr_at_end_dwfl_module_build_id

int
_compat_vaddr_at_end_dwfl_module_build_id (Dwfl_Module *mod,
					   const unsigned char **bits,
					   GElf_Addr *vaddr)
{
  int result = INTUSE(dwfl_module_build_id) (mod, bits, vaddr);
  if (result > 0)
    *vaddr += (result + 3) & -4;
  return result;
}
开发者ID:AMCScarface,项目名称:misc,代码行数:10,代码来源:dwfl_module_build_id.c


示例19: authnone_create_once

static void
authnone_create_once (void)
{
  struct authnone_private_s *ap;
  XDR xdr_stream;
  XDR *xdrs;

  ap = &authnone_private;

  ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth;
  ap->no_client.ah_ops = &ops;
  xdrs = &xdr_stream;
  INTUSE(xdrmem_create) (xdrs, ap->marshalled_client,
			 (u_int) MAX_MARSHAL_SIZE, XDR_ENCODE);
  (void) INTUSE(xdr_opaque_auth) (xdrs, &ap->no_client.ah_cred);
  (void) INTUSE(xdr_opaque_auth) (xdrs, &ap->no_client.ah_verf);
  ap->mcnt = XDR_GETPOS (xdrs);
  XDR_DESTROY (xdrs);
}  
开发者ID:mbref,项目名称:glibc-236-microblaze,代码行数:19,代码来源:auth_none.c


示例20: registerrpc

int
registerrpc (u_long prognum, u_long versnum, u_long procnum,
	     char *(*progname) (char *), xdrproc_t inproc, xdrproc_t outproc)
{
  struct proglst_ *pl;
  char *buf;

  if (procnum == NULLPROC)
    {

      if (__asprintf (&buf, _("can't reassign procedure number %ld\n"),
		      NULLPROC) < 0)
	buf = NULL;
      goto err_out;
    }
  if (transp == 0)
    {
      transp = INTUSE(svcudp_create) (RPC_ANYSOCK);
      if (transp == NULL)
	{
	  buf = strdup (_("couldn't create an rpc server\n"));
	  goto err_out;
	}
    }
  (void) pmap_unset ((u_long) prognum, (u_long) versnum);
  if (!svc_register (transp, (u_long) prognum, (u_long) versnum,
		     universal, IPPROTO_UDP))
    {
      if (__asprintf (&buf, _("couldn't register prog %ld vers %ld\n"),
		      prognum, versnum) < 0)
	buf = NULL;
      goto err_out;
    }
  pl = (struct proglst_ *) malloc (sizeof (struct proglst_));
  if (pl == NULL)
    {
      buf = strdup (_("registerrpc: out of memory\n"));
      goto err_out;
    }
  pl->p_progname = progname;
  pl->p_prognum = prognum;
  pl->p_procnum = procnum;
  pl->p_inproc = inproc;
  pl->p_outproc = outproc;
  pl->p_nxt = proglst;
  proglst = pl;
  return 0;

 err_out:
  if (buf == NULL)
    return -1;
  (void) __fxprintf (NULL, "%s", buf);
  free (buf);
  return -1;
}
开发者ID:OSLL,项目名称:elfperf,代码行数:55,代码来源:svc_simple.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ INT_ASSERT函数代码示例发布时间:2022-05-30
下一篇:
C++ INTSMB_UNLOCK函数代码示例发布时间: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