Skip to content

patch: runtime: TailscaleCurrentP #109

@bradfitz

Description

@bradfitz

For tailscale/tailscale#14412 for sharded counters that have high write load, we want a ~"current CPU" hint, even if it's outdated by the time we use it.

+func TailscaleCurrentP() int {
+       return int(getg().m.p.ptr().id)
+}

Commit 161c3b7

/cc @raggi

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions