OpenCores
URL https://opencores.org/ocsvn/ao486/ao486/trunk

Subversion Repositories ao486

[/] [ao486/] [trunk/] [syn/] [components/] [ps2/] [software/] [exe_bsp/] [HAL/] [inc/] [sys/] [alt_sys_wrappers.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
#ifndef __ALT_SYS_WRAPPERS_H__
2
#define __ALT_SYS_WRAPPERS_H__
3
 
4
/******************************************************************************
5
*                                                                             *
6
* License Agreement                                                           *
7
*                                                                             *
8
* Copyright (c) 2003 Altera Corporation, San Jose, California, USA.           *
9
* All rights reserved.                                                        *
10
*                                                                             *
11
* Permission is hereby granted, free of charge, to any person obtaining a     *
12
* copy of this software and associated documentation files (the "Software"),  *
13
* to deal in the Software without restriction, including without limitation   *
14
* the rights to use, copy, modify, merge, publish, distribute, sublicense,    *
15
* and/or sell copies of the Software, and to permit persons to whom the       *
16
* Software is furnished to do so, subject to the following conditions:        *
17
*                                                                             *
18
* The above copyright notice and this permission notice shall be included in  *
19
* all copies or substantial portions of the Software.                         *
20
*                                                                             *
21
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR  *
22
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,    *
23
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
24
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      *
25
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING     *
26
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER         *
27
* DEALINGS IN THE SOFTWARE.                                                   *
28
*                                                                             *
29
* This agreement shall be governed in all respects by the laws of the State   *
30
* of California and by the laws of the United States of America.              *
31
*                                                                             *
32
******************************************************************************/
33
 
34
/*
35
 * This file provides the prototypes for the HAL 'UNIX style functions. The
36
 * names of these functions are defined in alt_syscall.h. THese are defined to
37
 * be the standard names when running the standalone HAL, e.g. open(), close()
38
 * etc., but the names may be redefined as a part of an operating system port
39
 * in order to avoid name clashes.
40
 */
41
 
42
#include "os/alt_syscall.h"
43
 
44
#include <unistd.h>
45
#include <sys/times.h>
46
#include <sys/types.h>
47
#include <sys/stat.h>
48
#include <sys/time.h>
49
#include <sys/times.h>
50
 
51
extern int     ALT_CLOSE (int __fd);
52
extern int     ALT_EXECVE (const char *__path,
53
                           char * const __argv[],
54
                           char * const __envp[]);
55
extern void    ALT_EXIT (int __status);
56
extern int     ALT_FSTAT (int file, struct stat *st);
57
extern int     ALT_FCNTL (int file, int cmd, ...);
58
extern pid_t   ALT_FORK (void);
59
extern pid_t   ALT_GETPID (void);
60
 
61
#if defined (__GNUC__) && __GNUC__ >= 4
62
extern int     ALT_GETTIMEOFDAY (struct timeval  *ptimeval,
63
                                 void *ptimezone);
64
#else
65
extern int     ALT_GETTIMEOFDAY (struct timeval  *ptimeval,
66
                                 struct timezone *ptimezone);
67
#endif
68
 
69
extern int     ALT_IOCTL (int file, int req, void* arg);
70
extern int     ALT_ISATTY (int file);
71
extern int     ALT_KILL (int pid, int sig);
72
extern int     ALT_LINK (const char *existing, const char *new);
73
extern off_t   ALT_LSEEK (int file, off_t ptr, int dir);
74
extern int     ALT_OPEN (const char* file, int flags, ...);
75
extern int     ALT_READ (int file, void *ptr, size_t len);
76
extern int     ALT_RENAME (char *existing, char *new);
77
extern void*   ALT_SBRK (ptrdiff_t incr);
78
extern int     ALT_SETTIMEOFDAY (const struct timeval  *t,
79
                                 const struct timezone *tz);
80
extern int     ALT_STAT (const char *file, struct stat *st);
81
extern clock_t ALT_TIMES (struct tms *buf);
82
extern int     ALT_UNLINK (const char *name);
83
 
84
#if defined (__GNUC__) && __GNUC__ >= 4
85
int ALT_USLEEP (useconds_t us);
86
#else
87
unsigned int   ALT_USLEEP (unsigned int us);
88
#endif
89
 
90
extern int     ALT_WAIT (int *status);
91
extern int     ALT_WRITE (int file, const void *ptr, size_t len);
92
 
93
 
94
extern char** ALT_ENVIRON;
95
 
96
/*
97
 *
98
 */
99
 
100
#endif /* __ALT_SYS_WRAPPERS_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.