brintos

brintos / linux-shallow public Read only

0
0
Text · 390 B · 2a4647f Raw
19 lines · c
1// SPDX-License-Identifier: GPL-2.02/* Copyright (c) 2020 Facebook */3#include "bpf_iter.h"4#include <bpf/bpf_helpers.h>5 6char _license[] SEC("license") = "GPL";7 8SEC("iter/task")9int dump_task(struct bpf_iter__task *ctx)10{11	struct seq_file *seq = ctx->meta->seq;12	struct task_struct *task = ctx->task;13	int tgid;14 15	tgid = task->tgid;16	bpf_seq_write(seq, &tgid, sizeof(tgid));17	return 0;18}19