2001-03-05 22:29:24 +01:00
|
|
|
/* sys/mman.h
|
|
|
|
|
|
|
|
Copyright 1996, 1997, 1998, 2000, 2001 Red Hat, Inc.
|
|
|
|
|
|
|
|
This file is part of Cygwin.
|
|
|
|
|
|
|
|
This software is a copyrighted work licensed under the terms of the
|
|
|
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
|
|
|
details. */
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
#ifndef _SYS_MMAN_H_
|
|
|
|
#define _SYS_MMAN_H_
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
#define PROT_NONE 0
|
|
|
|
#define PROT_READ 1
|
|
|
|
#define PROT_WRITE 2
|
|
|
|
#define PROT_EXEC 4
|
|
|
|
|
|
|
|
#define MAP_FILE 0
|
|
|
|
#define MAP_SHARED 1
|
|
|
|
#define MAP_PRIVATE 2
|
|
|
|
#define MAP_TYPE 0xF
|
|
|
|
#define MAP_FIXED 0x10
|
|
|
|
#define MAP_ANONYMOUS 0x20
|
|
|
|
#define MAP_ANON MAP_ANONYMOUS
|
|
|
|
|
2003-10-09 13:40:16 +02:00
|
|
|
#define MAP_FAILED ((void *)-1)
|
2000-10-05 01:17:01 +02:00
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
/*
|
|
|
|
* Flags for msync.
|
|
|
|
*/
|
|
|
|
#define MS_ASYNC 1
|
|
|
|
#define MS_SYNC 2
|
|
|
|
#define MS_INVALIDATE 4
|
|
|
|
|
2003-03-09 22:51:00 +01:00
|
|
|
#ifndef __INSIDE_CYGWIN__
|
2003-09-09 11:41:18 +02:00
|
|
|
extern void *mmap (void *__addr, size_t __len, int __prot, int __flags, int __fd, off_t __off);
|
2003-03-09 22:51:00 +01:00
|
|
|
#endif
|
2003-09-09 11:41:18 +02:00
|
|
|
extern int munmap (void *__addr, size_t __len);
|
|
|
|
extern int mprotect (void *__addr, size_t __len, int __prot);
|
|
|
|
extern int msync (void *__addr, size_t __len, int __flags);
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
};
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#endif /* _SYS_MMAN_H_ */
|