chiark / gitweb /
Commit 2.4.5-5 as unpacked
[inn-innduct.git] / include / inn / mmap.h
1 /*  $Id: mmap.h 7598 2007-02-09 02:40:51Z eagle $
2 **
3 **  MMap manipulation routines
4 **
5 **  Written by Alex Kiernan (alex.kiernan@thus.net)
6 **
7 **  These routines work with mmap()ed memory
8 */
9
10 #ifndef INN_MMAP_H
11 #define INN_MMAP_H 1
12
13 #include <inn/defines.h>
14
15 BEGIN_DECLS
16
17 /* Figure out what page an address is in and flush those pages.  This is the
18    internal function, which we wrap with a define below. */
19 void inn__mapcntl(void *, size_t, int);
20
21 /* Some platforms only support two arguments to msync.  On those platforms,
22    make the third argument to mapcntl always be zero, getting rid of whatever
23    the caller tried to pass.  This avoids undefined symbols for MS_ASYNC and
24    friends on platforms with two-argument msync functions. */
25 #ifdef INN_HAVE_MSYNC_3_ARG
26 # define inn_mapcntl inn__mapcntl
27 #else
28 # define inn_mapcntl(p, l, f) inn__mapcntl((p), (l), 0)
29 #endif
30
31 END_DECLS
32
33 #endif /* INN_MMAP_H */