2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
6 .. index:: Environment Variable, Implementation specific setting
10 GOMP_SPINCOUNT -- Set the busy-wait spin count
11 **********************************************
14 Determines how long a threads waits actively with consuming CPU power
15 before waiting passively without consuming CPU power. The value may be
16 either ``INFINITE``, ``INFINITY`` to always wait actively or an
17 integer which gives the number of spins of the busy-wait loop. The
18 integer may optionally be followed by the following suffixes acting
19 as multiplication factors: ``k`` (kilo, thousand), ``M`` (mega,
20 million), ``G`` (giga, billion), or ``T`` (tera, trillion).
21 If undefined, 0 is used when :envvar:`OMP_WAIT_POLICY` is ``PASSIVE``,
22 300,000 is used when :envvar:`OMP_WAIT_POLICY` is undefined and
23 30 billion is used when :envvar:`OMP_WAIT_POLICY` is ``ACTIVE``.
24 If there are more OpenMP threads than available CPUs, 1000 and 100
25 spins are used for :envvar:`OMP_WAIT_POLICY` being ``ACTIVE`` or
26 undefined, respectively; unless the :envvar:`GOMP_SPINCOUNT` is lower
27 or :envvar:`OMP_WAIT_POLICY` is ``PASSIVE``.
30 :ref:`OMP_WAIT_POLICY`