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

C++ ARGUNUSED函数代码示例

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

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



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

示例1: wctype_l

/*
 * For now, we don't support locale specific character classes.  This is
 * a capability that needs to be added (locales should be able to define
 * their own character classes.)
 */
wctype_t
wctype_l(const char *property, locale_t loc)
{
	static const struct {
		const char	*name;
		wctype_t	 mask;
	} props[] = {
		{ "alnum",	_CTYPE_A|_CTYPE_D },
		{ "alpha",	_CTYPE_A },
		{ "blank",	_CTYPE_B },
		{ "cntrl",	_CTYPE_C },
		{ "digit",	_CTYPE_D },
		{ "graph",	_CTYPE_G },
		{ "lower",	_CTYPE_L },
		{ "print",	_CTYPE_R },
		{ "punct",	_CTYPE_P },
		{ "space",	_CTYPE_S },
		{ "upper",	_CTYPE_U },
		{ "xdigit",	_CTYPE_X },
		{ "ideogram",	_CTYPE_I },	/* BSD extension */
		{ "special",	_CTYPE_T },	/* BSD extension */
		{ "phonogram",	_CTYPE_Q },	/* BSD extension */
		{ "rune",	-1 },		/* BSD extension */
		{ NULL,		0 },		/* Default */
	};
	int i;
	_NOTE(ARGUNUSED(loc));

	i = 0;
	while (props[i].name != NULL && strcmp(props[i].name, property) != 0)
		i++;

	return (props[i].mask);
}
开发者ID:bahamas10,项目名称:openzfs,代码行数:39,代码来源:wctype.c


示例2: ghd_target_free

/*ARGSUSED*/
void
ghd_target_free(dev_info_t	*hba_dip,
		dev_info_t	*tgt_dip,
		ccc_t		*cccp,
		gtgt_t		*gtgtp)
{
	_NOTE(ARGUNUSED(hba_dip,tgt_dip))

	gdev_t	*gdevp = gtgtp->gt_gdevp;

	GDBG_WAITQ(("ghd_target_free(%d,%d) gdevp-0x%p gtgtp 0x%p\n",
	    gtgtp->gt_target, gtgtp->gt_lun, (void *)gdevp, (void *)gtgtp));

	/*
	 * grab both mutexes so the queue structures
	 * stay stable while deleting this instance
	 */
	mutex_enter(&cccp->ccc_hba_mutex);
	mutex_enter(&cccp->ccc_waitq_mutex);

	ASSERT(gdevp->gd_ninstances > 0);

	/*
	 * remove this per-instance structure from the device list and
	 * free the memory
	 */
	GTGT_DEATTACH(gtgtp, gdevp);
	kmem_free((caddr_t)gtgtp, gtgtp->gt_size);

	if (gdevp->gd_ninstances == 1) {
		GDBG_WAITQ(("ghd_target_free: N=1 gdevp 0x%p\n",
		    (void *)gdevp));
		/*
		 * If there's now just one instance left attached to this
		 * device then reset the queue's max active value
		 * from that instance's saved value.
		 */
		gtgtp = GDEVP2GTGTP(gdevp);
		GDEV_MAXACTIVE(gdevp) = gtgtp->gt_maxactive;

	} else if (gdevp->gd_ninstances == 0) {
		/* else no instances left */
		GDBG_WAITQ(("ghd_target_free: N=0 gdevp 0x%p\n",
		    (void *)gdevp));

		/* detach this per-dev-structure from the HBA's dev list */
		GDEV_QDETACH(gdevp, cccp);
		kmem_free(gdevp, sizeof (*gdevp));

	}
#if defined(GHD_DEBUG) || defined(__lint)
	else {
		/* leave maxactive set to 1 */
		GDBG_WAITQ(("ghd_target_free: N>1 gdevp 0x%p\n",
		    (void *)gdevp));
	}
#endif

	ghd_waitq_process_and_mutex_exit(cccp);
}
开发者ID:MatiasNAmendola,项目名称:AuroraUX-SunOS,代码行数:61,代码来源:ghd_waitq.c


示例3: audio_strclose

static int
audio_strclose(queue_t *rq, int flag, cred_t *credp)
{
	audio_client_t	*c;
	audio_dev_t	*d;
	int		rv;

	_NOTE(ARGUNUSED(flag));
	_NOTE(ARGUNUSED(credp));

	if ((c = rq->q_ptr) == NULL) {
		return (ENXIO);
	}
	if (ddi_can_receive_sig() || (ddi_get_pid() == 0)) {
		rv = auclnt_drain(c);
	}

	/* make sure we won't get any upcalls */
	auimpl_client_deactivate(c);

	/*
	 * Pick up any data sitting around in input buffers.  This
	 * avoids leaving record data stuck in queues.
	 */
	if (c->c_istream.s_engine != NULL)
		audio_engine_produce(c->c_istream.s_engine);

	/* get a local hold on the device */
	d = c->c_dev;
	auimpl_dev_hold(c->c_dev);

	/* Turn off queue processing... */
	qprocsoff(rq);

	/* Call personality specific close handler */
	c->c_close(c);

	auimpl_client_destroy(c);

	/* notify peers that a change has occurred */
	atomic_inc_uint(&d->d_serial);

	/* now we can drop the release we had on the device */
	auimpl_dev_release(d);

	return (rv);
}
开发者ID:MatiasNAmendola,项目名称:AuroraUX-SunOS,代码行数:47,代码来源:audio_ddi.c


示例4: smb_dfs_encode_refv3x

/*
 * Prepare a response with V3/V4 referral format.
 *
 * For more details, see comments for smb_dfs_encode_refv2() or see
 * MS-DFSC specification.
 */
static uint32_t
smb_dfs_encode_refv3x(smb_request_t *sr, mbuf_chain_t *mbc,
	dfs_info_t *referrals,
    uint16_t ver)
{
	_NOTE(ARGUNUSED(sr))
	uint16_t entsize, rep_bufsize, hdrsize;
	uint16_t server_type;
	uint16_t flags = 0;
	uint16_t path_offs, altpath_offs, netpath_offs;
	uint16_t targetsz, total_targetsz = 0;
	uint16_t dfs_pathsz;
	uint16_t r;

	hdrsize = (ver == DFS_REFERRAL_V3) ? DFS_REFV3_ENTSZ : DFS_REFV4_ENTSZ;
	rep_bufsize = MBC_MAXBYTES(mbc);
	dfs_pathsz = smb_wcequiv_strlen(referrals->i_uncpath) + 2;
	entsize = hdrsize + dfs_pathsz + dfs_pathsz +
	    smb_dfs_referrals_unclen(referrals, 0);

	if (entsize > rep_bufsize) {
		/* need room for at least one referral */
		return (NT_STATUS_BUFFER_OVERFLOW);
	}

	server_type = (referrals->i_type == DFS_OBJECT_ROOT) ?
	    DFS_SRVTYPE_ROOT : DFS_SRVTYPE_NONROOT;

	rep_bufsize -= entsize;

	for (r = 0; r < referrals->i_ntargets; r++) {
		path_offs = (referrals->i_ntargets - r) * hdrsize;
		altpath_offs = path_offs + dfs_pathsz;
		netpath_offs = altpath_offs + dfs_pathsz + total_targetsz;
		targetsz = smb_dfs_referrals_unclen(referrals, r);

		if (r != 0) {
			entsize = hdrsize + targetsz;
			if (entsize > rep_bufsize)
				/* silently drop targets that do not fit */
				break;
			rep_bufsize -= entsize;
			flags = 0;
		} else if (ver == DFS_REFERRAL_V4) {
			flags = DFS_ENTFLG_T;
		}

		(void) smb_mbc_encodef(mbc, "wwwwlwww16.",
		    ver, hdrsize, server_type, flags,
		    referrals->i_timeout, path_offs, altpath_offs,
		    netpath_offs);

		total_targetsz += targetsz;
	}

	smb_dfs_encode_targets(mbc, referrals);

	return (NT_STATUS_SUCCESS);
}
开发者ID:bahamas10,项目名称:openzfs,代码行数:65,代码来源:smb_dfs.c


示例5: audioixp_sync

/*
 * audioixp_sync()
 *
 * Description:
 *	This is called by the framework to synchronize DMA caches.
 *
 * Arguments:
 *	void	*arg		The DMA engine to sync
 */
static void
audioixp_sync(void *arg, unsigned nframes)
{
	audioixp_port_t *port = arg;
	_NOTE(ARGUNUSED(nframes));

	(void) ddi_dma_sync(port->samp_dmah, 0, 0, port->sync_dir);
}
开发者ID:MatiasNAmendola,项目名称:AuroraUX-SunOS,代码行数:17,代码来源:audioixp.c


示例6: ctfsrc_collect_types_cb

static int
ctfsrc_collect_types_cb(ctf_id_t id, boolean_t root, void *arg)
{
	_NOTE(ARGUNUSED(root, arg));
	(void) ctf_type_name(g_fp, id, idnames[id].ci_name,
	    sizeof (idnames[id].ci_name));
	idnames[id].ci_id = id;
	return (0);
}
开发者ID:jasonbking,项目名称:illumos-gate,代码行数:9,代码来源:ctfdump.c


示例7: rge_intr

uint_t
rge_intr(caddr_t arg1, caddr_t arg2)
{
	rge_t *rgep = (rge_t *)arg1;
	uint16_t int_status;

	_NOTE(ARGUNUSED(arg2))

	mutex_enter(rgep->genlock);

	if (rgep->suspended) {
		mutex_exit(rgep->genlock);
		return (DDI_INTR_UNCLAIMED);
	}

	/*
	 * Was this interrupt caused by our device...
	 */
	int_status = rge_reg_get16(rgep, INT_STATUS_REG);
	if (!(int_status & rgep->int_mask)) {
		mutex_exit(rgep->genlock);
		return (DDI_INTR_UNCLAIMED);
				/* indicate it wasn't our interrupt */
	}
	rgep->stats.intr++;

	/*
	 * Clear interrupt
	 *	For PCIE chipset, we need disable interrupt first.
	 */
	if (rgep->chipid.is_pcie)
		rge_reg_put16(rgep, INT_MASK_REG, INT_MASK_NONE);
	rge_reg_put16(rgep, INT_STATUS_REG, int_status);

	/*
	 * Cable link change interrupt
	 */
	if (int_status & LINK_CHANGE_INT) {
		rge_chip_cyclic(rgep);
	}

	mutex_exit(rgep->genlock);

	/*
	 * Receive interrupt
	 */
	if (int_status & RGE_RX_INT)
		rge_receive(rgep);

	/*
	 * Re-enable interrupt for PCIE chipset
	 */
	if (rgep->chipid.is_pcie)
		rge_reg_put16(rgep, INT_MASK_REG, rgep->int_mask);

	return (DDI_INTR_CLAIMED);	/* indicate it was our interrupt */
}
开发者ID:MatiasNAmendola,项目名称:AuroraUX-SunOS,代码行数:57,代码来源:rge_chip.c


示例8: siena_mon_reconfigure

	__checkReturn	int
siena_mon_reconfigure(
	__in		efx_nic_t *enp)
{
	_NOTE(ARGUNUSED(enp))
	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA);

	return (0);
}
开发者ID:dcui,项目名称:FreeBSD-9.3_kernel,代码行数:9,代码来源:siena_mon.c


示例9: smb2_qif_tags

/*
 * FileAttributeTagInformation
 *
 * If dattr includes FILE_ATTRIBUTE_REPARSE_POINT, the
 * second dword should be the reparse tag.  Otherwise
 * the tag value should be set to zero.
 * We don't support reparse points, so we set the tag
 * to zero.
 */
static uint32_t
smb2_qif_tags(smb_request_t *sr, smb_queryinfo_t *qi)
{
	_NOTE(ARGUNUSED(qi))
	(void) smb_mbc_encodef(
	    &sr->raw_data, "ll", 0, 0);

	return (0);
}
开发者ID:libkeiser,项目名称:illumos-nexenta,代码行数:18,代码来源:smb2_qinfo_file.c


示例10: acpinex_err_callback

/*
 * FMA error callback.
 * Register error handling callback with our parent. We will just call
 * our children's error callbacks and return their status.
 */
static int
acpinex_err_callback(dev_info_t *dip, ddi_fm_error_t *derr,
    const void *impl_data)
{
	_NOTE(ARGUNUSED(impl_data));

	/* Call our childrens error handlers */
	return (ndi_fm_handler_dispatch(dip, NULL, derr));
}
开发者ID:metricinc,项目名称:illumos-gate,代码行数:14,代码来源:acpinex_drv.c


示例11: oce_wqm_dtor

static void
oce_wqm_dtor(struct oce_wq *wq, oce_wq_mdesc_t *wqmd)
{
	_NOTE(ARGUNUSED(wq));
	/* Free the DMA handle */
	if (wqmd->dma_handle != NULL)
		(void) ddi_dma_free_handle(&(wqmd->dma_handle));
	wqmd->dma_handle = NULL;
} /* oce_wqm_dtor */
开发者ID:apprisi,项目名称:illumos-gate,代码行数:9,代码来源:oce_tx.c


示例12: ath_hal_printf

void
ath_hal_printf(struct ath_hal *ah, const char *fmt, ...)
{
	va_list ap;

	_NOTE(ARGUNUSED(ah))
	va_start(ap, fmt);
	vcmn_err(CE_CONT, fmt, ap);
	va_end(ap);
}
开发者ID:andreiw,项目名称:polaris,代码行数:10,代码来源:ath_osdep.c


示例13: igb_tx_copy

/*
 * igb_tx_copy
 *
 * Copy the mblk fragment to the pre-allocated tx buffer
 */
static int
igb_tx_copy(igb_tx_ring_t *tx_ring, tx_control_block_t *tcb, mblk_t *mp,
    uint32_t len, boolean_t copy_done)
{
	dma_buffer_t *tx_buf;
	uint32_t desc_num;
	_NOTE(ARGUNUSED(tx_ring));

	tx_buf = &tcb->tx_buf;

	/*
	 * Copy the packet data of the mblk fragment into the
	 * pre-allocated tx buffer, which is maintained by the
	 * tx control block.
	 *
	 * Several mblk fragments can be copied into one tx buffer.
	 * The destination address of the current copied fragment in
	 * the tx buffer is next to the end of the previous copied
	 * fragment.
	 */
	if (len > 0) {
		bcopy(mp->b_rptr, tx_buf->address + tx_buf->len, len);

		tx_buf->len += len;
		tcb->frag_num++;
	}

	desc_num = 0;

	/*
	 * If it is the last fragment copied to the current tx buffer,
	 * in other words, if there's no remaining fragment or the remaining
	 * fragment requires a new tx control block to process, we need to
	 * complete the current copy processing by syncing up the current
	 * DMA buffer and saving the descriptor data.
	 */
	if (copy_done) {
		/*
		 * Sync the DMA buffer of the packet data
		 */
		DMA_SYNC(tx_buf, DDI_DMA_SYNC_FORDEV);

		tcb->tx_type = USE_COPY;

		/*
		 * Save the address and length to the private data structure
		 * of the tx control block, which will be used to fill the
		 * tx descriptor ring after all the fragments are processed.
		 */
		igb_save_desc(tcb, tx_buf->dma_address, tx_buf->len);
		desc_num++;
	}

	return (desc_num);
}
开发者ID:gvsurenderreddy,项目名称:illumos-gate,代码行数:60,代码来源:igb_tx.c


示例14: bge_refill

/*
 * Return the specified buffer (srbdp) to the ring it came from (brp).
 *
 * Note:
 *	If the driver is compiled with only one buffer ring *and* one
 *	return ring, then the buffers must be returned in sequence.
 *	In this case, we don't have to consider anything about the
 *	buffer at all; we can simply advance the cyclic counter.  And
 *	we don't even need the refill mutex <rf_lock>, as the caller
 *	will already be holding the (one-and-only) <rx_lock>.
 *
 *	If the driver supports multiple buffer rings, but only one
 *	return ring, the same still applies (to each buffer ring
 *	separately).
 */
static void
bge_refill(bge_t *bgep, buff_ring_t *brp, sw_rbd_t *srbdp)
{
    uint64_t slot;

    _NOTE(ARGUNUSED(srbdp))

    slot = brp->rf_next;
    brp->rf_next = NEXT(slot, brp->desc.nslots);
    bge_mbx_put(bgep, brp->chip_mbx_reg, slot);
}
开发者ID:mikess,项目名称:illumos-gate,代码行数:26,代码来源:bge_recv2.c


示例15: mylogger

/* printflike */
void
mylogger(int pri, const char *format, ...)
{
	_NOTE(ARGUNUSED(pri))
	va_list args;

	va_start(args, format);
	(void) vfprintf(stderr, format, args);
	(void) fprintf(stderr, "\n");
	va_end(args);
}
开发者ID:bahamas10,项目名称:openzfs,代码行数:12,代码来源:getdc_main.c


示例16: _none_mbsinit

static int
_none_mbsinit(const mbstate_t *unused)
{
	_NOTE(ARGUNUSED(unused));

	/*
	 * Encoding is not state dependent - we are always in the
	 * initial state.
	 */
	return (1);
}
开发者ID:NanXiao,项目名称:illumos-joyent,代码行数:11,代码来源:none.c


示例17: rge_param_get

/*
 * Extracts the value from the rge parameter array and prints
 * the parameter value. cp points to the required parameter.
 */
static int
rge_param_get(queue_t *q, mblk_t *mp, caddr_t cp, cred_t *credp)
{
	nd_param_t *ndp;

	_NOTE(ARGUNUSED(q, credp))

	ndp = (nd_param_t *)cp;
	(void) mi_mpprintf(mp, "%d", ndp->ndp_val);

	return (0);
}
开发者ID:MatiasNAmendola,项目名称:AuroraUX-SunOS,代码行数:16,代码来源:rge_ndd.c


示例18: oce_m_propinfo

void
oce_m_propinfo(void *arg, const char *name, mac_prop_id_t pr_num,
    mac_prop_info_handle_t prh)
{
	_NOTE(ARGUNUSED(arg));

	switch (pr_num) {
	case MAC_PROP_AUTONEG:
	case MAC_PROP_EN_AUTONEG:
	case MAC_PROP_ADV_1000FDX_CAP:
	case MAC_PROP_EN_1000FDX_CAP:
	case MAC_PROP_ADV_1000HDX_CAP:
	case MAC_PROP_EN_1000HDX_CAP:
	case MAC_PROP_ADV_100FDX_CAP:
	case MAC_PROP_EN_100FDX_CAP:
	case MAC_PROP_ADV_100HDX_CAP:
	case MAC_PROP_EN_100HDX_CAP:
	case MAC_PROP_ADV_10FDX_CAP:
	case MAC_PROP_EN_10FDX_CAP:
	case MAC_PROP_ADV_10HDX_CAP:
	case MAC_PROP_EN_10HDX_CAP:
	case MAC_PROP_ADV_100T4_CAP:
	case MAC_PROP_EN_100T4_CAP:
	case MAC_PROP_ADV_10GFDX_CAP:
	case MAC_PROP_EN_10GFDX_CAP:
	case MAC_PROP_SPEED:
	case MAC_PROP_DUPLEX:
		mac_prop_info_set_perm(prh, MAC_PROP_PERM_READ);
		break;

	case MAC_PROP_MTU:
		mac_prop_info_set_range_uint32(prh, OCE_MIN_MTU, OCE_MAX_MTU);
		break;

	case MAC_PROP_PRIVATE: {
		char valstr[64];
		int value;

		if (strcmp(name, "_tx_ring_size") == 0) {
			value = OCE_DEFAULT_TX_RING_SIZE;
		} else if (strcmp(name, "_rx_ring_size") == 0) {
			value = OCE_DEFAULT_RX_RING_SIZE;
		} else {
			return;
		}

		(void) snprintf(valstr, sizeof (valstr), "%d", value);
		mac_prop_info_set_default_str(prh, valstr);
		mac_prop_info_set_perm(prh, MAC_PROP_PERM_READ);
		break;
	}
	}
} /* oce_m_propinfo */
开发者ID:apprisi,项目名称:illumos-gate,代码行数:53,代码来源:oce_gld.c


示例19: smb2_qif_access

/*
 * FileAccessInformation
 */
static uint32_t
smb2_qif_access(smb_request_t *sr, smb_queryinfo_t *qi)
{
	_NOTE(ARGUNUSED(qi))
	smb_ofile_t *of = sr->fid_ofile;

	(void) smb_mbc_encodef(
	    &sr->raw_data, "l",
	    of->f_granted_access);

	return (0);
}
开发者ID:libkeiser,项目名称:illumos-nexenta,代码行数:15,代码来源:smb2_qinfo_file.c


示例20: towide_none

/*
 * This is used for 8-bit encodings.
 */
int
towide_none(wchar_t *c, const char *mb, unsigned n)
{
	_NOTE(ARGUNUSED(n));

	if (mb_cur_max != 1) {
		werr("invalid or unsupported multibyte locale");
		return (-1);
	}
	*c = (uint8_t)*mb;
	return (1);
}
开发者ID:drscream,项目名称:illumos-joyent,代码行数:15,代码来源:wide.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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