2 * $DragonFly: src/test/sysperf/upcall.S,v 1.2 2003/11/21 08:32:45 dillon Exp $
5 .globl callused_wrapper
7 #define CRIT_COUNT 4 /* not a good idea to hardwire this XXX */
8 #define PENDING 8 /* not a good idea to hardwire this XXX */
11 * On entry: %eax contains function
13 * Stack: [eax,ecx,eflags,oldip]
16 pushl %edx /* save %edx (upcall pointer) */
17 pushl %ecx /* func(data) */
20 popl %edx /* upcall pointer */
21 incl PENDING(%edx) /* set pending bit (prevents upcalls) */
22 subl $32,CRIT_COUNT(%edx) /* cleanup critical section count */
23 pushl %esp /* sp pointing to os supplied frame */
25 pushl $2 /* FETCH next */