Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
596e6f39
Commit
596e6f39
authored
Jun 13, 2012
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[release-branch.go1] syscall: unexport GetCurrentProcessId on Windows
parent
96ab6e4a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
src/pkg/syscall/syscall_windows.go
src/pkg/syscall/syscall_windows.go
+2
-2
src/pkg/syscall/zsyscall_windows_386.go
src/pkg/syscall/zsyscall_windows_386.go
+3
-3
src/pkg/syscall/zsyscall_windows_amd64.go
src/pkg/syscall/zsyscall_windows_amd64.go
+3
-3
No files found.
src/pkg/syscall/syscall_windows.go
View file @
596e6f39
...
...
@@ -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.G
etCurrentProcessId
//sys
getCurrentProcessId() (pid uint32) = kernel32.g
etCurrentProcessId
// syscall interface implementation for other packages
...
...
@@ -684,7 +684,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
(
G
etCurrentProcessId
())
}
func
Getpid
()
(
pid
int
)
{
return
int
(
g
etCurrentProcessId
())
}
func
FindFirstFile
(
name
*
uint16
,
data
*
Win32finddata
)
(
handle
Handle
,
err
error
)
{
// NOTE(rsc): The Win32finddata struct is wrong for the system call:
...
...
src/pkg/syscall/zsyscall_windows_386.go
View file @
596e6f39
...
...
@@ -142,7 +142,7 @@ var (
procOpenProcessToken
=
modadvapi32
.
NewProc
(
"OpenProcessToken"
)
procGetTokenInformation
=
modadvapi32
.
NewProc
(
"GetTokenInformation"
)
procGetUserProfileDirectoryW
=
moduserenv
.
NewProc
(
"GetUserProfileDirectoryW"
)
proc
GetCurrentProcessId
=
modkernel32
.
NewProc
(
"G
etCurrentProcessId"
)
proc
getCurrentProcessId
=
modkernel32
.
NewProc
(
"g
etCurrentProcessId"
)
)
func
GetLastError
()
(
lasterr
error
)
{
...
...
@@ -1602,8 +1602,8 @@ func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) {
return
}
func
G
etCurrentProcessId
()
(
pid
uint32
)
{
r0
,
_
,
_
:=
Syscall
(
proc
G
etCurrentProcessId
.
Addr
(),
0
,
0
,
0
,
0
)
func
g
etCurrentProcessId
()
(
pid
uint32
)
{
r0
,
_
,
_
:=
Syscall
(
proc
g
etCurrentProcessId
.
Addr
(),
0
,
0
,
0
,
0
)
pid
=
uint32
(
r0
)
return
}
src/pkg/syscall/zsyscall_windows_amd64.go
View file @
596e6f39
...
...
@@ -142,7 +142,7 @@ var (
procOpenProcessToken
=
modadvapi32
.
NewProc
(
"OpenProcessToken"
)
procGetTokenInformation
=
modadvapi32
.
NewProc
(
"GetTokenInformation"
)
procGetUserProfileDirectoryW
=
moduserenv
.
NewProc
(
"GetUserProfileDirectoryW"
)
proc
GetCurrentProcessId
=
modkernel32
.
NewProc
(
"G
etCurrentProcessId"
)
proc
getCurrentProcessId
=
modkernel32
.
NewProc
(
"g
etCurrentProcessId"
)
)
func
GetLastError
()
(
lasterr
error
)
{
...
...
@@ -1602,8 +1602,8 @@ func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) {
return
}
func
G
etCurrentProcessId
()
(
pid
uint32
)
{
r0
,
_
,
_
:=
Syscall
(
proc
G
etCurrentProcessId
.
Addr
(),
0
,
0
,
0
,
0
)
func
g
etCurrentProcessId
()
(
pid
uint32
)
{
r0
,
_
,
_
:=
Syscall
(
proc
g
etCurrentProcessId
.
Addr
(),
0
,
0
,
0
,
0
)
pid
=
uint32
(
r0
)
return
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment