|
[ source navigation ] [ diff markup ] [ identifier search ] [ general search ] |
|||
|
001 /* Copyright (C) 2005 David Decotigny 002 003 This program is free software; you can redistribute it and/or 004 modify it under the terms of the GNU General Public License 005 as published by the Free Software Foundation; either version 2 006 of the License, or (at your option) any later version. 007 008 This program is distributed in the hope that it will be useful, 009 but WITHOUT ANY WARRANTY; without even the implied warranty of 010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 011 GNU General Public License for more details. 012 013 You should have received a copy of the GNU General Public License 014 along with this program; if not, write to the Free Software 015 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 016 USA. 017 */ 018 #include <sos/uaccess.h> 019 020 #include "idt.h" 021 #include "irq.h" 022 023 #include "swintr.h" 024 025 /** 026 * The Assembler low-level wrapper for the SOS syscalls 027 * 028 * This wrapper takes care of saving the state of the calling user 029 * thread before calling the "C" function sos_do_syscall(), passing it 030 * the correct arguments. 031 */ 032 extern void sos_syscall_wrapper(); 033 034 035 sos_ret_t sos_swintr_subsystem_setup(void) 036 { 037 sos_ui32_t flags; 038 sos_ret_t retval; 039 040 sos_disable_IRQs(flags); 041 042 retval 043 = sos_idt_set_handler(SOS_SWINTR_SOS_SYSCALL, 044 (sos_vaddr_t) sos_syscall_wrapper, 045 3 /* CPL3 routine */); 046 047 sos_restore_IRQs(flags); 048 049 return retval; 050 }
[ source navigation ] | [ diff markup ] | [ identifier search ] | [ general search ] |