git: 959af5a89b20 - main - sys: make callout.h self-contained
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Dec 2021 11:38:58 UTC
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=959af5a89b205dce41405ec1a52078c7acaca49b commit 959af5a89b205dce41405ec1a52078c7acaca49b Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2021-12-15 19:22:41 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2021-12-17 11:38:34 +0000 sys: make callout.h self-contained Avoid including sys/types.h from sys/_callout.h (as we try to avoid having headers starting with underscores depending on non-underscore headers) by introducing __sbintime_t in sys/_types.h and including that header instead. Reviewed by: imp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33500 --- sys/sys/_callout.h | 5 +++-- sys/sys/_types.h | 1 + sys/sys/types.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/sys/_callout.h b/sys/sys/_callout.h index 1108d8ad74fd..468286ff9fec 100644 --- a/sys/sys/_callout.h +++ b/sys/sys/_callout.h @@ -40,6 +40,7 @@ #ifndef _SYS__CALLOUT_H #define _SYS__CALLOUT_H +#include <sys/_types.h> #include <sys/queue.h> struct lock_object; @@ -56,8 +57,8 @@ struct callout { SLIST_ENTRY(callout) sle; TAILQ_ENTRY(callout) tqe; } c_links; - sbintime_t c_time; /* ticks to the event */ - sbintime_t c_precision; /* delta allowed wrt opt */ + __sbintime_t c_time; /* ticks to the event */ + __sbintime_t c_precision; /* delta allowed wrt opt */ void *c_arg; /* function argument */ callout_func_t *c_func; /* function to call */ struct lock_object *c_lock; /* lock to handle */ diff --git a/sys/sys/_types.h b/sys/sys/_types.h index 1669111a437c..46711a938bc4 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -133,6 +133,7 @@ typedef __uint64_t __nlink_t; /* link count */ typedef __int64_t __off_t; /* file offset */ typedef __int64_t __off64_t; /* file offset (alias) */ typedef __int32_t __pid_t; /* process [group] */ +typedef __int64_t __sbintime_t; typedef __int64_t __rlim_t; /* resource limit - intentionally */ /* signed, because of legacy code */ /* that uses -1 for RLIM_INFINITY */ diff --git a/sys/sys/types.h b/sys/sys/types.h index 58abcf00cebb..66f11aa3e31d 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -193,7 +193,7 @@ typedef __rlim_t rlim_t; /* resource limit */ #define _RLIM_T_DECLARED #endif -typedef __int64_t sbintime_t; +typedef __sbintime_t sbintime_t; typedef __segsz_t segsz_t; /* segment size (in pages) */