summaryrefslogtreecommitdiff
path: root/cpu/cpu-syscalls.h
blob: 00d03d90e1ceec6b3ccdd70d9c0237ee4fcb9c1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/***************************************************************
  __CPU_SYSCALLS.H

       This file contains CPU SYSCALL operation functions & data
       declarations.

       PART OF : CPU - library .

       USAGE   : Internal only .

       NOTE    : Include "libmcpu.h" before this FILE .

       Copyright (C) 2026  by Andrew V.Kosteltsev.
       All Rights Reserved.
 ***************************************************************/

#ifndef   __CPU_SYSCALLS_H
#define   __CPU_SYSCALLS_H

#ifdef  __cplusplus
extern "C" {
#endif


typedef __mpu_uint64_t (*__cpu_syscall_handler_t)( __mpu_uint32_t sysno );

extern void __cpu_fd_context_init( void );
extern void __cpu_fd_context_free( void );
extern void __cpu_cwd_context_init( void );
extern void __cpu_cwd_context_free( void );

extern __mpu_uint64_t __cpu_SYS_brk( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_gettimeofday( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_clock_getres( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_clock_gettime( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_nanosleep( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_clock_nanosleep( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_open ( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_close( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_dup  ( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_dup2 ( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_read ( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_write( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_lseek( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_chdir( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_fchdir( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_stat ( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_fstat( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_lstat( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_fcntl( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_SYS_pipe2( __mpu_uint32_t sysno );
extern __mpu_uint64_t __cpu_syscall_dispatch( void );


#ifdef  __cplusplus
}   /* ... extern "C" */
#endif

#endif /* __CPU_SYSCALLS_H */