Re: /usr/src/sys/net/if_epair.c:181:6: error: ...

From: Mark Millard <marklmi_at_yahoo.com>
Date: Wed, 23 Mar 2022 03:12:21 UTC
IGNORE THIS: I somehow switched contexts. Wrong
commit referenced!

> On 2022-Mar-22, at 20:06, Mark Millard <marklmi@yahoo.com> wrote:
> 
> On 2022-Mar-22, at 18:26, bob prohaska <fbsd@www.zefox.net> wrote:
> 
>> A Pi2 running 
>> FreeBSD www.zefox.net 12.3-STABLE FreeBSD 12.3-STABLE r371495 GENERIC  arm
>> 
>> stops buildkernel with:
>> --- if_epair.o ---
>> /usr/src/sys/net/if_epair.c:181:6: error: implicit declaration of function 'atomic_testandclear_long' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
>>       if (atomic_testandclear_long(&q->state, BIT_MBUF_QUEUED))
>>           ^
>> 
>> Not sure if this is specific to the Raspberry Pi 2, it didn't show up on a pair of Pi3's
>> and a single Pi4. The system is still using svnlite, info reports
>> root@www:/usr/src # svnlite info
>> Path: .
>> Working Copy Root Path: /usr/src
>> URL: svn://svn.freebsd.org/base/stable/12
>> Relative URL: ^/stable/12
>> Repository Root: svn://svn.freebsd.org/base
>> Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
>> Revision: 371771
>> Node Kind: directory
>> Schedule: normal
>> Last Changed Author: 0mp
>> Last Changed Rev: 371771
>> Last Changed Date: 2022-03-22 15:28:40 -0700 (Tue, 22 Mar 2022)
>> 
>> 
>> Didn't see anything similar on bugs.freebsd.org, if it's worth a bug report or
>> there's a workaround please post. It was built using WITH_META_MODE if that 
>> matters. 
> 
> 
> author	Alexander Motin <mav@FreeBSD.org>	2022-03-16 04:09:09 +0000
> committer	Alexander Motin <mav@FreeBSD.org>	2022-03-23 01:31:17 +0000
> commit	5f81a4619dcf8026ab0ba12ea0bd1e6e36ae8c6c (patch)
> . . .
> 
> Remove "/dev/" from geom name in `gpart add` command.stable/12
> 
> broke things by adding the atomic_testandclear_long usage without
> defining it as well.
> 
> It goes like this:
> 
> path: root/sys/arm/include/atomic.h
> Commit message (Expand)	Author	Age	Files	Lines
> * 	MFC r341787 by hselasky: Implement atomic_swap_xxx() for all platforms.	Andriy Gapon	2019-10-24	1	-0/+7
> * 	Remove arm-specific implementations of atomic_load/store_xxx() now that	Ian Lepore	2017-12-20	1	-27/+0
> . . .
> 
> So not updated in a long time. But for armv7 and the like, it includes:
> 
> path: root/sys/arm/include/atomic-v6.h
> Commit message (Expand)	Author	Age	Files	Lines
> * 	MFC r352938:	Ian Lepore	2019-12-07	1	-100/+256
> * 	MFC r341679:	Michal Meloun	2018-12-14	1	-1/+1
> . . .
> 
> Also not updated in a long time.
> 
> sys/arm/include/atomic-v6.h has various "atomic_testand"
> examples ( sys/arm/include/atomic.h does not ):
> 
> atomic_testandset_32
> atomic_testandset_int
> atomic_testandset_long
> atomic_testandset_64
> 
> But no examples of "atomic_testandclear"
> 





===
Mark Millard
marklmi at yahoo.com