mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 00:20:50 +00:00
go1.16 (#14783)
This commit is contained in:
parent
030646eea4
commit
47f6a4ec3f
947 changed files with 26119 additions and 7062 deletions
7
vendor/golang.org/x/sys/windows/svc/security.go
generated
vendored
7
vendor/golang.org/x/sys/windows/svc/security.go
generated
vendored
|
@ -96,6 +96,13 @@ func IsWindowsService() (bool, error) {
|
|||
var psid uint32
|
||||
err := windows.ProcessIdToSessionId(uint32(pbi[5]), &psid)
|
||||
if err != nil {
|
||||
if err == windows.ERROR_INVALID_PARAMETER {
|
||||
// This error happens when Windows cannot find process parent.
|
||||
// Perhaps process parent exited.
|
||||
// Assume we are not running in a service, because service
|
||||
// parent process (services.exe) cannot exit.
|
||||
return false, nil
|
||||
}
|
||||
return false, err
|
||||
}
|
||||
if psid != 0 {
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build windows
|
||||
|
||||
// func servicemain(argc uint32, argv **uint16)
|
||||
TEXT ·servicemain(SB),7,$0
|
||||
MOVL argc+0(FP), AX
|
|
@ -2,8 +2,6 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build windows
|
||||
|
||||
// func servicemain(argc uint32, argv **uint16)
|
||||
TEXT ·servicemain(SB),7,$0
|
||||
MOVQ SP, AX
|
|
@ -2,15 +2,13 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build windows
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
// func servicemain(argc uint32, argv **uint16)
|
||||
TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0
|
||||
MOVM.DB.W [R4, R14], (R13) // push {r4, lr}
|
||||
MOVW R13, R4
|
||||
BIC $0x7, R13 // alignment for ABI
|
||||
MOVW R13, R4
|
||||
BIC $0x7, R13 // alignment for ABI
|
||||
|
||||
MOVW R0, ·sArgc(SB)
|
||||
MOVW R1, ·sArgv(SB)
|
||||
|
@ -19,19 +17,19 @@ TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0
|
|||
MOVW ·ctlHandlerExProc(SB), R1
|
||||
MOVW $0, R2
|
||||
MOVW ·cRegisterServiceCtrlHandlerExW(SB), R3
|
||||
BL (R3)
|
||||
CMP $0, R0
|
||||
BEQ exit
|
||||
BL (R3)
|
||||
CMP $0, R0
|
||||
BEQ exit
|
||||
MOVW R0, ·ssHandle(SB)
|
||||
|
||||
MOVW ·goWaitsH(SB), R0
|
||||
MOVW ·cSetEvent(SB), R1
|
||||
BL (R1)
|
||||
BL (R1)
|
||||
|
||||
MOVW ·cWaitsH(SB), R0
|
||||
MOVW $-1, R1
|
||||
MOVW ·cWaitForSingleObject(SB), R2
|
||||
BL (R2)
|
||||
BL (R2)
|
||||
|
||||
exit:
|
||||
MOVW R4, R13 // free extra stack space
|
31
vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s
generated
vendored
Normal file
31
vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
// Copyright 2018 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
// func servicemain(argc uint32, argv **uint16)
|
||||
TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0
|
||||
MOVD R0, ·sArgc(SB)
|
||||
MOVD R1, ·sArgv(SB)
|
||||
|
||||
MOVD ·sName(SB), R0
|
||||
MOVD ·ctlHandlerExProc(SB), R1
|
||||
MOVD $0, R2
|
||||
MOVD ·cRegisterServiceCtrlHandlerExW(SB), R3
|
||||
BL (R3)
|
||||
CMP $0, R0
|
||||
BEQ exit
|
||||
MOVD R0, ·ssHandle(SB)
|
||||
|
||||
MOVD ·goWaitsH(SB), R0
|
||||
MOVD ·cSetEvent(SB), R1
|
||||
BL (R1)
|
||||
|
||||
MOVD ·cWaitsH(SB), R0
|
||||
MOVD $-1, R1
|
||||
MOVD ·cWaitForSingleObject(SB), R2
|
||||
BL (R2)
|
||||
|
||||
exit:
|
||||
RET
|
Loading…
Add table
Add a link
Reference in a new issue