/usr/share/cagefs-skeleton/usr/include/linux
#ifndef _LINUX_MEMBARRIER_H #define _LINUX_MEMBARRIER_H /* * linux/membarrier.h * * membarrier system call API * * Copyright (c) 2010, 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /** * enum membarrier_cmd - membarrier system call command * @MEMBARRIER_CMD_QUERY: Query the set of supported commands. It returns * a bitmask of valid commands. * @MEMBARRIER_CMD_GLOBAL: Execute a memory barrier on all running threads. * Upon return from system call, the caller thread * is ensured that all running threads have passed * through a state where all memory accesses to * user-space addresses match program order between * entry to and return from the system call * (non-running threads are de facto in such a * state). This covers threads from all processes * running on the system. This command returns 0. * @MEMBARRIER_CMD_GLOBAL_EXPEDITED: * Execute a memory barrier on all running threads * of all processes which previously registered * with MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED. * Upon return from system call, the caller thread * is ensured that all running threads have passed * through a state where all memory accesses to * user-space addresses match program order between * entry to and return from the system call * (non-running threads are de facto in such a * state). This only covers threads from processes * which registered with * MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED. * This command returns 0. Given that * registration is about the intent to receive * the barriers, it is valid to invoke * MEMBARRIER_CMD_GLOBAL_EXPEDITED from a * non-registered process. * @MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED: * Register the process intent to receive * MEMBARRIER_CMD_GLOBAL_EXPEDITED memory * barriers. Always returns 0. * @MEMBARRIER_CMD_PRIVATE_EXPEDITED: * Execute a memory barrier on each running * thread belonging to the same process as the current * thread. Upon return from system call, the * caller thread is ensured that all its running * threads siblings have passed through a state * where all memory accesses to user-space * addresses match program order between entry * to and return from the system call * (non-running threads are de facto in such a * state). This only covers threads from the * same process as the caller thread. This * command returns 0 on success. The * "expedited" commands complete faster than * the non-expedited ones, they never block, * but have the downside of causing extra * overhead. A process needs to register its * intent to use the private expedited command * prior to using it, otherwise this command * returns -EPERM. * @MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED: * Register the process intent to use * MEMBARRIER_CMD_PRIVATE_EXPEDITED. Always * returns 0. * @MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE: * In addition to provide memory ordering * guarantees described in * MEMBARRIER_CMD_PRIVATE_EXPEDITED, ensure * the caller thread, upon return from system * call, that all its running threads siblings * have executed a core serializing * instruction. (architectures are required to * guarantee that non-running threads issue * core serializing instructions before they * resume user-space execution). This only * covers threads from the same process as the * caller thread. This command returns 0 on * success. The "expedited" commands complete * faster than the non-expedited ones, they * never block, but have the downside of * causing extra overhead. If this command is * not implemented by an architecture, -EINVAL * is returned. A process needs to register its * intent to use the private expedited sync * core command prior to using it, otherwise * this command returns -EPERM. * @MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE: * Register the process intent to use * MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE. * If this command is not implemented by an * architecture, -EINVAL is returned. * Returns 0 on success. * @MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ: * Ensure the caller thread, upon return from * system call, that all its running thread * siblings have any currently running rseq * critical sections restarted if @flags * parameter is 0; if @flags parameter is * MEMBARRIER_CMD_FLAG_CPU, * then this operation is performed only * on CPU indicated by @cpu_id. If this command is * not implemented by an architecture, -EINVAL * is returned. A process needs to register its * intent to use the private expedited rseq * command prior to using it, otherwise * this command returns -EPERM. * @MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ: * Register the process intent to use * MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ. * If this command is not implemented by an * architecture, -EINVAL is returned. * Returns 0 on success. * @MEMBARRIER_CMD_SHARED: * Alias to MEMBARRIER_CMD_GLOBAL. Provided for * header backward compatibility. * * Command to be passed to the membarrier system call. The commands need to * be a single bit each, except for MEMBARRIER_CMD_QUERY which is assigned to * the value 0. */ enum membarrier_cmd { MEMBARRIER_CMD_QUERY = 0, MEMBARRIER_CMD_GLOBAL = (1 << 0), MEMBARRIER_CMD_GLOBAL_EXPEDITED = (1 << 1), MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED = (1 << 2), MEMBARRIER_CMD_PRIVATE_EXPEDITED = (1 << 3), MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED = (1 << 4), MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE = (1 << 5), MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE = (1 << 6), MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ = (1 << 7), MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ = (1 << 8), /* Alias for header backward compatibility. */ MEMBARRIER_CMD_SHARED = MEMBARRIER_CMD_GLOBAL, }; enum membarrier_cmd_flag { MEMBARRIER_CMD_FLAG_CPU = (1 << 0), }; #endif /* _LINUX_MEMBARRIER_H */
.
Edit
..
Edit
a.out.h
Edit
acct.h
Edit
acrn.h
Edit
adb.h
Edit
adfs_fs.h
Edit
affs_hardblocks.h
Edit
agpgart.h
Edit
aio_abi.h
Edit
am437x-vpfe.h
Edit
android
Edit
apm_bios.h
Edit
arcfb.h
Edit
arm_sdei.h
Edit
aspeed-lpc-ctrl.h
Edit
aspeed-p2a-ctrl.h
Edit
atalk.h
Edit
atm.h
Edit
atm_eni.h
Edit
atm_he.h
Edit
atm_idt77105.h
Edit
atm_nicstar.h
Edit
atm_tcp.h
Edit
atm_zatm.h
Edit
atmapi.h
Edit
atmarp.h
Edit
atmbr2684.h
Edit
atmclip.h
Edit
atmdev.h
Edit
atmioc.h
Edit
atmlec.h
Edit
atmmpc.h
Edit
atmppp.h
Edit
atmsap.h
Edit
atmsvc.h
Edit
audit.h
Edit
auto_dev-ioctl.h
Edit
auto_fs.h
Edit
auto_fs4.h
Edit
auxvec.h
Edit
ax25.h
Edit
batadv_packet.h
Edit
batman_adv.h
Edit
baycom.h
Edit
bcm933xx_hcs.h
Edit
bfs_fs.h
Edit
binfmts.h
Edit
bits.h
Edit
blkpg.h
Edit
blktrace_api.h
Edit
blkzoned.h
Edit
bpf.h
Edit
bpf_common.h
Edit
bpf_perf_event.h
Edit
bpfilter.h
Edit
bpqether.h
Edit
bsg.h
Edit
bt-bmc.h
Edit
btf.h
Edit
btrfs.h
Edit
btrfs_tree.h
Edit
byteorder
Edit
cachefiles.h
Edit
caif
Edit
can
Edit
can.h
Edit
capability.h
Edit
capi.h
Edit
cciss_defs.h
Edit
cciss_ioctl.h
Edit
ccs.h
Edit
cdrom.h
Edit
cec-funcs.h
Edit
cec.h
Edit
cfm_bridge.h
Edit
cgroupstats.h
Edit
chio.h
Edit
cifs
Edit
close_range.h
Edit
cm4000_cs.h
Edit
cn_proc.h
Edit
coda.h
Edit
coff.h
Edit
connector.h
Edit
const.h
Edit
coresight-stm.h
Edit
cramfs_fs.h
Edit
cryptouser.h
Edit
cuda.h
Edit
cxl_mem.h
Edit
cycx_cfm.h
Edit
dcbnl.h
Edit
dccp.h
Edit
devlink.h
Edit
dlm.h
Edit
dlm_device.h
Edit
dlm_netlink.h
Edit
dlm_plock.h
Edit
dlmconstants.h
Edit
dm-ioctl.h
Edit
dm-log-userspace.h
Edit
dma-buf.h
Edit
dma-heap.h
Edit
dn.h
Edit
dns_resolver.h
Edit
dpll.h
Edit
dqblk_xfs.h
Edit
dvb
Edit
edd.h
Edit
efs_fs_sb.h
Edit
elf-em.h
Edit
elf-fdpic.h
Edit
elf.h
Edit
errno.h
Edit
errqueue.h
Edit
erspan.h
Edit
ethtool.h
Edit
ethtool_netlink.h
Edit
eventfd.h
Edit
eventpoll.h
Edit
f2fs.h
Edit
fadvise.h
Edit
falloc.h
Edit
fanotify.h
Edit
fb.h
Edit
fcntl.h
Edit
fd.h
Edit
fdreg.h
Edit
fib_rules.h
Edit
fiemap.h
Edit
filter.h
Edit
firewire-cdev.h
Edit
firewire-constants.h
Edit
fou.h
Edit
fpga-dfl.h
Edit
fs.h
Edit
fscrypt.h
Edit
fsi.h
Edit
fsl_hypervisor.h
Edit
fsl_mc.h
Edit
fsmap.h
Edit
fsverity.h
Edit
fuse.h
Edit
futex.h
Edit
gameport.h
Edit
gen_stats.h
Edit
genetlink.h
Edit
genwqe
Edit
gfs2_ondisk.h
Edit
gpio.h
Edit
gsmmux.h
Edit
gtp.h
Edit
handshake.h
Edit
hash_info.h
Edit
hdlc
Edit
hdlc.h
Edit
hdlcdrv.h
Edit
hdreg.h
Edit
hid.h
Edit
hiddev.h
Edit
hidraw.h
Edit
hpet.h
Edit
hsi
Edit
hsr_netlink.h
Edit
hw_breakpoint.h
Edit
hyperv.h
Edit
i2c-dev.h
Edit
i2c.h
Edit
i2o-dev.h
Edit
i8k.h
Edit
icmp.h
Edit
icmpv6.h
Edit
idxd.h
Edit
if.h
Edit
if_addr.h
Edit
if_addrlabel.h
Edit
if_alg.h
Edit
if_arcnet.h
Edit
if_arp.h
Edit
if_bonding.h
Edit
if_bridge.h
Edit
if_cablemodem.h
Edit
if_eql.h
Edit
if_ether.h
Edit
if_fc.h
Edit
if_fddi.h
Edit
if_hippi.h
Edit
if_infiniband.h
Edit
if_link.h
Edit
if_ltalk.h
Edit
if_macsec.h
Edit
if_packet.h
Edit
if_phonet.h
Edit
if_plip.h
Edit
if_ppp.h
Edit
if_pppol2tp.h
Edit
if_pppox.h
Edit
if_slip.h
Edit
if_team.h
Edit
if_tun.h
Edit
if_tunnel.h
Edit
if_vlan.h
Edit
if_x25.h
Edit
if_xdp.h
Edit
ife.h
Edit
igmp.h
Edit
iio
Edit
ila.h
Edit
in.h
Edit
in6.h
Edit
in_route.h
Edit
inet_diag.h
Edit
inotify.h
Edit
input-event-codes.h
Edit
input.h
Edit
io_uring.h
Edit
ioctl.h
Edit
iommufd.h
Edit
ioprio.h
Edit
ip.h
Edit
ip6_tunnel.h
Edit
ip_vs.h
Edit
ipc.h
Edit
ipmi.h
Edit
ipmi_bmc.h
Edit
ipmi_msgdefs.h
Edit
ipmi_ssif_bmc.h
Edit
ipsec.h
Edit
ipv6.h
Edit
ipv6_route.h
Edit
ipx.h
Edit
irqnr.h
Edit
isdn
Edit
iso_fs.h
Edit
isst_if.h
Edit
ivtv.h
Edit
ivtvfb.h
Edit
jffs2.h
Edit
joystick.h
Edit
kcm.h
Edit
kcmp.h
Edit
kcov.h
Edit
kd.h
Edit
kdev_t.h
Edit
kernel-page-flags.h
Edit
kernel.h
Edit
kernelcapi.h
Edit
kexec.h
Edit
keyboard.h
Edit
keyctl.h
Edit
kfd_ioctl.h
Edit
kfd_sysfs.h
Edit
kvm.h
Edit
kvm_para.h
Edit
l2tp.h
Edit
landlock.h
Edit
libc-compat.h
Edit
limits.h
Edit
lirc.h
Edit
llc.h
Edit
loadpin.h
Edit
loop.h
Edit
lp.h
Edit
lsm.h
Edit
lwtunnel.h
Edit
magic.h
Edit
major.h
Edit
map_to_7segment.h
Edit
matroxfb.h
Edit
max2175.h
Edit
mdio.h
Edit
media-bus-format.h
Edit
media.h
Edit
mei.h
Edit
mei_uuid.h
Edit
membarrier.h
Edit
memfd.h
Edit
mempolicy.h
Edit
meye.h
Edit
mii.h
Edit
minix_fs.h
Edit
misc
Edit
mman.h
Edit
mmc
Edit
mmtimer.h
Edit
module.h
Edit
mount.h
Edit
mpls.h
Edit
mpls_iptunnel.h
Edit
mptcp.h
Edit
mptcp_pm.h
Edit
mqueue.h
Edit
mroute.h
Edit
mroute6.h
Edit
mrp_bridge.h
Edit
msdos_fs.h
Edit
msg.h
Edit
mtio.h
Edit
nbd-netlink.h
Edit
nbd.h
Edit
ncsi.h
Edit
ndctl.h
Edit
neighbour.h
Edit
net.h
Edit
net_dropmon.h
Edit
net_namespace.h
Edit
net_tstamp.h
Edit
netconf.h
Edit
netdev.h
Edit
netdevice.h
Edit
netfilter
Edit
netfilter.h
Edit
netfilter_arp
Edit
netfilter_arp.h
Edit
netfilter_bridge
Edit
netfilter_bridge.h
Edit
netfilter_decnet.h
Edit
netfilter_ipv4
Edit
netfilter_ipv4.h
Edit
netfilter_ipv6
Edit
netfilter_ipv6.h
Edit
netlink.h
Edit
netlink_diag.h
Edit
netrom.h
Edit
nexthop.h
Edit
nfc.h
Edit
nfs.h
Edit
nfs2.h
Edit
nfs3.h
Edit
nfs4.h
Edit
nfs4_mount.h
Edit
nfs_fs.h
Edit
nfs_idmap.h
Edit
nfs_mount.h
Edit
nfsacl.h
Edit
nfsd
Edit
nfsd_netlink.h
Edit
nilfs2_api.h
Edit
nilfs2_ondisk.h
Edit
nitro_enclaves.h
Edit
nl80211.h
Edit
nsfs.h
Edit
nubus.h
Edit
nvme_ioctl.h
Edit
nvram.h
Edit
omap3isp.h
Edit
omapfb.h
Edit
oom.h
Edit
openat2.h
Edit
openvswitch.h
Edit
packet_diag.h
Edit
param.h
Edit
parport.h
Edit
patchkey.h
Edit
pci.h
Edit
pci_regs.h
Edit
pcitest.h
Edit
perf_event.h
Edit
personality.h
Edit
pfkeyv2.h
Edit
pfrut.h
Edit
pg.h
Edit
phantom.h
Edit
phonet.h
Edit
pidfd.h
Edit
pkt_cls.h
Edit
pkt_sched.h
Edit
pktcdvd.h
Edit
pmu.h
Edit
poll.h
Edit
posix_acl.h
Edit
posix_acl_xattr.h
Edit
posix_types.h
Edit
ppdev.h
Edit
ppp-comp.h
Edit
ppp-ioctl.h
Edit
ppp_defs.h
Edit
pps.h
Edit
pr.h
Edit
prctl.h
Edit
psample.h
Edit
psci.h
Edit
psp-dbc.h
Edit
psp-sev.h
Edit
ptp_clock.h
Edit
ptrace.h
Edit
qemu_fw_cfg.h
Edit
qnx4_fs.h
Edit
qnxtypes.h
Edit
qrtr.h
Edit
quota.h
Edit
radeonfb.h
Edit
raid
Edit
random.h
Edit
rds.h
Edit
reboot.h
Edit
reiserfs_fs.h
Edit
reiserfs_xattr.h
Edit
remoteproc_cdev.h
Edit
resource.h
Edit
rfkill.h
Edit
rio_cm_cdev.h
Edit
rio_mport_cdev.h
Edit
rkisp1-config.h
Edit
romfs_fs.h
Edit
rose.h
Edit
route.h
Edit
rpl.h
Edit
rpl_iptunnel.h
Edit
rpmsg.h
Edit
rpmsg_types.h
Edit
rseq.h
Edit
rtc.h
Edit
rtnetlink.h
Edit
rxrpc.h
Edit
scc.h
Edit
sched
Edit
sched.h
Edit
scif_ioctl.h
Edit
screen_info.h
Edit
sctp.h
Edit
seccomp.h
Edit
securebits.h
Edit
sed-opal.h
Edit
seg6.h
Edit
seg6_genl.h
Edit
seg6_hmac.h
Edit
seg6_iptunnel.h
Edit
seg6_local.h
Edit
selinux_netlink.h
Edit
sem.h
Edit
serial.h
Edit
serial_core.h
Edit
serial_reg.h
Edit
serio.h
Edit
sev-guest.h
Edit
shm.h
Edit
signal.h
Edit
signalfd.h
Edit
smc.h
Edit
smc_diag.h
Edit
smiapp.h
Edit
snmp.h
Edit
sock_diag.h
Edit
socket.h
Edit
sockios.h
Edit
sonet.h
Edit
sonypi.h
Edit
sound.h
Edit
soundcard.h
Edit
spi
Edit
stat.h
Edit
stddef.h
Edit
stm.h
Edit
string.h
Edit
sunrpc
Edit
surface_aggregator
Edit
suspend_ioctls.h
Edit
swab.h
Edit
switchtec_ioctl.h
Edit
sync_file.h
Edit
synclink.h
Edit
sysctl.h
Edit
sysinfo.h
Edit
target_core_user.h
Edit
taskstats.h
Edit
tc_act
Edit
tc_ematch
Edit
tcp.h
Edit
tcp_metrics.h
Edit
tdx-guest.h
Edit
tee.h
Edit
termios.h
Edit
thermal.h
Edit
time.h
Edit
time_types.h
Edit
timerfd.h
Edit
times.h
Edit
timex.h
Edit
tiocl.h
Edit
tipc.h
Edit
tipc_config.h
Edit
tipc_netlink.h
Edit
tipc_sockets_diag.h
Edit
tls.h
Edit
toshiba.h
Edit
tps6594_pfsm.h
Edit
tty.h
Edit
tty_flags.h
Edit
types.h
Edit
udf_fs_i.h
Edit
udmabuf.h
Edit
udp.h
Edit
uhid.h
Edit
uinput.h
Edit
uio.h
Edit
uleds.h
Edit
ultrasound.h
Edit
um_timetravel.h
Edit
un.h
Edit
unistd.h
Edit
unix_diag.h
Edit
usb
Edit
usbdevice_fs.h
Edit
usbip.h
Edit
userfaultfd.h
Edit
userio.h
Edit
utime.h
Edit
utsname.h
Edit
uuid.h
Edit
uvcvideo.h
Edit
v4l2-common.h
Edit
v4l2-controls.h
Edit
v4l2-dv-timings.h
Edit
v4l2-mediabus.h
Edit
v4l2-subdev.h
Edit
vbox_err.h
Edit
vbox_vmmdev_types.h
Edit
vboxguest.h
Edit
vdpa.h
Edit
vduse.h
Edit
version.h
Edit
veth.h
Edit
vfio.h
Edit
vfio_ccw.h
Edit
vfio_zdev.h
Edit
vhost.h
Edit
vhost_types.h
Edit
videodev2.h
Edit
virtio_9p.h
Edit
virtio_balloon.h
Edit
virtio_blk.h
Edit
virtio_bt.h
Edit
virtio_config.h
Edit
virtio_console.h
Edit
virtio_crypto.h
Edit
virtio_fs.h
Edit
virtio_gpio.h
Edit
virtio_gpu.h
Edit
virtio_i2c.h
Edit
virtio_ids.h
Edit
virtio_input.h
Edit
virtio_iommu.h
Edit
virtio_mem.h
Edit
virtio_mmio.h
Edit
virtio_net.h
Edit
virtio_pci.h
Edit
virtio_pcidev.h
Edit
virtio_pmem.h
Edit
virtio_ring.h
Edit
virtio_rng.h
Edit
virtio_scmi.h
Edit
virtio_scsi.h
Edit
virtio_snd.h
Edit
virtio_types.h
Edit
virtio_vsock.h
Edit
vm_sockets.h
Edit
vm_sockets_diag.h
Edit
vmcore.h
Edit
vsockmon.h
Edit
vt.h
Edit
vtpm_proxy.h
Edit
wait.h
Edit
watch_queue.h
Edit
watchdog.h
Edit
wireguard.h
Edit
wireless.h
Edit
wmi.h
Edit
wwan.h
Edit
x25.h
Edit
xattr.h
Edit
xdp_diag.h
Edit
xfrm.h
Edit
xilinx-v4l2-controls.h
Edit
zorro.h
Edit
zorro_ids.h
Edit