The branch main has been updated by dchagin:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=0d77f6c0c350ae41acc0653a236a76d981773021

commit 0d77f6c0c350ae41acc0653a236a76d981773021
Author:     Dmitry Chagin <[email protected]>
AuthorDate: 2021-08-12 08:55:55 +0000
Commit:     Dmitry Chagin <[email protected]>
CommitDate: 2021-08-12 08:55:55 +0000

    linux(4): Add LINUX_RATELIMIT_MSG macro for future use.
    
    Differential Revision:  https://reviews.freebsd.org/D31488
    MFC after:              2 weeks
---
 sys/compat/linux/linux_util.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/sys/compat/linux/linux_util.h b/sys/compat/linux/linux_util.h
index 26ec8a3d4847..994efa88100f 100644
--- a/sys/compat/linux/linux_util.h
+++ b/sys/compat/linux/linux_util.h
@@ -165,6 +165,18 @@ void       linux_free_get_char_devices(char *string);
                }                                       \
        } while (0)
 
+#define LINUX_RATELIMIT_MSG(_message)                          \
+       do {                                                    \
+               static int seen = 0;                            \
+                                                               \
+               if (seen == 0) {                                \
+                       linux_msg(curthread, _message);         \
+                                                               \
+                       if (linux_debug < 3)                    \
+                               seen = 1;                       \
+               }                                               \
+       } while (0)
+
 #define LINUX_RATELIMIT_MSG_OPT1(_message, _opt1)              \
        do {                                                    \
                static int seen = 0;                            \
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "[email protected]"

Reply via email to