Home | History | Annotate | Download | only in include
      1 /*
      2  * Copyright 2012, The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *     http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #ifndef _MMAN_PORTABLE_H_
     18 #define _MMAN_PORTABLE_H_
     19 
     20 /* Derived from development/ndk/platforms/android-3/include/asm-generic/mman.h */
     21 #define PROT_READ_PORTABLE     0x1
     22 #define PROT_WRITE_PORTABLE    0x2
     23 #define PROT_EXEC_PORTABLE     0x4
     24 #define PROT_SEM_PORTABLE      0x8
     25 #define PROT_NONE_PORTABLE     0x0
     26 #define PROT_GROWSDOWN_PORTABLE 0x01000000
     27 #define PROT_GROWSUP_PORTABLE   0x02000000
     28 
     29 #define MAP_SHARED_PORTABLE    0x01
     30 #define MAP_PRIVATE_PORTABLE   0x02
     31 #define MAP_TYPE_PORTABLE      0x0f
     32 #define MAP_FIXED_PORTABLE     0x10
     33 #define MAP_ANONYMOUS_PORTABLE 0x20
     34 
     35 #define MS_ASYNC_PORTABLE      1
     36 #define MS_INVALIDATE_PORTABLE 2
     37 #define MS_SYNC_PORTABLE       4
     38 
     39 #define MADV_NORMAL_PORTABLE   0
     40 #define MADV_RANDOM_PORTABLE   1
     41 #define MADV_SEQUENTIAL_PORTABLE 2
     42 #define MADV_WILLNEED_PORTABLE 3
     43 #define MADV_DONTNEED_PORTABLE 4
     44 
     45 #define MADV_REMOVE_PORTABLE   9
     46 #define MADV_DONTFORK_PORTABLE 10
     47 #define MADV_DOFORK_PORTABLE   11
     48 
     49 #define MAP_ANON_PORTABLE      MAP_ANONYMOUS_PORTABLE
     50 #define MAP_FILE_PORTABLE      0
     51 
     52 /* Derived from development/ndk/platforms/android-3/include/asm-generic/mman.h */
     53 #define MAP_GROWSDOWN_PORTABLE 0x0100
     54 #define MAP_DENYWRITE_PORTABLE 0x0800
     55 #define MAP_EXECUTABLE_PORTABLE        0x1000
     56 #define MAP_LOCKED_PORTABLE    0x2000
     57 #define MAP_NORESERVE_PORTABLE 0x4000
     58 #define MAP_POPULATE_PORTABLE  0x8000
     59 #define MAP_NONBLOCK_PORTABLE  0x10000
     60 
     61 #define MCL_CURRENT_PORTABLE   1
     62 #define MCL_FUTURE_PORTABLE    2
     63 
     64 #endif /* _MMAN_PORTABLE_H */
     65