• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 #ifndef COMPONENTS_NACL_LOADER_NONSFI_ABI_CONVERSION_H_
6 #define COMPONENTS_NACL_LOADER_NONSFI_ABI_CONVERSION_H_
7 
8 struct stat;
9 struct timespec;
10 struct nacl_abi_stat;
11 struct nacl_abi_timespec;
12 
13 namespace nacl {
14 namespace nonsfi {
15 
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);
19 
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);
23 
24 
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);
28 
29 }  // namespace nonsfi
30 }  // namespace nacl
31 
32 #endif  // COMPONENTS_NACL_LOADER_NONSFI_ABI_CONVERSION_H_
33