Implement shm_open() and shm_unlink(). The shared memory objects are

simply created as files in /boot/var/shared_memory/. The Bootscript
clears the directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25374 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-05-08 13:42:33 +00:00
parent cf1c322756
commit f23d0a6242
3 changed files with 107 additions and 9 deletions
+8 -9
View File
@@ -5,6 +5,7 @@
#ifndef _SYS_MMAN_H
#define _SYS_MMAN_H
#include <sys/cdefs.h>
#include <sys/types.h>
@@ -24,19 +25,17 @@
// mmap() error return code
#define MAP_FAILED ((void*)-1)
#ifdef __cplusplus
extern "C" {
#endif
__BEGIN_DECLS
extern void* mmap(void* address, size_t length, int protection, int flags,
int fd, off_t offset);
extern int munmap(void* address, size_t length);
void* mmap(void* address, size_t length, int protection, int flags,
int fd, off_t offset);
int munmap(void* address, size_t length);
int shm_open(const char* name, int openMode, mode_t permissions);
int shm_unlink(const char* name);
#ifdef __cplusplus
}
#endif
__END_DECLS
#endif // _SYS_MMAN_H