]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: unexport GetCurrentProcessId on Windows
authorRuss Cox <rsc@golang.org>
Fri, 8 Jun 2012 18:28:29 +0000 (14:28 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 8 Jun 2012 18:28:29 +0000 (14:28 -0400)
This slipped in with the implementation of Getpid in CL 5909043.
I'd exclude that CL entirely but it is tangled up in the Win32finddata changes.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/6297065

src/pkg/syscall/syscall_windows.go
src/pkg/syscall/zsyscall_windows_386.go
src/pkg/syscall/zsyscall_windows_amd64.go

index 35f3bbfdc2a27a2deb899741e58f0e96e58ad009..72eedce04fcd9c8ccb1745387c9edfc401d80cd9 100644 (file)
@@ -201,7 +201,7 @@ func NewCallback(fn interface{}) uintptr
 //sys  RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegQueryInfoKeyW
 //sys  RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegEnumKeyExW
 //sys  RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) = advapi32.RegQueryValueExW
-//sys  GetCurrentProcessId() (pid uint32) = kernel32.GetCurrentProcessId
+//sys  getCurrentProcessId() (pid uint32) = kernel32.GetCurrentProcessId
 
 // syscall interface implementation for other packages
 
@@ -702,7 +702,7 @@ func SetsockoptIPMreq(fd Handle, level, opt int, mreq *IPMreq) (err error) {
 }
 func SetsockoptIPv6Mreq(fd Handle, level, opt int, mreq *IPv6Mreq) (err error) { return EWINDOWS }
 
-func Getpid() (pid int) { return int(GetCurrentProcessId()) }
+func Getpid() (pid int) { return int(getCurrentProcessId()) }
 
 func FindFirstFile(name *uint16, data *Win32finddata) (handle Handle, err error) {
        // NOTE(rsc): The Win32finddata struct is wrong for the system call:
index 02be967268b4c6a0ea29c98cb9cce7ae2bd1060f..368fecb8dab16436edd2c2e24cb0826a09feede0 100644 (file)
@@ -1181,7 +1181,7 @@ func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32
        return
 }
 
-func GetCurrentProcessId() (pid uint32) {
+func getCurrentProcessId() (pid uint32) {
        r0, _, _ := Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0)
        pid = uint32(r0)
        return
index 6f95e5296273a140a3b805db12ab27e59814b80d..a6d44eb07c0027cb40305316fe14b4953af6b2d6 100644 (file)
@@ -1181,7 +1181,7 @@ func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32
        return
 }
 
-func GetCurrentProcessId() (pid uint32) {
+func getCurrentProcessId() (pid uint32) {
        r0, _, _ := Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0)
        pid = uint32(r0)
        return