Files
moxa/stdlib/go1_21_sync.go
Marc Vertes 0a5b16cad6 feat: support go1.22
* feat: support go1.22

* Temporary fix for consistency tests due to language change in for loops

* review: clean old files

---------

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2024-03-05 17:56:04 +01:00

47 lines
1.1 KiB
Go

// Code generated by 'yaegi extract sync'. DO NOT EDIT.
//go:build go1.21 && !go1.22
// +build go1.21,!go1.22
package stdlib
import (
"reflect"
"sync"
)
func init() {
Symbols["sync/sync"] = map[string]reflect.Value{
// function, constant and variable definitions
"NewCond": reflect.ValueOf(sync.NewCond),
"OnceFunc": reflect.ValueOf(sync.OnceFunc),
// type definitions
"Cond": reflect.ValueOf((*sync.Cond)(nil)),
"Locker": reflect.ValueOf((*sync.Locker)(nil)),
"Map": reflect.ValueOf((*sync.Map)(nil)),
"Mutex": reflect.ValueOf((*sync.Mutex)(nil)),
"Once": reflect.ValueOf((*sync.Once)(nil)),
"Pool": reflect.ValueOf((*sync.Pool)(nil)),
"RWMutex": reflect.ValueOf((*sync.RWMutex)(nil)),
"WaitGroup": reflect.ValueOf((*sync.WaitGroup)(nil)),
// interface wrapper definitions
"_Locker": reflect.ValueOf((*_sync_Locker)(nil)),
}
}
// _sync_Locker is an interface wrapper for Locker type
type _sync_Locker struct {
IValue interface{}
WLock func()
WUnlock func()
}
func (W _sync_Locker) Lock() {
W.WLock()
}
func (W _sync_Locker) Unlock() {
W.WUnlock()
}