Hello,
Milos Nikic, le ven. 20 juin 2025 18:14:58 +0100, a ecrit:
> This change:
> - Removes the macro aliasing lock_info_sort to lis
> - Moves lock_info_sort before lip() to eliminate the need for a forward
> declaration
> - Updates the call in lip() to refer to lock_info_sort directly
>
> The result is a cleaner and more straightforward structure without changing
> behavior which also fixes a compiler warning.
Applied, thanks.
To be noted: the first line of the git commit should be a small summary
for the commit. I have added this in the commit pushed to the
repository:
lock_mon: clean lip/lis functions
> ---
> kern/lock_mon.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/kern/lock_mon.c b/kern/lock_mon.c
> index 3ca4592c..edc8ae55 100644
> --- a/kern/lock_mon.c
> +++ b/kern/lock_mon.c
> @@ -51,8 +51,6 @@
> #include <ddb/db_sym.h>
> #include <ddb/db_output.h>
>
> -static void lis(int arg, int abs, int count);
> -
> def_simple_lock_data(, kdb_lock)
> def_simple_lock_data(, printf_lock)
>
> @@ -169,12 +167,6 @@ decl_simple_lock_data(, *lock)
> }
> }
>
> -void lip(void) {
> - lis(4, 1, 0);
> -}
> -
> -#define lock_info_sort lis
> -
> static void lock_info_sort(int arg, int abs, int count)
> {
> struct lock_info *li, mean;
> @@ -251,6 +243,10 @@ static void lock_info_sort(int arg, int abs, int count)
> print_lock_info(&mean);
> }
>
> +void lip(void) {
> + lock_info_sort(4, 1, 0);
> +}
> +
> #define lock_info_clear lic
>
> void lock_info_clear(void)
> --
> 2.40.1
>
>
--
Samuel
>Ever heard of .cshrc?
That's a city in Bosnia. Right?
(Discussion in comp.os.linux.misc on the intuitiveness of commands.)