testx.c 582 B

123456789101112131415161718192021222324
  1. // Copyright 2021 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. #include "_cgo_export.h"
  5. void lockOSThreadC(void) {
  6. lockOSThreadCallback();
  7. }
  8. void issue7978c(uint32_t *sync) {
  9. while(__atomic_load_n(sync, __ATOMIC_SEQ_CST) != 0)
  10. ;
  11. __atomic_add_fetch(sync, 1, __ATOMIC_SEQ_CST);
  12. while(__atomic_load_n(sync, __ATOMIC_SEQ_CST) != 2)
  13. ;
  14. issue7978cb();
  15. __atomic_add_fetch(sync, 1, __ATOMIC_SEQ_CST);
  16. while(__atomic_load_n(sync, __ATOMIC_SEQ_CST) != 6)
  17. ;
  18. }
  19. void f7665(void) {
  20. }