mirror of
https://github.com/golang/sys.git
synced 2026-02-08 03:36:03 +03:00
There's no point in adding a function call to retrieve a constant, or worse, a syscall to retrieve a constant. These are fixed and baked so deep into NT they'll never change. So let's benefit from the obvious optimization and make these constants. Go easily inlines the function calls as well. We also take the opportunity to sunset OpenCurrentProcessToken and restore its original behavior, since users should be invoking this deliberately with the correct access mask. Change-Id: I92f7de56c0fcf5b69b59f5a79d2828c7ddf3c8f6 Reviewed-on: https://go-review.googlesource.com/c/sys/+/196800 Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>