Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/linux
File: membarrier.h
#ifndef _LINUX_MEMBARRIER_H
[0] Fix | Delete
#define _LINUX_MEMBARRIER_H
[1] Fix | Delete
[2] Fix | Delete
/*
[3] Fix | Delete
* linux/membarrier.h
[4] Fix | Delete
*
[5] Fix | Delete
* membarrier system call API
[6] Fix | Delete
*
[7] Fix | Delete
* Copyright (c) 2010, 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
[8] Fix | Delete
*
[9] Fix | Delete
* Permission is hereby granted, free of charge, to any person obtaining a copy
[10] Fix | Delete
* of this software and associated documentation files (the "Software"), to deal
[11] Fix | Delete
* in the Software without restriction, including without limitation the rights
[12] Fix | Delete
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
[13] Fix | Delete
* copies of the Software, and to permit persons to whom the Software is
[14] Fix | Delete
* furnished to do so, subject to the following conditions:
[15] Fix | Delete
*
[16] Fix | Delete
* The above copyright notice and this permission notice shall be included in
[17] Fix | Delete
* all copies or substantial portions of the Software.
[18] Fix | Delete
*
[19] Fix | Delete
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
[20] Fix | Delete
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
[21] Fix | Delete
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
[22] Fix | Delete
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
[23] Fix | Delete
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
[24] Fix | Delete
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
[25] Fix | Delete
* SOFTWARE.
[26] Fix | Delete
*/
[27] Fix | Delete
[28] Fix | Delete
/**
[29] Fix | Delete
* enum membarrier_cmd - membarrier system call command
[30] Fix | Delete
* @MEMBARRIER_CMD_QUERY: Query the set of supported commands. It returns
[31] Fix | Delete
* a bitmask of valid commands.
[32] Fix | Delete
* @MEMBARRIER_CMD_GLOBAL: Execute a memory barrier on all running threads.
[33] Fix | Delete
* Upon return from system call, the caller thread
[34] Fix | Delete
* is ensured that all running threads have passed
[35] Fix | Delete
* through a state where all memory accesses to
[36] Fix | Delete
* user-space addresses match program order between
[37] Fix | Delete
* entry to and return from the system call
[38] Fix | Delete
* (non-running threads are de facto in such a
[39] Fix | Delete
* state). This covers threads from all processes
[40] Fix | Delete
* running on the system. This command returns 0.
[41] Fix | Delete
* @MEMBARRIER_CMD_GLOBAL_EXPEDITED:
[42] Fix | Delete
* Execute a memory barrier on all running threads
[43] Fix | Delete
* of all processes which previously registered
[44] Fix | Delete
* with MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED.
[45] Fix | Delete
* Upon return from system call, the caller thread
[46] Fix | Delete
* is ensured that all running threads have passed
[47] Fix | Delete
* through a state where all memory accesses to
[48] Fix | Delete
* user-space addresses match program order between
[49] Fix | Delete
* entry to and return from the system call
[50] Fix | Delete
* (non-running threads are de facto in such a
[51] Fix | Delete
* state). This only covers threads from processes
[52] Fix | Delete
* which registered with
[53] Fix | Delete
* MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED.
[54] Fix | Delete
* This command returns 0. Given that
[55] Fix | Delete
* registration is about the intent to receive
[56] Fix | Delete
* the barriers, it is valid to invoke
[57] Fix | Delete
* MEMBARRIER_CMD_GLOBAL_EXPEDITED from a
[58] Fix | Delete
* non-registered process.
[59] Fix | Delete
* @MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED:
[60] Fix | Delete
* Register the process intent to receive
[61] Fix | Delete
* MEMBARRIER_CMD_GLOBAL_EXPEDITED memory
[62] Fix | Delete
* barriers. Always returns 0.
[63] Fix | Delete
* @MEMBARRIER_CMD_PRIVATE_EXPEDITED:
[64] Fix | Delete
* Execute a memory barrier on each running
[65] Fix | Delete
* thread belonging to the same process as the current
[66] Fix | Delete
* thread. Upon return from system call, the
[67] Fix | Delete
* caller thread is ensured that all its running
[68] Fix | Delete
* threads siblings have passed through a state
[69] Fix | Delete
* where all memory accesses to user-space
[70] Fix | Delete
* addresses match program order between entry
[71] Fix | Delete
* to and return from the system call
[72] Fix | Delete
* (non-running threads are de facto in such a
[73] Fix | Delete
* state). This only covers threads from the
[74] Fix | Delete
* same process as the caller thread. This
[75] Fix | Delete
* command returns 0 on success. The
[76] Fix | Delete
* "expedited" commands complete faster than
[77] Fix | Delete
* the non-expedited ones, they never block,
[78] Fix | Delete
* but have the downside of causing extra
[79] Fix | Delete
* overhead. A process needs to register its
[80] Fix | Delete
* intent to use the private expedited command
[81] Fix | Delete
* prior to using it, otherwise this command
[82] Fix | Delete
* returns -EPERM.
[83] Fix | Delete
* @MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED:
[84] Fix | Delete
* Register the process intent to use
[85] Fix | Delete
* MEMBARRIER_CMD_PRIVATE_EXPEDITED. Always
[86] Fix | Delete
* returns 0.
[87] Fix | Delete
* @MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE:
[88] Fix | Delete
* In addition to provide memory ordering
[89] Fix | Delete
* guarantees described in
[90] Fix | Delete
* MEMBARRIER_CMD_PRIVATE_EXPEDITED, ensure
[91] Fix | Delete
* the caller thread, upon return from system
[92] Fix | Delete
* call, that all its running threads siblings
[93] Fix | Delete
* have executed a core serializing
[94] Fix | Delete
* instruction. (architectures are required to
[95] Fix | Delete
* guarantee that non-running threads issue
[96] Fix | Delete
* core serializing instructions before they
[97] Fix | Delete
* resume user-space execution). This only
[98] Fix | Delete
* covers threads from the same process as the
[99] Fix | Delete
* caller thread. This command returns 0 on
[100] Fix | Delete
* success. The "expedited" commands complete
[101] Fix | Delete
* faster than the non-expedited ones, they
[102] Fix | Delete
* never block, but have the downside of
[103] Fix | Delete
* causing extra overhead. If this command is
[104] Fix | Delete
* not implemented by an architecture, -EINVAL
[105] Fix | Delete
* is returned. A process needs to register its
[106] Fix | Delete
* intent to use the private expedited sync
[107] Fix | Delete
* core command prior to using it, otherwise
[108] Fix | Delete
* this command returns -EPERM.
[109] Fix | Delete
* @MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE:
[110] Fix | Delete
* Register the process intent to use
[111] Fix | Delete
* MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE.
[112] Fix | Delete
* If this command is not implemented by an
[113] Fix | Delete
* architecture, -EINVAL is returned.
[114] Fix | Delete
* Returns 0 on success.
[115] Fix | Delete
* @MEMBARRIER_CMD_SHARED:
[116] Fix | Delete
* Alias to MEMBARRIER_CMD_GLOBAL. Provided for
[117] Fix | Delete
* header backward compatibility.
[118] Fix | Delete
*
[119] Fix | Delete
* Command to be passed to the membarrier system call. The commands need to
[120] Fix | Delete
* be a single bit each, except for MEMBARRIER_CMD_QUERY which is assigned to
[121] Fix | Delete
* the value 0.
[122] Fix | Delete
*/
[123] Fix | Delete
enum membarrier_cmd {
[124] Fix | Delete
MEMBARRIER_CMD_QUERY = 0,
[125] Fix | Delete
MEMBARRIER_CMD_GLOBAL = (1 << 0),
[126] Fix | Delete
MEMBARRIER_CMD_GLOBAL_EXPEDITED = (1 << 1),
[127] Fix | Delete
MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED = (1 << 2),
[128] Fix | Delete
MEMBARRIER_CMD_PRIVATE_EXPEDITED = (1 << 3),
[129] Fix | Delete
MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED = (1 << 4),
[130] Fix | Delete
MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE = (1 << 5),
[131] Fix | Delete
MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE = (1 << 6),
[132] Fix | Delete
[133] Fix | Delete
/* Alias for header backward compatibility. */
[134] Fix | Delete
MEMBARRIER_CMD_SHARED = MEMBARRIER_CMD_GLOBAL,
[135] Fix | Delete
};
[136] Fix | Delete
[137] Fix | Delete
#endif /* _LINUX_MEMBARRIER_H */
[138] Fix | Delete
[139] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function