libc: Document sys/types.h

This commit is contained in:
apio 2022-10-12 12:07:42 +02:00
parent 1e16a78106
commit d89685bb36
2 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,7 @@ extern "C"
/* Maps size bytes of memory (rounded down to the nearest page-aligned size) into the current process's address /* Maps size bytes of memory (rounded down to the nearest page-aligned size) into the current process's address
* space at addr. If addr is null, the kernel will choose an address. */ * space at addr. If addr is null, the kernel will choose an address. */
void* mmap(void* addr, size_t size, int prot, int flags, int fd, off_t offset); void* mmap(void* addr, size_t size, int prot, int flags, int fd, off_t offset);
/* Unmaps size bytes of memory (rounded down to the nearest page-aligned size) at addr from the current process's /* Unmaps size bytes of memory (rounded down to the nearest page-aligned size) at addr from the current process's
* address space. */ * address space. */
int munmap(void* addr, size_t size); int munmap(void* addr, size_t size);

View File

@ -1,8 +1,13 @@
#ifndef _SYS_TYPES_H #ifndef _SYS_TYPES_H
#define _SYS_TYPES_H #define _SYS_TYPES_H
/* The type of a process identifier. */
typedef long int pid_t; typedef long int pid_t;
/* The type returned by sizeof(). */
typedef unsigned long int size_t; typedef unsigned long int size_t;
/* Signed version of size_t. */
typedef long int ssize_t; typedef long int ssize_t;
#endif #endif