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

Last change on this file since 569 was 457, checked in by alain, 6 years ago

This version modifies the exec syscall and fixes a large number of small bugs.
The version number has been updated (0.1)

File size: 2.1 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_kernel_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 service_num are defined in the syscalls/syscalls.h file.
35 * It does NOT enable interrupts, that must be enabled by the kernel function
36 * depending on the implemented service.
37 **************************************************************************************
38 * @ this        : pointer on calling thread descriptor
39 * @ arg0        : kernel function argument 0
40 * @ arg1        : kernel function argument 1
41 * @ arg2        : kernel function argument 2
42 * @ arg3        : kernel function argument 3
43 * @ service_num : kernel service index
44 * @ return 0 if success / return non zero if failure.
45 *************************************************************************************/
46reg_t do_syscall( thread_t * this,
47                  reg_t      arg0,
48                          reg_t      arg1,
49                          reg_t      arg2,
50                          reg_t      arg3,
51                          reg_t      service_num );
52
53#endif  // _DO_SYSCALL_H_
Note: See TracBrowser for help on using the repository browser.