Skip to content
Snippets Groups Projects
  • Hongyu Wang's avatar
    288bc7b5
    libgomp: Fix default value of GOMP_SPINCOUNT [PR 109062] · 288bc7b5
    Hongyu Wang authored
    When OMP_WAIT_POLICY is not specified, current implementation will cause
    icv flag GOMP_ICV_WAIT_POLICY unset, so global variable wait_policy
    will remain its uninitialized value. Initialize it to -1 to make
    GOMP_SPINCOUNT behavior consistent with its description.
    
    libgomp/ChangeLog:
    
    	PR libgomp/109062
    	* env.c (wait_policy): Initialize to -1.
    	(initialize_icvs): Initialize icvs->wait_policy to -1.
    	* testsuite/libgomp.c-c++-common/pr109062.c: New test.
    288bc7b5
    History
    libgomp: Fix default value of GOMP_SPINCOUNT [PR 109062]
    Hongyu Wang authored
    When OMP_WAIT_POLICY is not specified, current implementation will cause
    icv flag GOMP_ICV_WAIT_POLICY unset, so global variable wait_policy
    will remain its uninitialized value. Initialize it to -1 to make
    GOMP_SPINCOUNT behavior consistent with its description.
    
    libgomp/ChangeLog:
    
    	PR libgomp/109062
    	* env.c (wait_policy): Initialize to -1.
    	(initialize_icvs): Initialize icvs->wait_policy to -1.
    	* testsuite/libgomp.c-c++-common/pr109062.c: New test.