From 43a123c1ae6613b3efeed291fa552ecd909d3acf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 16 Apr 2024 21:23:18 +0200 Subject: Adding upstream version 1.20.14. Signed-off-by: Daniel Baumann --- src/internal/poll/export_test.go | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/internal/poll/export_test.go (limited to 'src/internal/poll/export_test.go') diff --git a/src/internal/poll/export_test.go b/src/internal/poll/export_test.go new file mode 100644 index 0000000..66d7c32 --- /dev/null +++ b/src/internal/poll/export_test.go @@ -0,0 +1,35 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Export guts for testing. +// Since testing imports os and os imports internal/poll, +// the internal/poll tests can not be in package poll. + +package poll + +var Consume = consume + +type XFDMutex struct { + fdMutex +} + +func (mu *XFDMutex) Incref() bool { + return mu.incref() +} + +func (mu *XFDMutex) IncrefAndClose() bool { + return mu.increfAndClose() +} + +func (mu *XFDMutex) Decref() bool { + return mu.decref() +} + +func (mu *XFDMutex) RWLock(read bool) bool { + return mu.rwlock(read) +} + +func (mu *XFDMutex) RWUnlock(read bool) bool { + return mu.rwunlock(read) +} -- cgit v1.2.3