Skip to content

Commit

Permalink
Merge pull request torvalds#41 from dschatzberg/type_rename
Browse files Browse the repository at this point in the history
scx: Rename "type" -> "exit_type"
  • Loading branch information
Byte-Lab authored Aug 2, 2023
2 parents a0943ea + 4c52836 commit 94a5c60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/sched_ext/user_exit_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define __USER_EXIT_INFO_H

struct user_exit_info {
int type;
int exit_type;
char reason[128];
char msg[1024];
};
Expand All @@ -27,15 +27,15 @@ static inline void uei_record(struct user_exit_info *uei,
bpf_probe_read_kernel_str(uei->reason, sizeof(uei->reason), ei->reason);
bpf_probe_read_kernel_str(uei->msg, sizeof(uei->msg), ei->msg);
/* use __sync to force memory barrier */
__sync_val_compare_and_swap(&uei->type, uei->type, ei->type);
__sync_val_compare_and_swap(&uei->exit_type, uei->exit_type, ei->type);
}

#else /* !__bpf__ */

static inline bool uei_exited(struct user_exit_info *uei)
{
/* use __sync to force memory barrier */
return __sync_val_compare_and_swap(&uei->type, -1, -1);
return __sync_val_compare_and_swap(&uei->exit_type, -1, -1);
}

static inline void uei_print(const struct user_exit_info *uei)
Expand Down

0 comments on commit 94a5c60

Please sign in to comment.