Skip to content

Commit d55de6d

Browse files
committed
[tailscale] runtime: add func TailscaleCurrentP
Updates #109 Signed-off-by: Brad Fitzpatrick <[email protected]>
1 parent 80e2e47 commit d55de6d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

api/go1.52109.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pkg runtime, func TailscaleCurrentP() int #109

src/runtime/tailscale_runtime.go

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package runtime
2+
3+
// TailscaleCurrentP returns the runtime's currently executing 'p' ID.
4+
//
5+
// See https://github.com/tailscale/go/issues/109.
6+
func TailscaleCurrentP() int {
7+
return int(getg().m.p.ptr().id)
8+
}

0 commit comments

Comments
 (0)