Update dependencies and remove old matterclient lib (#2067)

This commit is contained in:
Wim
2023-08-05 20:43:19 +02:00
committed by GitHub
parent 9459495484
commit 56e7bd01ca
772 changed files with 139315 additions and 121315 deletions

View File

@@ -92,13 +92,17 @@ func mutexFromPtr(p uintptr) *mutex {
if p == 0 {
return nil
}
ix := p - 1
mutexes.Lock()
defer mutexes.Unlock()
return &mutexes.a[ix>>8][ix&255]
}
func (m *mutexPool) alloc(recursive bool) uintptr {
m.Lock()
defer m.Unlock()
n := len(m.freeList)
@@ -124,8 +128,8 @@ func (m *mutexPool) free(p uintptr) {
ptr := mutexFromPtr(p)
ix := ptr.poolIndex
*ptr = mutex{}
m.Lock()
m.Lock()
defer m.Unlock()
m.freeList = append(m.freeList, ix)