That reminds me. Here is another one
> movl SYMBOL_NAME(sys_call_table)(,%eax,4),%eax
> testl %eax,%eax
> je ret_from_sys_call
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Bletch. Just load empty syscall table entries with the function vector
of a routine that returns -ENOSYS. That saves another 2 or 3 clocks on
every single system call. Even if you dont expand the table.
> testb $0x20,flags(%ebx) # PF_TRACESYS
> jne tracesys
> call *%eax
> movl %eax,EAX(%esp) # save the return value
> ALIGN
> .globl ret_from_sys_call
> ret_from_sys_call:
ret_from_sys_call could be a lot shorter if we had 'fast_ret_from_syscall'
and signal handlers and other stuff called
complex_return();
which swapped the return address or set a single flag that jumped around
all the reschedule, signal and other tests.
Alan