0001
0002 #include <as-layout.h>
0003
0004 .section .__syscall_stub, "ax"
0005
0006 .globl batch_syscall_stub
0007 batch_syscall_stub:
0008
0009 mov %esp, %ecx
0010
0011 add $8, %esp
0012 again:
0013
0014 mov 0x0(%esp), %eax
0015
0016
0017
0018 mov %eax, 0x4(%ecx)
0019 cmpl $0, %eax
0020 jz done
0021
0022
0023 mov %esp, 0x4(%ecx)
0024
0025
0026 add %eax, %esp
0027
0028
0029 pop %eax
0030
0031
0032 pop %ebx
0033 pop %ecx
0034 pop %edx
0035 pop %esi
0036 pop %edi
0037 pop %ebp
0038
0039
0040 int $0x80
0041
0042
0043 mov %esp, %ecx
0044 andl $(~UM_KERN_PAGE_SIZE) + 1, %ecx
0045
0046
0047 pop %ebx
0048 cmp %ebx, %eax
0049 je again
0050
0051 done:
0052
0053 mov %eax, (%ecx)
0054
0055
0056 int3