Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / components / nacl / loader / nonsfi / abi_conversion.h
blob771f2dcff650e8e088c5b844f15477ddef2707e3
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_NACL_LOADER_NONSFI_ABI_CONVERSION_H_
6 #define COMPONENTS_NACL_LOADER_NONSFI_ABI_CONVERSION_H_
8 struct stat;
9 struct timespec;
10 struct nacl_abi_stat;
11 struct nacl_abi_timespec;
13 namespace nacl {
14 namespace nonsfi {
16 // Converts the timespec struct from NaCl's to host's ABI.
17 void NaClAbiTimeSpecToTimeSpec(const struct nacl_abi_timespec& nacl_timespec,
18 struct timespec* host_timespec);
20 // Converts the timespec struct from host's to NaCl's ABI.
21 void TimeSpecToNaClAbiTimeSpec(const struct timespec& host_timespec,
22 struct nacl_abi_timespec* nacl_timespec);
25 // Converts the stat struct from host's to NaCl's ABI.
26 void StatToNaClAbiStat(
27 const struct stat& host_stat, struct nacl_abi_stat* nacl_stat);
29 } // namespace nonsfi
30 } // namespace nacl
32 #endif // COMPONENTS_NACL_LOADER_NONSFI_ABI_CONVERSION_H_