2 * $DragonFly: src/lib/libcaps/i386/upcall.S,v 1.2 2003/12/07 04:21:54 dillon Exp $
9 .globl upc_callused_wrapper
12 * On entry: %eax contains function
14 * Stack: [eax,ecx,eflags,oldip]
16 NON_GPROF_ENTRY(upc_callused_wrapper)
17 pushl %edx /* save %edx (upcall pointer) */
18 pushl %ecx /* func(data) */
21 popl %edx /* upcall pointer */
22 movl UPC_UTHREAD(%edx),%eax
23 incl UPC_PENDING(%edx) /* set pending bit (prevents upcalls) */
24 subl $TDPRI_CRIT,TD_PRI(%eax) /* cleanup critical section count */
25 pushl %esp /* sp pointing to os supplied frame */
27 pushl $2 /* FETCH next */