Skip to content

Commit

Permalink
ghost: add BPF helpers for get_affinity and get_comm
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 522460481
  • Loading branch information
Barret Rhoden authored and dohyunkim-dev committed Nov 8, 2023
1 parent 2fdb810 commit 9ca0a1f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion abi/latest/kernel/ghost.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* process are the same version as each other. Each successive version changes
* values in this header file, assumptions about operations in the kernel, etc.
*/
#define GHOST_VERSION 90
#define GHOST_VERSION 91

/*
* Define SCHED_GHOST via the ghost uapi unless it has already been defined
Expand Down
10 changes: 10 additions & 0 deletions third_party/bpf/common.bpf.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@ static long (*bpf_ghost_sync_commit)(struct bpf_dynptr *args) =
(void *)3004;
#endif

#if GHOST_VERSION >= 91
static long (*bpf_ghost_get_affinity)(__s64 gtid, __u8 *mask, __u32 size) =
(void *)3005;
#endif

#if GHOST_VERSION >= 91
static long (*bpf_ghost_get_comm)(__s64 gtid, char *buf, __u32 size) =
(void *)3006;
#endif

#endif // !GHOST_BPF */

#if GHOST_VERSION >= 84
Expand Down

0 comments on commit 9ca0a1f

Please sign in to comment.