Hex Artifact Content
Not logged in

Artifact 03d4425c71322030839fd3ff4c24cb5bdc377313:


0000: 2f 2a 3d 3d 3d 2d 2d 20 61 74 6f 6d 69 63 5f 73  /*===-- atomic_s
0010: 69 67 6e 61 6c 5f 66 65 6e 63 65 2e 63 20 2d 2d  ignal_fence.c --
0020: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0030: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0040: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 3d 3d 3d  -------------===
0050: 0a 20 2a 0a 20 2a 20 20 20 20 20 20 20 20 20 20  . *. *          
0060: 20 20 20 20 20 20 20 20 20 20 20 54 68 65 20 4c             The L
0070: 4c 56 4d 20 43 6f 6d 70 69 6c 65 72 20 49 6e 66  LVM Compiler Inf
0080: 72 61 73 74 72 75 63 74 75 72 65 0a 20 2a 0a 20  rastructure. *. 
0090: 2a 20 54 68 69 73 20 66 69 6c 65 20 69 73 20 64  * This file is d
00a0: 75 61 6c 20 6c 69 63 65 6e 73 65 64 20 75 6e 64  ual licensed und
00b0: 65 72 20 74 68 65 20 4d 49 54 20 61 6e 64 20 74  er the MIT and t
00c0: 68 65 20 55 6e 69 76 65 72 73 69 74 79 20 6f 66  he University of
00d0: 20 49 6c 6c 69 6e 6f 69 73 20 4f 70 65 6e 0a 20   Illinois Open. 
00e0: 2a 20 53 6f 75 72 63 65 20 4c 69 63 65 6e 73 65  * Source License
00f0: 73 2e 20 53 65 65 20 4c 49 43 45 4e 53 45 2e 54  s. See LICENSE.T
0100: 58 54 20 66 6f 72 20 64 65 74 61 69 6c 73 2e 0a  XT for details..
0110: 20 2a 0a 20 2a 3d 3d 3d 2d 2d 2d 2d 2d 2d 2d 2d   *. *===--------
0120: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0130: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0140: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0150: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0160: 3d 3d 3d 0a 20 2a 0a 20 2a 20 54 68 69 73 20 66  ===. *. * This f
0170: 69 6c 65 20 69 6d 70 6c 65 6d 65 6e 74 73 20 61  ile implements a
0180: 74 6f 6d 69 63 5f 73 69 67 6e 61 6c 5f 66 65 6e  tomic_signal_fen
0190: 63 65 20 66 72 6f 6d 20 43 31 31 27 73 20 73 74  ce from C11's st
01a0: 64 61 74 6f 6d 69 63 2e 68 2e 0a 20 2a 0a 20 2a  datomic.h.. *. *
01b0: 3d 3d 3d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ===-------------
01c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
01d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
01e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
01f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 3d 3d 3d 0a 20  -----------===. 
0200: 2a 2f 0a 0a 23 69 66 6e 64 65 66 20 5f 5f 68 61  */..#ifndef __ha
0210: 73 5f 69 6e 63 6c 75 64 65 0a 23 64 65 66 69 6e  s_include.#defin
0220: 65 20 5f 5f 68 61 73 5f 69 6e 63 6c 75 64 65 28  e __has_include(
0230: 69 6e 63 29 20 30 0a 23 65 6e 64 69 66 0a 0a 23  inc) 0.#endif..#
0240: 69 66 20 5f 5f 68 61 73 5f 69 6e 63 6c 75 64 65  if __has_include
0250: 28 3c 73 74 64 61 74 6f 6d 69 63 2e 68 3e 29 0a  (<stdatomic.h>).
0260: 0a 23 69 6e 63 6c 75 64 65 20 3c 73 74 64 61 74  .#include <stdat
0270: 6f 6d 69 63 2e 68 3e 0a 23 75 6e 64 65 66 20 61  omic.h>.#undef a
0280: 74 6f 6d 69 63 5f 73 69 67 6e 61 6c 5f 66 65 6e  tomic_signal_fen
0290: 63 65 0a 76 6f 69 64 20 61 74 6f 6d 69 63 5f 73  ce.void atomic_s
02a0: 69 67 6e 61 6c 5f 66 65 6e 63 65 28 6d 65 6d 6f  ignal_fence(memo
02b0: 72 79 5f 6f 72 64 65 72 20 6f 72 64 65 72 29 20  ry_order order) 
02c0: 7b 0a 20 20 5f 5f 63 31 31 5f 61 74 6f 6d 69 63  {.  __c11_atomic
02d0: 5f 73 69 67 6e 61 6c 5f 66 65 6e 63 65 28 6f 72  _signal_fence(or
02e0: 64 65 72 29 3b 0a 7d 0a 0a 23 65 6e 64 69 66 0a  der);.}..#endif.