- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for __sync_fetch_and_add (0.19 sec)
-
src/runtime/race/testdata/cgo_test_main.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main /* int sync; void Notify(void) { __sync_fetch_and_add(&sync, 1); } void Wait(void) { while(__sync_fetch_and_add(&sync, 0) == 0) {} } */ import "C" func main() { data := 0 go func() { data = 1 C.Notify() }() C.Wait() _ = data
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 08 04:08:51 UTC 2014 - 415 bytes - Viewed (0) -
src/runtime/testdata/testprogcgo/lockosthread.c
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build !plan9,!windows #include <stdint.h> uint32_t threadExited; void setExited(void *x) { __sync_fetch_and_add(&threadExited, 1);
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 11 17:47:21 UTC 2017 - 301 bytes - Viewed (0)