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

Last change on this file since 407 was 407, checked in by alain, 5 years ago

First implementation of fork/exec.

File size: 2.0 KB
Line 
1/*
2 * do_syscall.h - generic syscall handler.
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 * The possible values for servic_num are defined in the syscalls/syscalls.h file.
35 ********************************************************************************************
36 * @ this        : pointer on calling thread descriptor
37 * @ arg0        : kernel function argument 0
38 * @ arg1        : kernel function argument 1
39 * @ arg2        : kernel function argument 2
40 * @ arg3        : kernel function argument 3
41 * @ service_num : kernel service index
42 * @ return 0 if success / return non zero if failure.
43 *******************************************************************************************/
44reg_t do_syscall( thread_t * this,
45                  reg_t      arg0,
46                          reg_t      arg1,
47                          reg_t      arg2,
48                          reg_t      arg3,
49                          reg_t      service_num );
50
51#endif  // _DO_SYSCALL_H_
Note: See TracBrowser for help on using the repository browser.