"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/runtime/os_windows.go" between
go1.13.5.src.tar.gz and go1.13.6.src.tar.gz

About: Google’s Go is a compiled, garbage-collected, concurrent programming language. Latest stable release (1.13).

os_windows.go  (go1.13.5.src):os_windows.go  (go1.13.6.src)
skipping to change at line 265 skipping to change at line 265
throw("WSAGetOverlappedResult not found") throw("WSAGetOverlappedResult not found")
} }
if windowsFindfunc(n32, []byte("wine_get_version\000")) != nil { if windowsFindfunc(n32, []byte("wine_get_version\000")) != nil {
// running on Wine // running on Wine
initWine(k32) initWine(k32)
} }
} }
func monitorSuspendResume() { func monitorSuspendResume() {
const _DEVICE_NOTIFY_CALLBACK = 2 const (
_DEVICE_NOTIFY_CALLBACK = 2
_ERROR_FILE_NOT_FOUND = 2
)
type _DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS struct { type _DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS struct {
callback uintptr callback uintptr
context uintptr context uintptr
} }
powrprof := windowsLoadSystemLib([]byte("powrprof.dll\000")) powrprof := windowsLoadSystemLib([]byte("powrprof.dll\000"))
if powrprof == 0 { if powrprof == 0 {
return // Running on Windows 7, where we don't need it anyway. return // Running on Windows 7, where we don't need it anyway.
} }
powerRegisterSuspendResumeNotification := windowsFindfunc(powrprof, []byt e("PowerRegisterSuspendResumeNotification\000")) powerRegisterSuspendResumeNotification := windowsFindfunc(powrprof, []byt e("PowerRegisterSuspendResumeNotification\000"))
skipping to change at line 291 skipping to change at line 294
if mp.resumesema != 0 { if mp.resumesema != 0 {
stdcall1(_SetEvent, mp.resumesema) stdcall1(_SetEvent, mp.resumesema)
} }
} }
return 0 return 0
} }
params := _DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS{ params := _DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS{
callback: compileCallback(*efaceOf(&fn), true), callback: compileCallback(*efaceOf(&fn), true),
} }
handle := uintptr(0) handle := uintptr(0)
if stdcall3(powerRegisterSuspendResumeNotification, _DEVICE_NOTIFY_CALLBA ret := stdcall3(powerRegisterSuspendResumeNotification, _DEVICE_NOTIFY_CA
CK, LLBACK,
uintptr(unsafe.Pointer(&params)), uintptr(unsafe.Pointer(&params)), uintptr(unsafe.Pointer(&handle)
uintptr(unsafe.Pointer(&handle))) != 0 { ))
throw("PowerRegisterSuspendResumeNotification failure") // This function doesn't use GetLastError(), so we use the return value d
irectly.
switch ret {
case 0:
return // Successful, nothing more to do.
case _ERROR_FILE_NOT_FOUND:
// Systems without access to the suspend/resume notifier
// also have their clock on "program time", and therefore
// don't want or need this anyway.
return
default:
println("runtime: PowerRegisterSuspendResumeNotification failed w
ith errno=", ret)
throw("runtime: PowerRegisterSuspendResumeNotification failure")
} }
} }
//go:nosplit //go:nosplit
func getLoadLibrary() uintptr { func getLoadLibrary() uintptr {
return uintptr(unsafe.Pointer(_LoadLibraryW)) return uintptr(unsafe.Pointer(_LoadLibraryW))
} }
//go:nosplit //go:nosplit
func getLoadLibraryEx() uintptr { func getLoadLibraryEx() uintptr {
 End of changes. 2 change blocks. 
6 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)