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
c6afb781
Commit
c6afb781
authored
Nov 26, 2012
by
Joel Sing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: implement SysUnused for openbsd
R=golang-dev, minux.ma CC=golang-dev
https://golang.org/cl/6854079
parent
5da5e8e0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
3 deletions
+24
-3
src/pkg/runtime/defs_openbsd.go
src/pkg/runtime/defs_openbsd.go
+2
-0
src/pkg/runtime/defs_openbsd_386.h
src/pkg/runtime/defs_openbsd_386.h
+2
-0
src/pkg/runtime/defs_openbsd_amd64.h
src/pkg/runtime/defs_openbsd_amd64.h
+2
-0
src/pkg/runtime/mem_openbsd.c
src/pkg/runtime/mem_openbsd.c
+1
-3
src/pkg/runtime/sys_openbsd_386.s
src/pkg/runtime/sys_openbsd_386.s
+7
-0
src/pkg/runtime/sys_openbsd_amd64.s
src/pkg/runtime/sys_openbsd_amd64.s
+10
-0
No files found.
src/pkg/runtime/defs_openbsd.go
View file @
c6afb781
...
...
@@ -34,6 +34,8 @@ const (
MAP_PRIVATE
=
C
.
MAP_PRIVATE
MAP_FIXED
=
C
.
MAP_FIXED
MADV_FREE
=
C
.
MADV_FREE
SA_SIGINFO
=
C
.
SA_SIGINFO
SA_RESTART
=
C
.
SA_RESTART
SA_ONSTACK
=
C
.
SA_ONSTACK
...
...
src/pkg/runtime/defs_openbsd_386.h
View file @
c6afb781
...
...
@@ -12,6 +12,8 @@ enum {
MAP_PRIVATE
=
0x2
,
MAP_FIXED
=
0x10
,
MADV_FREE
=
0x6
,
SA_SIGINFO
=
0x40
,
SA_RESTART
=
0x2
,
SA_ONSTACK
=
0x1
,
...
...
src/pkg/runtime/defs_openbsd_amd64.h
View file @
c6afb781
...
...
@@ -12,6 +12,8 @@ enum {
MAP_PRIVATE
=
0x2
,
MAP_FIXED
=
0x10
,
MADV_FREE
=
0x6
,
SA_SIGINFO
=
0x40
,
SA_RESTART
=
0x2
,
SA_ONSTACK
=
0x1
,
...
...
src/pkg/runtime/mem_openbsd.c
View file @
c6afb781
...
...
@@ -28,9 +28,7 @@ runtime·SysAlloc(uintptr n)
void
runtime
·
SysUnused
(
void
*
v
,
uintptr
n
)
{
USED
(
v
);
USED
(
n
);
// TODO(rsc): call madvise MADV_DONTNEED
runtime
·
madvise
(
v
,
n
,
MADV_FREE
);
}
void
...
...
src/pkg/runtime/sys_openbsd_386.s
View file @
c6afb781
...
...
@@ -84,6 +84,13 @@ TEXT runtime·munmap(SB),7,$-4
MOVL
$
0xf1
,
0xf1
//
crash
RET
TEXT
runtime
·
madvise
(
SB
),7,$-4
MOVL
$
75
,
AX
//
sys_madvise
INT
$
0x80
JAE
2
(
PC
)
MOVL
$
0xf1
,
0xf1
//
crash
RET
TEXT
runtime
·
setitimer
(
SB
),7,$-4
MOVL
$
83
,
AX
INT
$
0x80
...
...
src/pkg/runtime/sys_openbsd_amd64.s
View file @
c6afb781
...
...
@@ -236,6 +236,16 @@ TEXT runtime·munmap(SB),7,$0
MOVL
$
0xf1
,
0xf1
//
crash
RET
TEXT
runtime
·
madvise
(
SB
),7,$0
MOVQ
addr
+
0
(
FP
),
DI
//
arg
1
-
addr
MOVQ
len
+
8
(
FP
),
SI
//
arg
2
-
len
MOVQ
behav
+
16
(
FP
),
DX
//
arg
3
-
behav
MOVQ
$
75
,
AX
//
sys_madvise
SYSCALL
JCC
2
(
PC
)
MOVL
$
0xf1
,
0xf1
//
crash
RET
TEXT
runtime
·
sigaltstack
(
SB
),7,$-8
MOVQ
new
+
8
(
SP
),
DI
//
arg
1
-
nss
MOVQ
old
+
16
(
SP
),
SI
//
arg
2
-
oss
...
...
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