Debian Codegraph @

src/internal/poll/export_test.go

raw
1 // Copyright 2010 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 // Export guts for testing.
6 // Since testing imports os and os imports internal/poll,
7 // the internal/poll tests can not be in package poll.
8
9 package poll
10
11 var Consume = consume
12
13 type XFDMutex struct {
14 fdMutex
15 }
16
17 func (mu *XFDMutex) Incref() bool {
18 return mu.incref()
19 }
20
21 func (mu *XFDMutex) IncrefAndClose() bool {
22 return mu.increfAndClose()
23 }
24
25 func (mu *XFDMutex) Decref() bool {
26 return mu.decref()
27 }
28
29 func (mu *XFDMutex) RWLock(read bool) bool {
30 return mu.rwlock(read)
31 }
32
33 func (mu *XFDMutex) RWUnlock(read bool) bool {
34 return mu.rwunlock(read)
35 }