Commit afd04fdb authored by Russ Cox's avatar Russ Cox

cleanup; sys.sleep can go.

R=r
OCL=15786
CL=15792
parent 42b7789a
......@@ -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
;
This diff is collapsed.
......@@ -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
......
......@@ -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*);
......@@ -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.
......
......@@ -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)
{
......
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment