svn commit: r273784 - in head/sys: amd64/ia32 compat/freebsd32 i386/i386 kern net

John Baldwin jhb at freebsd.org
Wed Oct 29 16:02:25 UTC 2014


On Wednesday, October 29, 2014 11:52:30 am Konstantin Belousov wrote:
> On Wed, Oct 29, 2014 at 06:26:42AM +1100, Bruce Evans wrote:
> > On Tue, 28 Oct 2014, Konstantin Belousov wrote:
> > 
> > > Log:
> > >  Replace some calls to fuword() by fueword() with proper error checking.
> > 
> > I just noticed some more API design errors.  The pointer type for new
> > APIs should be [qualifed] wordsize_t *, not [qualified] void *.  Using
> > void * reduces type safety for almost no benefits.  The casuword()
> > family already doesn't use void *.
> casuword() has very limited use, it was invented for umtx, and used
> only there.  That said, I tend to agree with somewhat implicit note
> that base argument for fuword() and family should be vm_offset_t.

I think Bruce is suggesting 'volatile long *' or 'volatile int32_t *'
rather than vm_offset_t.

> Still, lets move by small steps. Below is the patch to add volatile
> qualifier to base, and remove __DEVOLATILE() from kern_umtx.c. I
> converted suword() as well, since I do not see why the same arguments
> which support change for fuword() are not applicable to suword().
> 
> The intr variants are left alone.
> 
> Patch was only compile-tested on x86.

This looks good to me, thanks!

-- 
John Baldwin


More information about the svn-src-head mailing list