Page MenuHomeFreeBSD

linuxkpi: Add `cmpxchg64()` in <asm/atomic.h>
ClosedPublic

Authored by dumbbell on Oct 12 2022, 7:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 22, 1:33 PM
Unknown Object (File)
Tue, Sep 17, 9:44 AM
Unknown Object (File)
Thu, Sep 5, 6:11 AM
Unknown Object (File)
Sun, Sep 1, 12:38 AM
Unknown Object (File)
Aug 2 2024, 3:11 AM
Unknown Object (File)
Jul 24 2024, 2:00 AM
Unknown Object (File)
Jul 23 2024, 11:50 PM
Unknown Object (File)
Jul 4 2024, 8:29 PM

Details

Summary

I defined it as an alias to cmpxchg(), not sure it is correct...

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I'm not sure about making cmpxchg64() an alias of cmpxchg(). It will probably break on 32bit archs.

I'm not sure about making cmpxchg64() an alias of cmpxchg(). It will probably break on 32bit archs.

I think so too.

hselasky added inline comments.
sys/compat/linuxkpi/common/include/asm/atomic.h
221

It's only defined for selected platforms. And will compile time assert if not present!

Should be OK.

manu added inline comments.
sys/compat/linuxkpi/common/include/asm/atomic.h
221

Yes indeed.

This revision is now accepted and ready to land.Dec 1 2022, 1:26 PM
This revision was automatically updated to reflect the committed changes.