当前位置: 首页>>代码示例>>C++>>正文


C++ DO_OPS函数代码示例

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


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

示例1: vop_nremove

/*
 * nremove takes a locked, resolved ncp that generally represents a
 * positive hit and removes the file.
 *
 * The dvp passed in is referenced but unlocked.
 *
 * The namecache is automatically adjusted by this function.  The ncp
 * is left locked on return.
 *
 * MPSAFE
 */
int
vop_nremove(struct vop_ops *ops, struct nchandle *nch, struct vnode *dvp,
	    struct ucred *cred)
{
	struct vop_nremove_args ap;
	VFS_MPLOCK_DECLARE;
	int error;
	struct vattr va;

	ap.a_head.a_desc = &vop_nremove_desc;
	ap.a_head.a_ops = ops;
	ap.a_nch = nch;
	ap.a_dvp = dvp;
	ap.a_cred = cred;

	if ((error = VOP_GETATTR(nch->ncp->nc_vp, &va)) != 0)
		return (error);

	VFS_MPLOCK1(dvp->v_mount);
	DO_OPS(ops, error, &ap, vop_nremove);
	/* Only update space counters if this is the last hard link */
	if ((error == 0) && (va.va_nlink == 1)) {
		VFS_ACCOUNT(nch->mount, va.va_uid, va.va_gid, -va.va_size);
	}
	VFS_MPUNLOCK(dvp->v_mount);
	return(error);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:38,代码来源:vfs_vopops.c

示例2: vop_open

/*
 * NOTE: VAGE is always cleared when calling VOP_OPEN().
 */
int
vop_open(struct vop_ops *ops, struct vnode *vp, int mode, struct ucred *cred,
	struct file *fp)
{
	struct vop_open_args ap;
	VFS_MPLOCK_DECLARE;
	int error;

	/*
	 * Decrement 3-2-1-0.  Does not decrement beyond 0
	 */
	if (vp->v_flag & VAGE0) {
		vclrflags(vp, VAGE0);
	} else if (vp->v_flag & VAGE1) {
		vclrflags(vp, VAGE1);
		vsetflags(vp, VAGE0);
	}

	ap.a_head.a_desc = &vop_open_desc;
	ap.a_head.a_ops = ops;
	ap.a_vp = vp;
	ap.a_fp = fp;
	ap.a_mode = mode;
	ap.a_cred = cred;

	VFS_MPLOCK1(vp->v_mount);
	DO_OPS(ops, error, &ap, vop_open);
	VFS_MPUNLOCK(vp->v_mount);
	return(error);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:33,代码来源:vfs_vopops.c

示例3: vop_mountctl_ap

int
vop_mountctl_ap(struct vop_mountctl_args *ap)
{
	int error;

	DO_OPS(ap->a_head.a_ops, error, ap, vop_mountctl);
	return(error);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:8,代码来源:vfs_vopops.c

示例4: vop_nlookupdotdot_ap

int
vop_nlookupdotdot_ap(struct vop_nlookupdotdot_args *ap)
{
	int error;

	DO_OPS(ap->a_head.a_ops, error, ap, vop_nlookupdotdot);
	return(error);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:8,代码来源:vfs_vopops.c

示例5: vop_nsymlink_ap

int
vop_nsymlink_ap(struct vop_nsymlink_args *ap)
{
	int error;

	DO_OPS(ap->a_head.a_ops, error, ap, vop_nsymlink);
	return(error);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:8,代码来源:vfs_vopops.c

示例6: vop_nrename_ap

int
vop_nrename_ap(struct vop_nrename_args *ap)
{
	int error;

	DO_OPS(ap->a_head.a_ops, error, ap, vop_nrename);
	return(error);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:8,代码来源:vfs_vopops.c

示例7: vop_kqfilter_ap

int
vop_kqfilter_ap(struct vop_kqfilter_args *ap)
{
	int error;

	DO_OPS(ap->a_head.a_ops, error, ap, vop_kqfilter);
	return(error);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:8,代码来源:vfs_vopops.c

示例8: vop_setextattr_ap

int
vop_setextattr_ap(struct vop_setextattr_args *ap)
{
	int error;

	DO_OPS(ap->a_head.a_ops, error, ap, vop_setextattr);
	return(error);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:8,代码来源:vfs_vopops.c

示例9: vop_freeblks_ap

int
vop_freeblks_ap(struct vop_freeblks_args *ap)
{
	int error;

	DO_OPS(ap->a_head.a_ops, error, ap, vop_freeblks);
	return(error);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:8,代码来源:vfs_vopops.c

示例10: vop_aclcheck_ap

int
vop_aclcheck_ap(struct vop_aclcheck_args *ap)
{
	int error;

	DO_OPS(ap->a_head.a_ops, error, ap, vop_aclcheck);
	return(error);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:8,代码来源:vfs_vopops.c

示例11: vop_balloc_ap

int
vop_balloc_ap(struct vop_balloc_args *ap)
{
	int error;

	DO_OPS(ap->a_head.a_ops, error, ap, vop_balloc);
	return(error);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:8,代码来源:vfs_vopops.c

示例12: vop_putpages_ap

int
vop_putpages_ap(struct vop_putpages_args *ap)
{
	int error;

	DO_OPS(ap->a_head.a_ops, error, ap, vop_putpages);
	return(error);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:8,代码来源:vfs_vopops.c

示例13: vop_pathconf_ap

int
vop_pathconf_ap(struct vop_pathconf_args *ap)
{
	int error;

	DO_OPS(ap->a_head.a_ops, error, ap, vop_pathconf);
	return(error);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:8,代码来源:vfs_vopops.c

示例14: vop_strategy_ap

int
vop_strategy_ap(struct vop_strategy_args *ap)
{
	int error;

	DO_OPS(ap->a_head.a_ops, error, ap, vop_strategy);
	return(error);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:8,代码来源:vfs_vopops.c

示例15: vop_reclaim_ap

int
vop_reclaim_ap(struct vop_reclaim_args *ap)
{
	int error;

	DO_OPS(ap->a_head.a_ops, error, ap, vop_reclaim);
	return(error);
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:8,代码来源:vfs_vopops.c


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