本文整理匯總了C++中ARGUNUSED函數的典型用法代碼示例。如果您正苦於以下問題:C++ ARGUNUSED函數的具體用法?C++ ARGUNUSED怎麽用?C++ ARGUNUSED使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了ARGUNUSED函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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 */
}
示例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);
}
示例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);
}
示例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));
}
示例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 */
示例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);
}
示例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);
}
示例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);
}
示例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);
}