source: trunk/kernel/kern/do_syscall.h @ 292

Last change on this file since 292 was 16, checked in by alain, 7 years ago

mprove the HAL for interrupt, exception, syscall handling.

File size: 1.9 KB
RevLine 
[16]1/*
2 * do_syscall.h - kernel service numbers asked by userland
3 *
4 * Authors   Ghassan Almaless (2008,2009,2010,2011,2012)
5 *           Mohamed Lamine Karaoui (2015)
6 *           Alain Greiner (2016)
7 *
8 * Copyright (c) UPMC Sorbonne Universites
9 *
10 * This file is part of ALMOS-MKH.
11 *
12 * ALMOS-MKH is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; version 2.0 of the License.
15 *
16 * ALMOS-MKH is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 * General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with ALMOS-MKH; if not, write to the Free Software Foundation,
23 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#ifndef _DO_SYSCALL_H_
27#define _D0_SYSCALL_H_
28
29#include <hal_types.h>
30#include <thread.h>
31
32/********************************************************************************************
33 * This function calls the kernel function defined by the <service_num> argument.
34 ********************************************************************************************
35 * @ this        : pointer on calling thread descriptor
36 * @ arg0        : kernel function argument 0
37 * @ arg1        : kernel function argument 1
38 * @ arg2        : kernel function argument 2
39 * @ arg3        : kernel function argument 3
40 * @ service_num : kernel service index
41 * @ return 0 if success / return non zero if failure.
42 *******************************************************************************************/
43reg_t do_syscall( thread_t * this,
44                  reg_t      arg0,
45                          reg_t      arg1,
46                          reg_t      arg2,
47                          reg_t      arg3,
48                          reg_t      service_num );
49
50#endif  // _DO_SYSCALL_H_
Note: See TracBrowser for help on using the repository browser.