Lines Matching refs:ctx
22 struct htab_op_ctx *ctx = arg;
25 while (i++ < ctx->loop && !ctx->stop) {
31 bpf_map_lookup_elem_flags(ctx->fd, &key, &value, BPF_F_LOCK);
39 struct htab_op_ctx *ctx = arg;
42 while (i++ < ctx->loop && !ctx->stop) {
49 bpf_map_update_elem(ctx->fd, &key, &value, BPF_F_LOCK);
50 bpf_map_delete_elem(ctx->fd, &key);
55 bpf_map_update_elem(ctx->fd, &key, &value, BPF_F_LOCK);
56 bpf_map_delete_elem(ctx->fd, &key);
67 struct htab_op_ctx ctx;
74 ctx.fd = bpf_map__fd(skel->maps.htab);
75 ctx.loop = 500;
76 ctx.stop = false;
80 err = pthread_create(&tids[i], NULL, htab_update_fn, &ctx);
82 ctx.stop = true;
87 err = pthread_create(&tids[i + wr_nr], NULL, htab_lookup_fn, &ctx);
89 ctx.stop = true;