2014-05-15 17:45:52 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2014 Ludwig Ortmann
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser General
|
|
|
|
* Public License. See the file LICENSE in the top level directory for more
|
|
|
|
* details.
|
|
|
|
*/
|
|
|
|
|
2013-05-14 18:31:47 +02:00
|
|
|
.text
|
|
|
|
|
2013-05-15 17:45:43 +02:00
|
|
|
#ifdef __MACH__
|
|
|
|
.globl __native_sig_leave_tramp
|
|
|
|
__native_sig_leave_tramp:
|
2014-01-20 22:25:52 +01:00
|
|
|
pushl __native_saved_eip
|
|
|
|
pushfl
|
|
|
|
pushal
|
2013-05-15 17:45:43 +02:00
|
|
|
|
2013-10-16 15:33:04 +02:00
|
|
|
pushl __native_isr_ctx
|
|
|
|
pushl __native_cur_ctx
|
2013-05-15 17:45:43 +02:00
|
|
|
call _swapcontext
|
2013-10-16 15:33:04 +02:00
|
|
|
addl $8, %esp
|
2013-05-15 17:45:43 +02:00
|
|
|
|
2014-01-21 12:22:55 +01:00
|
|
|
call _eINT
|
|
|
|
|
2013-10-16 15:33:04 +02:00
|
|
|
movl $0x0, __native_in_isr
|
2014-01-20 22:25:52 +01:00
|
|
|
popal
|
|
|
|
popfl
|
2013-05-15 17:45:43 +02:00
|
|
|
|
2014-05-15 11:34:54 +02:00
|
|
|
ret
|
2013-05-15 17:45:43 +02:00
|
|
|
#else
|
2013-05-14 18:31:47 +02:00
|
|
|
.extern $_native_saved_eip
|
|
|
|
.extern $_native_isr_ctx
|
|
|
|
.extern $_native_cur_ctx
|
|
|
|
.extern $_native_in_isr
|
|
|
|
|
|
|
|
.globl _native_sig_leave_tramp
|
|
|
|
|
|
|
|
_native_sig_leave_tramp:
|
2014-01-20 22:25:52 +01:00
|
|
|
pushl _native_saved_eip
|
|
|
|
pushfl
|
|
|
|
pushal
|
2013-05-14 18:31:47 +02:00
|
|
|
|
2013-10-16 15:33:04 +02:00
|
|
|
pushl _native_isr_ctx
|
|
|
|
pushl _native_cur_ctx
|
2013-05-14 18:31:47 +02:00
|
|
|
call swapcontext
|
2013-10-16 15:33:04 +02:00
|
|
|
addl $8, %esp
|
2013-05-14 18:31:47 +02:00
|
|
|
|
2013-11-08 13:14:44 +01:00
|
|
|
call eINT
|
|
|
|
|
2013-10-16 15:33:04 +02:00
|
|
|
movl $0x0, _native_in_isr
|
2014-01-20 22:25:52 +01:00
|
|
|
popal
|
|
|
|
popfl
|
2013-05-14 18:31:47 +02:00
|
|
|
|
2014-05-15 11:34:54 +02:00
|
|
|
ret
|
2013-05-15 17:45:43 +02:00
|
|
|
#endif
|