本文整理汇总了C++中rump_unschedule函数的典型用法代码示例。如果您正苦于以下问题:C++ rump_unschedule函数的具体用法?C++ rump_unschedule怎么用?C++ rump_unschedule使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rump_unschedule函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ATF_TC_BODY
ATF_TC_BODY(bpfjit_extmem_side_effect, tc)
{
static struct bpf_insn insns[] = {
BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 0), /* A <- P[0] */
BPF_STMT(BPF_LDX+BPF_W+BPF_IMM, 2), /* X <- 2 */
BPF_STMT(BPF_ST, 1), /* M[1] <- A */
BPF_STMT(BPF_ALU+BPF_ADD+BPF_X, 0), /* A <- A + X */
BPF_STMT(BPF_STX, 2), /* M[2] <- X */
BPF_STMT(BPF_ST, 3), /* M[3] <- A */
BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 99), /* A <- P[99] */
BPF_STMT(BPF_RET+BPF_A, 0) /* ret A */
};
bpfjit_func_t code;
uint8_t pkt[1] = { 1 };
uint32_t mem[ctx.extwords];
/* Pre-inited words. */
mem[0] = 0;
mem[3] = 7;
mem[1] = mem[2] = 0xdeadbeef;
bpf_args_t args = {
.pkt = pkt,
.buflen = sizeof(pkt),
.wirelen = sizeof(pkt),
.mem = mem,
};
size_t insn_count = sizeof(insns) / sizeof(insns[0]);
RZ(rump_init());
rump_schedule();
code = rumpns_bpfjit_generate_code(&ctx, insns, insn_count);
rump_unschedule();
ATF_REQUIRE(code != NULL);
ATF_CHECK(code(&ctx, &args) == 0);
rump_schedule();
rumpns_bpfjit_free_code(code);
rump_unschedule();
ATF_CHECK(mem[0] == 0);
ATF_CHECK(mem[1] == 1);
ATF_CHECK(mem[2] == 2);
ATF_CHECK(mem[3] == 3);
}
ATF_TC(bpfjit_extmem_invalid_store);
ATF_TC_HEAD(bpfjit_extmem_invalid_store, tc)
{
atf_tc_set_md_var(tc, "descr", "Test that out-of-range store "
"fails validation");
}
示例2: rump_pub_vattr_setmode
void
rump_pub_vattr_setmode(struct vattr *arg1, mode_t arg2)
{
rump_schedule();
rump_vattr_setmode(arg1, arg2);
rump_unschedule();
}
示例3: rump_pub_vattr_setrdev
void
rump_pub_vattr_setrdev(struct vattr *arg1, dev_t arg2)
{
rump_schedule();
rump_vattr_setrdev(arg1, arg2);
rump_unschedule();
}
示例4: rump_pub_getvninfo
void
rump_pub_getvninfo(struct vnode *arg1, enum rump_vtype *arg2, off_t *arg3, dev_t *arg4)
{
rump_schedule();
rump_getvninfo(arg1, arg2, arg3, arg4);
rump_unschedule();
}
示例5: rump_pub_freecn
void
rump_pub_freecn(struct componentname *arg1, int arg2)
{
rump_schedule();
rump_freecn(arg1, arg2);
rump_unschedule();
}
示例6: rump_pub_vp_interlock
void
rump_pub_vp_interlock(struct vnode *arg1)
{
rump_schedule();
rump_vp_interlock(arg1);
rump_unschedule();
}
示例7: rump_pub_vattr_to_vattr50
void
rump_pub_vattr_to_vattr50(const struct vattr *arg1, struct vattr *arg2)
{
rump_schedule();
rump_vattr_to_vattr50(arg1, arg2);
rump_unschedule();
}
示例8: rump_pub_vattr_settype
void
rump_pub_vattr_settype(struct vattr *arg1, enum rump_vtype arg2)
{
rump_schedule();
rump_vattr_settype(arg1, arg2);
rump_unschedule();
}
示例9: rump_pub_vattr_free
void
rump_pub_vattr_free(struct vattr *arg1)
{
rump_schedule();
rump_vattr_free(arg1);
rump_unschedule();
}
示例10: rump_pub_vfs_syncwait
void
rump_pub_vfs_syncwait(struct mount *arg1)
{
rump_schedule();
rump_vfs_syncwait(arg1);
rump_unschedule();
}
示例11: rump_pub_vp_incref
void
rump_pub_vp_incref(struct vnode *arg1)
{
rump_schedule();
rump_vp_incref(arg1);
rump_unschedule();
}
示例12: rump_pub_vfs_mount_print
void
rump_pub_vfs_mount_print(const char *arg1, int arg2)
{
rump_schedule();
rump_vfs_mount_print(arg1, arg2);
rump_unschedule();
}
示例13: rump_pub_vp_rele
void
rump_pub_vp_rele(struct vnode *arg1)
{
rump_schedule();
rump_vp_rele(arg1);
rump_unschedule();
}
示例14: ATF_TC_BODY
ATF_TC_BODY(kthread, tc)
{
rump_init();
rump_schedule();
rumptest_threadjoin(); /* panics if fails */
rump_unschedule();
}
示例15: ATF_TC_BODY
ATF_TC_BODY(sigignore, tc)
{
rump_boot_setsigmodel(RUMP_SIGMODEL_IGNORE);
rump_init();
rump_schedule();
rumptest_localsig(SIGKILL);
rump_unschedule();
}