~eliasnaur/unik

ref: cd0f505f7c2c06bac9c3655ab38b7bbe2d1761f3 unik/kernel/atomic_amd64.go -rw-r--r-- 355 bytes
cd0f505fElias Naur initial import 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// SPDX-License-Identifier: Unlicense OR MIT

package kernel

//go:noescape
func OrUint8(addr *byte, val byte)

//go:noescape
func StoreUint8(addr *byte, val byte)

//go:noescape
func StoreUint16(addr *uint16, val uint16)

//go:nosplit
func LoadUint16(addr *uint16) uint16 {
	return *addr
}

//go:nosplit
func LoadUint8(addr *byte) byte {
	return *addr
}