Added nanosleep as per bug 210678.
This commit is contained in:
+4
-2
@@ -248,8 +248,6 @@ _ik_foreign_call:
|
||||
movl 24(%esi), %esp # (movl (pcb-ref 'system-stack) esp)
|
||||
# %esp is the system stack, %eax is the index to the last arg,
|
||||
# %esi is the pcb.
|
||||
# Now, the value of %esp is 16-byte aligned
|
||||
# we always push %esi (4 bytes) and do a call (4 bytes),
|
||||
# 0 args require 6 (2) pushes => argc= 0 (0000): %esp += -8
|
||||
# 1 args require 5 (1) pushes => argc= -4 (1100): %esp += -4
|
||||
# 2 args require 4 (0) pushes => argc= -8 (1000): %esp += 0
|
||||
@@ -269,7 +267,11 @@ L_two:
|
||||
L_one:
|
||||
push $0
|
||||
L_zero:
|
||||
|
||||
# Now, the value of %esp is 16-byte aligned
|
||||
# we always push %esi (4 bytes) and do a call (4 bytes),
|
||||
push %esi # (pushl pcr)
|
||||
|
||||
cmpl $0, %eax # (cmpl (int 0) eax)
|
||||
je L_set # (je (label Lset))
|
||||
L_loop: # (label Lloop)
|
||||
|
||||
@@ -981,6 +981,17 @@ ikrt_exit(ikptr status, ikpcb* pcb){
|
||||
}
|
||||
}
|
||||
|
||||
ikptr
|
||||
ikrt_nanosleep(ikptr secs, ikptr nsecs, ikpcb* pcb){
|
||||
struct timespec t;
|
||||
t.tv_sec =
|
||||
is_fixnum(secs) ? unfix(secs) : ref(secs, off_bignum_data);
|
||||
t.tv_nsec =
|
||||
is_fixnum(nsecs) ? unfix(nsecs) : ref(nsecs, off_bignum_data);
|
||||
return fix(nanosleep(&t, NULL));
|
||||
}
|
||||
|
||||
|
||||
ikptr
|
||||
ikrt_debug(ikptr x){
|
||||
fprintf(stderr, "DEBUG 0x%016lx\n", (long int)x);
|
||||
|
||||
Reference in New Issue
Block a user