Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
03934a56
Commit
03934a56
authored
Mar 23, 2012
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syscall: Fix errno handling in syscall.Syscall and friends.
From-SVN: r185746
parent
df32732b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
libgo/go/syscall/syscall_unix.go
+4
-0
No files found.
libgo/go/syscall/syscall_unix.go
View file @
03934a56
...
...
@@ -31,6 +31,7 @@ const darwinAMD64 = runtime.GOOS == "darwin" && runtime.GOARCH == "amd64"
// expects a 32-bit one.
func
Syscall
(
trap
,
a1
,
a2
,
a3
uintptr
)
(
r1
,
r2
uintptr
,
err
Errno
)
{
Entersyscall
()
SetErrno
(
0
)
var
r
uintptr
if
unsafe
.
Sizeof
(
r
)
==
4
{
r1
:=
c_syscall32
(
int32
(
trap
),
int32
(
a1
),
int32
(
a2
),
int32
(
a3
),
0
,
0
,
0
)
...
...
@@ -46,6 +47,7 @@ func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) {
func
Syscall6
(
trap
,
a1
,
a2
,
a3
,
a4
,
a5
,
a6
uintptr
)
(
r1
,
r2
uintptr
,
err
Errno
)
{
Entersyscall
()
SetErrno
(
0
)
var
r
uintptr
if
unsafe
.
Sizeof
(
r
)
==
4
{
r1
:=
c_syscall32
(
int32
(
trap
),
int32
(
a1
),
int32
(
a2
),
int32
(
a3
),
...
...
@@ -63,6 +65,7 @@ func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
func
RawSyscall
(
trap
,
a1
,
a2
,
a3
uintptr
)
(
r1
,
r2
uintptr
,
err
Errno
)
{
var
r
uintptr
SetErrno
(
0
)
if
unsafe
.
Sizeof
(
r
)
==
4
{
r1
:=
c_syscall32
(
int32
(
trap
),
int32
(
a1
),
int32
(
a2
),
int32
(
a3
),
0
,
0
,
0
)
r
=
uintptr
(
r1
)
...
...
@@ -76,6 +79,7 @@ func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) {
func
RawSyscall6
(
trap
,
a1
,
a2
,
a3
,
a4
,
a5
,
a6
uintptr
)
(
r1
,
r2
uintptr
,
err
Errno
)
{
var
r
uintptr
SetErrno
(
0
)
if
unsafe
.
Sizeof
(
r
)
==
4
{
r1
:=
c_syscall32
(
int32
(
trap
),
int32
(
a1
),
int32
(
a2
),
int32
(
a3
),
int32
(
a4
),
int32
(
a5
),
int32
(
a6
))
...
...
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