...

Source file src/internal/runtime/atomic/atomic_loong64.go

Documentation: internal/runtime/atomic

     1  // Copyright 2022 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  //go:build loong64
     6  
     7  package atomic
     8  
     9  import "unsafe"
    10  
    11  //go:noescape
    12  func Xadd(ptr *uint32, delta int32) uint32
    13  
    14  //go:noescape
    15  func Xadd64(ptr *uint64, delta int64) uint64
    16  
    17  //go:noescape
    18  func Xadduintptr(ptr *uintptr, delta uintptr) uintptr
    19  
    20  //go:noescape
    21  func Xchg(ptr *uint32, new uint32) uint32
    22  
    23  //go:noescape
    24  func Xchg64(ptr *uint64, new uint64) uint64
    25  
    26  //go:noescape
    27  func Xchguintptr(ptr *uintptr, new uintptr) uintptr
    28  
    29  //go:noescape
    30  func Load(ptr *uint32) uint32
    31  
    32  //go:noescape
    33  func Load8(ptr *uint8) uint8
    34  
    35  //go:noescape
    36  func Load64(ptr *uint64) uint64
    37  
    38  // NO go:noescape annotation; *ptr escapes if result escapes (#31525)
    39  func Loadp(ptr unsafe.Pointer) unsafe.Pointer
    40  
    41  //go:noescape
    42  func LoadAcq(ptr *uint32) uint32
    43  
    44  //go:noescape
    45  func LoadAcq64(ptr *uint64) uint64
    46  
    47  //go:noescape
    48  func LoadAcquintptr(ptr *uintptr) uintptr
    49  
    50  //go:noescape
    51  func And8(ptr *uint8, val uint8)
    52  
    53  //go:noescape
    54  func And(ptr *uint32, val uint32)
    55  
    56  //go:noescape
    57  func Or8(ptr *uint8, val uint8)
    58  
    59  //go:noescape
    60  func Or(ptr *uint32, val uint32)
    61  
    62  //go:noescape
    63  func And32(ptr *uint32, val uint32) uint32
    64  
    65  //go:noescape
    66  func Or32(ptr *uint32, val uint32) uint32
    67  
    68  //go:noescape
    69  func And64(ptr *uint64, val uint64) uint64
    70  
    71  //go:noescape
    72  func Or64(ptr *uint64, val uint64) uint64
    73  
    74  //go:noescape
    75  func Anduintptr(ptr *uintptr, val uintptr) uintptr
    76  
    77  //go:noescape
    78  func Oruintptr(ptr *uintptr, val uintptr) uintptr
    79  
    80  // NOTE: Do not add atomicxor8 (XOR is not idempotent).
    81  
    82  //go:noescape
    83  func Cas64(ptr *uint64, old, new uint64) bool
    84  
    85  //go:noescape
    86  func CasRel(ptr *uint32, old, new uint32) bool
    87  
    88  //go:noescape
    89  func Store(ptr *uint32, val uint32)
    90  
    91  //go:noescape
    92  func Store8(ptr *uint8, val uint8)
    93  
    94  //go:noescape
    95  func Store64(ptr *uint64, val uint64)
    96  
    97  // NO go:noescape annotation; see atomic_pointer.go.
    98  func StorepNoWB(ptr unsafe.Pointer, val unsafe.Pointer)
    99  
   100  //go:noescape
   101  func StoreRel(ptr *uint32, val uint32)
   102  
   103  //go:noescape
   104  func StoreRel64(ptr *uint64, val uint64)
   105  
   106  //go:noescape
   107  func StoreReluintptr(ptr *uintptr, val uintptr)
   108  

View as plain text