Can the fastcall & inline function be in the linux kernel?
I would like to define a function that will be called from entry_32.S. It will be called just before the actual call handling function is called.
To avoid the overhead of calling the function and passing parameters, can I declare my_foo as
fastcall inline int my_foo (int n);
/*in entry_32.S*/
pushl %eax
CFI_ADJUST_CFA_OFFSET 4
SAVE_ALL
....
/* My code begins*/
call my_foo
cmpl $0, %eax
jne syscall_wrong
movl PT_ORIG_EAX(%esp), %eax
/* My code ends */
call *sys_call_table(,%eax,4)
+3
source to share