1 /****************************************************************************
2 **
3 **  This file is part of GAP, a system for computational discrete algebra.
4 **
5 **  Copyright of GAP belongs to its developers, whose names are too numerous
6 **  to list here. Please refer to the COPYRIGHT file for details.
7 **
8 **  SPDX-License-Identifier: GPL-2.0-or-later
9 */
10 
11 #ifndef GAP_TLSCONFIG_H
12 #define GAP_TLSCONFIG_H
13 
14 #include "system.h"
15 
16 #if !defined(HPCGAP)
17 #error This header is only meant to be used with HPC-GAP
18 #endif
19 
20 
21 #ifndef HAVE_NATIVE_TLS
22 
23 enum {
24     TLS_SIZE = (sizeof(UInt) == 8) ? (1L << 20) : (1L << 18),
25 };
26 #define TLS_MASK (~(TLS_SIZE - 1L))
27 
28 GAP_STATIC_ASSERT((TLS_SIZE & (TLS_SIZE - 1)) == 0,
29                   "TLS_SIZE must be a power of 2");
30 
31 #endif // HAVE_NATIVE_TLS
32 
33 #endif // GAP_TLSCONFIG_H
34