- add third_party src.
[platform/framework/web/crosswalk.git] / src / native_client / src / trusted / service_runtime / sys_memory.h
1 /*
2  * Copyright (c) 2013 The Native Client Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6
7 #ifndef NATIVE_CLIENT_SERVICE_RUNTIME_NACL_SYS_MEMORY_H_
8 #define NATIVE_CLIENT_SERVICE_RUNTIME_NACL_SYS_MEMORY_H_ 1
9
10 #include "native_client/src/include/nacl_base.h"
11 #include "native_client/src/include/portability.h"
12 #include "native_client/src/trusted/service_runtime/include/machine/_types.h"
13
14 EXTERN_C_BEGIN
15
16 struct NaClApp;
17 struct NaClAppThread;
18
19 int32_t NaClSysBrk(struct NaClAppThread *natp,
20                    uintptr_t            new_break);
21
22 int32_t NaClSysMmap(struct NaClAppThread  *natp,
23                     void                  *start,
24                     size_t                length,
25                     int                   prot,
26                     int                   flags,
27                     int                   d,
28                     nacl_abi_off_t        *offp);
29
30 int32_t NaClSysMmapIntern(struct NaClApp  *nap,
31                           void            *start,
32                           size_t          length,
33                           int             prot,
34                           int             flags,
35                           int             d,
36                           nacl_abi_off_t  offset);
37
38 int32_t NaClSysMmap(struct NaClAppThread  *natp,
39                     void                  *start,
40                     size_t                length,
41                     int                   prot,
42                     int                   flags,
43                     int                   d,
44                     nacl_abi_off_t        *offp);
45
46 int32_t NaClSysMprotectInternal(struct NaClApp  *nap,
47                                 uint32_t        start,
48                                 size_t          length,
49                                 int             prot);
50
51 int32_t NaClSysMprotect(struct NaClAppThread  *natp,
52                         uint32_t              start,
53                         size_t                length,
54                         int                   prot);
55
56 int32_t NaClSysMunmap(struct NaClAppThread  *natp,
57                       void                  *start,
58                       size_t                length);
59
60 EXTERN_C_END
61
62 #endif