github.com/xushiwei/go@v0.0.0-20130601165731-2b9d83f45bc9/src/pkg/runtime/atomic_amd64.c (about) 1 // Copyright 2009 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 5 #include "runtime.h" 6 7 #pragma textflag 7 8 uint32 9 runtime·atomicload(uint32 volatile* addr) 10 { 11 return *addr; 12 } 13 14 #pragma textflag 7 15 uint64 16 runtime·atomicload64(uint64 volatile* addr) 17 { 18 return *addr; 19 } 20 21 #pragma textflag 7 22 void* 23 runtime·atomicloadp(void* volatile* addr) 24 { 25 return *addr; 26 }