Discussion:
Linux memory barriers API
(too old to reply)
M***@hszpo62mi.com
2021-06-17 08:53:23 UTC
Permalink
The Linux memory barrier API which includes the mb(), wmb() etc functions
should be in /usr/include/asm/system.h but on my Debian install there's
no sign of them. Does this API need to be installed seperately or has it been
replaced by something else?
Rainer Weikusat
2021-06-17 14:33:16 UTC
Permalink
Post by M***@hszpo62mi.com
The Linux memory barrier API which includes the mb(), wmb() etc functions
should be in /usr/include/asm/system.h but on my Debian install there's
no sign of them. Does this API need to be installed seperately or has it been
replaced by something else?
The kernel include file defining these is called barrier.h But that's
an internal kernel header and not part of any API.
M***@81nmly1p0vxrc.net
2021-06-17 14:35:22 UTC
Permalink
On Thu, 17 Jun 2021 15:33:16 +0100
Post by Rainer Weikusat
Post by M***@hszpo62mi.com
The Linux memory barrier API which includes the mb(), wmb() etc functions
should be in /usr/include/asm/system.h but on my Debian install there's
no sign of them. Does this API need to be installed seperately or has it been
replaced by something else?
The kernel include file defining these is called barrier.h But that's
an internal kernel header and not part of any API.
Ok, thanks. Thats a shame, obviously I misunderstood, I thought it was a
userspace API.
Scott Lurndal
2021-06-17 15:34:56 UTC
Permalink
Post by M***@hszpo62mi.com
The Linux memory barrier API which includes the mb(), wmb() etc functions
should be in /usr/include/asm/system.h but on my Debian install there's
no sign of them. Does this API need to be installed seperately or has it been
replaced by something else?
Why not use the standard gcc extensions?

The kernel functions were never intended to be used by anything other
than the kernel.
M***@4dg.tv
2021-06-17 15:53:12 UTC
Permalink
On Thu, 17 Jun 2021 15:34:56 GMT
Post by Scott Lurndal
Post by M***@hszpo62mi.com
The Linux memory barrier API which includes the mb(), wmb() etc functions
should be in /usr/include/asm/system.h but on my Debian install there's
no sign of them. Does this API need to be installed seperately or has it been
replaced by something else?
Why not use the standard gcc extensions?
I didn't know there were any.

Loading...