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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user