From 8b28a927c3cb2c5ab0edcc11fe3486199e3a3bed Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Sun, 2 Nov 2025 03:27:27 +0530 Subject: [PATCH] Add helpful TODO to PID_TGID emitter --- pythonbpf/helper/bpf_helper_handler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pythonbpf/helper/bpf_helper_handler.py b/pythonbpf/helper/bpf_helper_handler.py index 230d4a8..f755ce9 100644 --- a/pythonbpf/helper/bpf_helper_handler.py +++ b/pythonbpf/helper/bpf_helper_handler.py @@ -322,6 +322,7 @@ def bpf_get_current_pid_tgid_emitter( result = builder.call(fn_ptr, [], tail=False) # Extract the lower 32 bits (PID) using bitwise AND with 0xFFFFFFFF + # TODO: return both PID and TGID if we end up needing TGID somewhere mask = ir.Constant(ir.IntType(64), 0xFFFFFFFF) pid = builder.and_(result, mask) return pid, ir.IntType(64)