hcsshim.go 792 B

123456789101112131415161718192021222324252627282930
  1. //go:build windows
  2. // Shim for the Host Compute Service (HCS) to manage Windows Server
  3. // containers and Hyper-V containers.
  4. package hcsshim
  5. import (
  6. "golang.org/x/sys/windows"
  7. "github.com/Microsoft/hcsshim/internal/hcserror"
  8. )
  9. //go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go hcsshim.go
  10. //sys SetCurrentThreadCompartmentId(compartmentId uint32) (hr error) = iphlpapi.SetCurrentThreadCompartmentId
  11. const (
  12. // Specific user-visible exit codes
  13. WaitErrExecFailed = 32767
  14. ERROR_GEN_FAILURE = windows.ERROR_GEN_FAILURE
  15. ERROR_SHUTDOWN_IN_PROGRESS = windows.ERROR_SHUTDOWN_IN_PROGRESS
  16. WSAEINVAL = windows.WSAEINVAL
  17. // Timeout on wait calls
  18. TimeoutInfinite = 0xFFFFFFFF
  19. )
  20. type HcsError = hcserror.HcsError