Hi, Hope you're having a wonderful day!
This is a quote form bpf-helpers man page:
u64 bpf_get_current_pid_tgid(void)
Return A 64-bit integer containing the current tgid and pid, created as such: current_task->tgid << 32 | current_task->pid.
As you can see the top 32 bits contain tgid and the bottom 32 bits hold pid of the process.
In the book this is explained the other way around on page 26. The foot note of page 26 also refers to the lower 32 bits as tgid which is incorrect.
Edit: As I continued reading the book I noticed the same situation with hello-buffer-config.py, hello-ring-buffer-config.py and page 61.
Hi, Hope you're having a wonderful day!
This is a quote form bpf-helpers man page:
As you can see the top 32 bits contain tgid and the bottom 32 bits hold pid of the process.
In the book this is explained the other way around on page 26. The foot note of page 26 also refers to the lower 32 bits as tgid which is incorrect.
Edit: As I continued reading the book I noticed the same situation with hello-buffer-config.py, hello-ring-buffer-config.py and page 61.