1 // Copyright 2012 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 // func servicemain(argc uint32, argv **uint16)
8 TEXT ·servicemain(SB),7,$0
12 SUBQ $32, SP // stack for the first 4 syscall params
15 MOVQ $·servicectlhandler(SB), DX
16 MOVQ ·cRegisterServiceCtrlHandlerW(SB), AX
20 MOVQ AX, ·ssHandle(SB)
22 MOVQ ·goWaitsH(SB), CX
23 MOVQ ·cSetEvent(SB), AX
28 MOVQ ·cWaitForSingleObject(SB), AX
35 // I do not know why, but this seems to be the only way to call
36 // ctlHandlerProc on Windows 7.
38 // func servicectlhandler(ctl uint32) uintptr
39 TEXT ·servicectlhandler(SB),7,$0
40 MOVQ ·ctlHandlerProc(SB), AX