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
afd04fdb
Commit
afd04fdb
authored
Sep 24, 2008
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup; sys.sleep can go.
R=r OCL=15786 CL=15792
parent
42b7789a
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
148 additions
and
199 deletions
+148
-199
src/cmd/gc/sys.go
src/cmd/gc/sys.go
+0
-2
src/cmd/gc/sysimport.c
src/cmd/gc/sysimport.c
+148
-153
src/runtime/amd64_darwin.h
src/runtime/amd64_darwin.h
+0
-1
src/runtime/amd64_linux.h
src/runtime/amd64_linux.h
+0
-1
src/runtime/rt1_amd64_darwin.c
src/runtime/rt1_amd64_darwin.c
+0
-10
src/runtime/rt1_amd64_linux.c
src/runtime/rt1_amd64_linux.c
+0
-10
src/runtime/sys_amd64_darwin.s
src/runtime/sys_amd64_darwin.s
+0
-11
src/runtime/sys_amd64_linux.s
src/runtime/sys_amd64_linux.s
+0
-11
No files found.
src/cmd/gc/sys.go
View file @
afd04fdb
...
...
@@ -76,7 +76,6 @@ func writefile(string, string) (bool); // write string into file; boolean status
func
bytestorune
(
*
byte
,
int32
,
int32
)
(
int32
,
int32
);
// convert bytes to runes
func
stringtorune
(
string
,
int32
,
int32
)
(
int32
,
int32
);
// convert bytes to runes
func
sleep
(
ms
int64
);
func
exit
(
int32
);
export
...
...
@@ -163,6 +162,5 @@ export
stringtorune
// system calls
sleep
exit
;
src/cmd/gc/sysimport.c
View file @
afd04fdb
This diff is collapsed.
Click to expand it.
src/runtime/amd64_darwin.h
View file @
afd04fdb
...
...
@@ -51,7 +51,6 @@ struct stat { // really a stat64
void
bsdthread_create
(
void
*
,
M
*
,
G
*
,
void
(
*
)(
void
));
void
bsdthread_register
(
void
);
int64
select
(
int32
,
void
*
,
void
*
,
void
*
,
struct
timeval
*
);
// Mach calls
...
...
src/runtime/amd64_linux.h
View file @
afd04fdb
...
...
@@ -49,5 +49,4 @@ struct stat {
// Linux-specific system calls
int64
futex
(
uint32
*
,
int32
,
uint32
,
struct
timespec
*
,
uint32
*
,
uint32
);
int64
clone
(
int32
,
void
*
,
M
*
,
G
*
,
void
(
*
)(
void
));
int64
select
(
int32
,
void
*
,
void
*
,
void
*
,
struct
timeval
*
);
src/runtime/rt1_amd64_darwin.c
View file @
afd04fdb
...
...
@@ -204,16 +204,6 @@ unimplemented(int8 *name)
*
(
int32
*
)
1231
=
1231
;
}
void
sys
·
sleep
(
int64
ms
)
{
struct
timeval
tv
;
tv
.
tv_sec
=
ms
/
1000
;
tv
.
tv_usec
=
ms
%
1000
*
1000
;
select
(
0
,
nil
,
nil
,
nil
,
&
tv
);
}
// Thread-safe allocation of a semaphore.
// Psema points at a kernel semaphore key.
// It starts out zero, meaning no semaphore.
...
...
src/runtime/rt1_amd64_linux.c
View file @
afd04fdb
...
...
@@ -440,16 +440,6 @@ newosproc(M *m, G *g, void *stk, void (*fn)(void))
*
(
int32
*
)
123
=
123
;
}
void
sys
·
sleep
(
int64
ms
)
{
struct
timeval
tv
;
tv
.
tv_sec
=
ms
/
1000
;
tv
.
tv_usec
=
ms
%
1000
*
1000
;
select
(
0
,
nil
,
nil
,
nil
,
&
tv
);
}
void
osinit
(
void
)
{
...
...
src/runtime/sys_amd64_darwin.s
View file @
afd04fdb
...
...
@@ -189,17 +189,6 @@ TEXT bsdthread_register(SB),7,$-8
CALL
notok
(
SB
)
RET
//
int64
select
(
int32
,
void
*,
void
*,
void
*,
void
*)
TEXT
select
(
SB
),7,$0
MOVL
8
(
SP
),
DI
MOVQ
16
(
SP
),
SI
MOVQ
24
(
SP
),
DX
MOVQ
32
(
SP
),
R10
MOVQ
40
(
SP
),
R8
MOVL
$
(
0x2000000
+
407
),
AX
//
select_nocancel
SYSCALL
RET
//
Mach
system
calls
use
0x1000000
instead
of
the
BSD
's 0x2000000.
//
uint32
mach_msg_trap
(
void
*,
uint32
,
uint32
,
uint32
,
uint32
,
uint32
,
uint32
)
...
...
src/runtime/sys_amd64_linux.s
View file @
afd04fdb
...
...
@@ -182,17 +182,6 @@ TEXT clone(SB),7,$0
SYSCALL
JMP
-
3
(
PC
)
//
keep
exiting
//
int64
select
(
int32
,
void
*,
void
*,
void
*,
struct
timeval
*)
TEXT
select
(
SB
),7,$0
MOVL
8
(
SP
),
DI
MOVQ
16
(
SP
),
SI
MOVQ
24
(
SP
),
DX
MOVQ
32
(
SP
),
R10
MOVQ
40
(
SP
),
R8
MOVL
$
23
,
AX
SYSCALL
RET
TEXT
sigaltstack
(
SB
),7,$-8
MOVQ
new
+
8
(
SP
),
DI
MOVQ
old
+
16
(
SP
),
SI
...
...
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