sagemath / cysignals

cysignals: interrupt and signal handling for Cython. Source repository for https://pypi.org/project/cysignals/
GNU Lesser General Public License v3.0
44 stars 23 forks source link

struct_signals.h cannot be compiled with -fopenmp #122

Closed kliem closed 3 years ago

kliem commented 3 years ago

From https://trac.sagemath.org/ticket/31245#comment:11

The following from struct_signals.h does not work with -fopenmp:

#if CYSIGNALS_C_ATOMIC || CYSIGNALS_CXX_ATOMIC
 typedef volatile _Atomic int cy_atomic_int;

It fails compiling:

[sagelib-9.3.beta6] /var/lib/buildbot/slave/sage_git/build/local/lib/python3.9/site-packages/cysignals/struct_signals.h:45:1: sorry, unimplemented: ‘_Atomic’ with OpenMP
[sagelib-9.3.beta6]  typedef volatile _Atomic int cy_atomic_int;

This and probably the next check should probably appended by checking whether _OPENMP is compiled.