--HG-- branch : dtrg-videocore rename : mach/powerpc/as/.distr => mach/vc4/as/.distr rename : mach/powerpc/as/mach0.c => mach/vc4/as/mach0.c rename : mach/powerpc/as/mach1.c => mach/vc4/as/mach1.c rename : mach/powerpc/as/mach2.c => mach/vc4/as/mach2.c rename : mach/powerpc/as/mach3.c => mach/vc4/as/mach3.c rename : mach/powerpc/as/mach4.c => mach/vc4/as/mach4.c rename : mach/powerpc/as/mach5.c => mach/vc4/as/mach5.c rename : mach/i86/build.mk => mach/vc4/build.mk rename : mach/powerpc/libem/powerpc.h => mach/vc4/libem/videocore.h rename : mach/i86/libend/.distr => mach/vc4/libend/.distr rename : mach/i86/libend/edata.s => mach/vc4/libend/edata.s rename : mach/i86/libend/em_end.s => mach/vc4/libend/em_end.s rename : mach/i86/libend/end.s => mach/vc4/libend/end.s rename : mach/i86/libend/etext.s => mach/vc4/libend/etext.s rename : mach/powerpc/ncg/.distr => mach/vc4/ncg/.distr rename : mach/powerpc/ncg/mach.c => mach/vc4/ncg/mach.c rename : mach/powerpc/ncg/mach.h => mach/vc4/ncg/mach.h rename : mach/powerpc/ncg/table => mach/vc4/ncg/table rename : plat/pc86/descr => plat/rpi/descr
		
			
				
	
	
		
			73 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			73 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * Raspberry Pi support library for the ACK
 | |
|  * © 2013 David Given
 | |
|  * This file is redistributable under the terms of the 3-clause BSD license.
 | |
|  * See the file 'Copying' in the root of the distribution for the full text.
 | |
|  */
 | |
| 
 | |
| #ifndef _UNISTD_H
 | |
| #define _UNISTD_H
 | |
| 
 | |
| #include <stddef.h>
 | |
| 
 | |
| /* Types */
 | |
| 
 | |
| typedef int pid_t;
 | |
| typedef int mode_t;
 | |
| 
 | |
| /* Constants for file access (open and friends) */
 | |
| 
 | |
| enum
 | |
| {
 | |
| 	O_ACCMODE = 0x3,
 | |
| 	
 | |
| 	O_RDONLY = 0,
 | |
| 	O_WRONLY = 1,
 | |
| 	O_RDWR = 2,
 | |
| 	
 | |
| 	O_CREAT = 0100,
 | |
| 	O_TRUNC = 01000,
 | |
| 	O_APPEND = 02000,
 | |
| 	O_NONBLOCK = 04000
 | |
| };
 | |
| 
 | |
| /* Special variables */
 | |
| 
 | |
| extern char** environ;
 | |
| 
 | |
| /* Implemented system calls */
 | |
| 
 | |
| extern void _exit(int);
 | |
| extern pid_t getpid(void);
 | |
| extern void* sbrk(intptr_t increment);
 | |
| extern int isatty(int d);
 | |
| extern off_t lseek(int fildes, off_t offset, int whence);
 | |
| extern int close(int d);
 | |
| extern int open(const char* path, int access, ...);
 | |
| extern int creat(const char* path, mode_t mode);
 | |
| extern int read(int fd, void* buffer, size_t count);
 | |
| extern int write(int fd, void* buffer, size_t count);
 | |
| 
 | |
| /* Unimplemented system calls (these are just prototypes to let the library
 | |
|  * compile). */
 | |
| 
 | |
| extern int fcntl(int fd, int op, ...);
 | |
| 
 | |
| /* Signal handling */
 | |
| 
 | |
| typedef int sig_atomic_t;
 | |
| 
 | |
| #define SIG_ERR ((sighandler_t) -1)           /* Error return.  */
 | |
| #define SIG_DFL ((sighandler_t) 0)            /* Default action.  */
 | |
| #define SIG_IGN ((sighandler_t) 1)            /* Ignore signal.  */
 | |
| 
 | |
| #define SIGABRT         6       /* Abort (ANSI) */
 | |
| #define SIGILL          11      /* Illegal instruction */
 | |
| 
 | |
| #define _NSIG           32      /* Biggest signal number + 1
 | |
|                                    (not including real-time signals).  */
 | |
| typedef void (*sighandler_t)(int);
 | |
| extern sighandler_t signal(int signum, sighandler_t handler);
 | |
| extern int raise(int signum);
 | |
| 
 | |
| #endif
 |