From nobody Tue Feb 10 02:11:01 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4f94mQ0yxsz6RCW3 for ; Tue, 10 Feb 2026 02:11:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f94mP3nwmz3Kph for ; Tue, 10 Feb 2026 02:11:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770689461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dzm1uzJEZD8YyE2L2RtOyDbwNQIQC0d4RhvE7RnoGFk=; b=SprrsuBF39ago9PKa6ycnM/k+fkWB0Ul6GeuP/ErG8MRa4um5GKChRCEX7Rfu9xkLtSWJz w+t74VZcXKECADlGbl+gD8JeaUo9LFd0sI9XURWj41rmsKE4sJTAQKCsh87AJDUhSUJ0rW m6VaTUVYR9knbaRdonItn4wU1dlUDXqtk2tMhtUhTnl3kpmtR3R40Vr28mN9sPTL13P9qM oKwBke2c5luUuN8JpGNVbe8m7tLngpxO/2V9o/aF8cT916WOIlSR6SNy8v0mn1lTculJAc eLddzZ0lheh2uqon942TfcYufCJvhMxdakLyEUP28UgQtF1EfyYVLcKH6Llf9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1770689461; a=rsa-sha256; cv=none; b=Kxy+4doky7KSQmBp6uz0MW5toLcAHNSRG+vVpqE1PouDsj3VSz+EL1PDcJrnxEI34TFLX9 arU6pzQSZgkAkEhOQAssMzk5uMOOL5te6Gc4HBDYOUc/i3nHkyOMbF/wCJ8nOuE171hSPd zBEwq1IyexUoHswMDVxA2jNzB4fajW2Xh3WGdi6FSdag/W75oDxtJ/+zVzGcya4je+k9gs SpuWx4EXqpEIyidC1mu8acWR1niZSQDlF7sZN/zzro27NR0cpiMeenpkyt9aoCyfCyUnNx 379voRkC1On/gPnhmAtWsnvkpi7MZxXm4MYyAd1PJhsjSGslEbsSCu/tqr1aQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770689461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dzm1uzJEZD8YyE2L2RtOyDbwNQIQC0d4RhvE7RnoGFk=; b=m59fzn01x4bsJXEYzdS8SFSVVoHwiNSQj3KUPQJBPVgVsW65XL4hlNfaWVE0/dSTXT2SNF ic43RhTY7935PE2vSj6moRjyBYj2vgvEh4GYOtjkUNVlYZ20P6LYe7h1CbJuLmLBeldTj/ FGz4mph+sKYuODgbrF6conpAjoinorEJ3yXVIbtkDAMrdWVHBUzncgksrQvLLisNWdLo19 vi2H/GR3F+cyv33w6wsLTN4RfFh03EBxIAIIIWvlUAQ7AFjN79QiBfghT8QP/VmDEd+609 pQIaQdwB4jBhBeEXJbdzoSI7bR1ifig9+YqAQMl8E0r9KeNsUgSil+dwS7qD9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4f94mP3NHjzyv6 for ; Tue, 10 Feb 2026 02:11:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a453 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 10 Feb 2026 02:11:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: ecadac729a1b - main - sys/event.h: reduce namespace pollution from sys/abi_compat.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ecadac729a1b855fe0d77a682ee424c3da1eb3db Auto-Submitted: auto-generated Date: Tue, 10 Feb 2026 02:11:01 +0000 Message-Id: <698a93b5.3a453.439a3c1b@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ecadac729a1b855fe0d77a682ee424c3da1eb3db commit ecadac729a1b855fe0d77a682ee424c3da1eb3db Author: Konstantin Belousov AuthorDate: 2026-02-09 20:13:21 +0000 Commit: Konstantin Belousov CommitDate: 2026-02-10 02:10:11 +0000 sys/event.h: reduce namespace pollution from sys/abi_compat.h Split out types definitions into sys/abi_types.h, and only include abi_types.h into sys/event.h. Tested and reviewed by: bz Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55202 --- sys/dev/mfi/mfi.c | 5 +++-- sys/sys/abi_compat.h | 30 +----------------------------- sys/sys/abi_types.h | 39 +++++++++++++++++++++++++++++++++++++++ sys/sys/event.h | 2 +- 4 files changed, 44 insertions(+), 32 deletions(-) diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c index 474afcff60a7..8ad343d6d813 100644 --- a/sys/dev/mfi/mfi.c +++ b/sys/dev/mfi/mfi.c @@ -52,11 +52,12 @@ * SUCH DAMAGE. */ -#include #include "opt_mfi.h" -#include #include +#ifdef COMPAT_FREEBSD32 +#include +#endif #include #include #include diff --git a/sys/sys/abi_compat.h b/sys/sys/abi_compat.h index f190dcda9b68..e696f0bae9db 100644 --- a/sys/sys/abi_compat.h +++ b/sys/sys/abi_compat.h @@ -4,11 +4,6 @@ * Copyright (c) 2001 Doug Rabson * All rights reserved. * - * Copyright 2026 The FreeBSD Foundation - * - * Portions of this software were developed by Konstantin Belousov - * under sponsorship from the FreeBSD Foundation. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -34,35 +29,12 @@ #ifndef _ABI_COMPAT_H_ #define _ABI_COMPAT_H_ -#include +#include /* * Helper types and macros for translating objects between different ABIs. */ -/* - * i386 is the only arch with a 32-bit time_t. - * Also it is the only arch with (u)int64_t having 4-bytes alignment. - */ -typedef struct { -#ifdef __amd64__ - __uint32_t val[2]; -#else - __uint64_t val; -#endif -} freebsd32_uint64_t; - -#if __SIZEOF_LONG__ == 8 -#if defined __amd64__ -typedef __int32_t time32_t; -#else -typedef __int64_t time32_t; -#endif -#else -typedef __int32_t time32_t; -#endif -#define __HAVE_TIME32_T - #define PTRIN(v) (void *)(uintptr_t)(v) #define PTROUT(v) (uintptr_t)(v) diff --git a/sys/sys/abi_types.h b/sys/sys/abi_types.h new file mode 100644 index 000000000000..e449c86323f7 --- /dev/null +++ b/sys/sys/abi_types.h @@ -0,0 +1,39 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2026 The FreeBSD Foundation + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + */ + +#ifndef _ABI_TYPES_H_ +#define _ABI_TYPES_H_ + +#include + +/* + * i386 is the only arch with a 32-bit time_t. + * Also it is the only arch with (u)int64_t having 4-bytes alignment. + */ +typedef struct { +#ifdef __amd64__ + __uint32_t val[2]; +#else + __uint64_t val; +#endif +} freebsd32_uint64_t; + +#if __SIZEOF_LONG__ == 8 +#if defined __amd64__ +typedef __int32_t time32_t; +#else +typedef __int64_t time32_t; +#endif +#else +typedef __int32_t time32_t; +#endif +#define __HAVE_TIME32_T + +#endif diff --git a/sys/sys/event.h b/sys/sys/event.h index 0ba8e4796208..70d2926d1943 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -104,7 +104,7 @@ struct freebsd11_kevent { #endif #if defined(_WANT_KEVENT32) || defined(_KERNEL) -#include +#include struct kevent32 { __uint32_t ident; /* identifier for this event */