1
2
3
4
5 package poll
6
7
8
9
10
11
12 type FDMutex struct {
13 fdmu fdMutex
14 }
15
16 func (fdmu *FDMutex) Incref() bool {
17 return fdmu.fdmu.incref()
18 }
19
20 func (fdmu *FDMutex) Decref() bool {
21 return fdmu.fdmu.decref()
22 }
23
24 func (fdmu *FDMutex) IncrefAndClose() bool {
25 return fdmu.fdmu.increfAndClose()
26 }
27
28 func (fdmu *FDMutex) ReadLock() bool {
29 return fdmu.fdmu.rwlock(true)
30 }
31
32 func (fdmu *FDMutex) ReadUnlock() bool {
33 return fdmu.fdmu.rwunlock(true)
34 }
35
36 func (fdmu *FDMutex) WriteLock() bool {
37 return fdmu.fdmu.rwlock(false)
38 }
39
40 func (fdmu *FDMutex) WriteUnlock() bool {
41 return fdmu.fdmu.rwunlock(false)
42 }
43
View as plain text