LibC: Implement getpagesize
This commit is contained in:
		
							parent
							
								
									6ed1435aeb
								
							
						
					
					
						commit
						4508e099ff
					
				| 
						 | 
				
			
			@ -233,6 +233,8 @@ int					unlinkat(int fd, const char* path, int flag);
 | 
			
		|||
int					usleep(useconds_t usec);
 | 
			
		||||
ssize_t				write(int fildes, const void* buf, size_t nbyte);
 | 
			
		||||
 | 
			
		||||
int					getpagesize(void);
 | 
			
		||||
 | 
			
		||||
extern char*	optarg;
 | 
			
		||||
extern int		opterr, optind, optopt;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,6 @@
 | 
			
		|||
#include <BAN/Assert.h>
 | 
			
		||||
#include <BAN/Debug.h>
 | 
			
		||||
#include <kernel/Memory/Types.h>
 | 
			
		||||
#include <kernel/Syscall.h>
 | 
			
		||||
 | 
			
		||||
#include <errno.h>
 | 
			
		||||
| 
						 | 
				
			
			@ -448,6 +449,11 @@ int getopt(int argc, char* const argv[], const char* optstring)
 | 
			
		|||
	return '?';
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int getpagesize(void)
 | 
			
		||||
{
 | 
			
		||||
	return PAGE_SIZE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pid_t getpid(void)
 | 
			
		||||
{
 | 
			
		||||
	return syscall(SYS_GET_PID);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue