MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / timeoutFn

Function timeoutFn

pkg/handle/timeout.go:129–148  ·  view source on GitHub ↗

timeoutFn waits for the initial event signalization and then pulls the handle identifier from the input channel. With handle identifier inside the callback function, the object is queried. If the query is successful, the result is pushed to the output channel, and the done event is signaled to indic

(ctx uintptr)

Source from the content-addressed store, hash-verified

127// channel, and the done event is signaled to indicate the object
128// name can be retrieved.
129func timeoutFn(ctx uintptr) uintptr {
130 for {
131 s, err := windows.WaitForSingleObject(tmt.ini, windows.INFINITE)
132 if err != nil || s != windows.WAIT_OBJECT_0 {
133 break
134 }
135 obj, err := QueryObjectName(<-tmt.in)
136 tmt.out <- obj
137 if err != nil {
138 if err := windows.SetEvent(tmt.done); err != nil {
139 break
140 }
141 continue
142 }
143 if err := windows.SetEvent(tmt.done); err != nil {
144 break
145 }
146 }
147 return 0
148}

Callers

nothing calls this directly

Calls 1

QueryObjectNameFunction · 0.85

Tested by

no test coverage detected