Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(802)

Side by Side Diff: src/trusted/service_runtime/include/sys/time.h

Issue 1235633004: DON'T USE THIS -- Providing some missing POSIX File syscalls. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * NaCl Service Runtime API. Time types. 8 * NaCl Service Runtime API. Time types.
9 */ 9 */
10 10
11 #ifndef NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_INCLUDE_SYS_TIME_H_ 11 #ifndef NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_INCLUDE_SYS_TIME_H_
12 #define NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_INCLUDE_SYS_TIME_H_ 12 #define NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_INCLUDE_SYS_TIME_H_
13 13
14 #include "native_client/src/include/build_config.h"
14 #include "native_client/src/trusted/service_runtime/include/machine/_types.h" 15 #include "native_client/src/trusted/service_runtime/include/machine/_types.h"
15 16
16 #ifdef __cplusplus 17 #ifdef __cplusplus
17 extern "C" { 18 extern "C" {
18 #endif 19 #endif
19 20
20 #if defined(NACL_IN_TOOLCHAIN_HEADERS) 21 #if defined(NACL_IN_TOOLCHAIN_HEADERS)
21 #ifndef nacl_abi___susecond_t_defined 22 #ifndef nacl_abi___susecond_t_defined
22 #define nacl_abi___susecond_t_defined 23 #define nacl_abi___susecond_t_defined
23 typedef long int nacl_abi_suseconds_t; 24 typedef long int nacl_abi_suseconds_t;
24 #endif 25 #endif
25 #else 26 #else
26 typedef int32_t nacl_abi_suseconds_t; 27 typedef int32_t nacl_abi_suseconds_t;
27 #endif 28 #endif
28 29
29 #ifndef nacl_abi___clock_t_defined 30 #ifndef nacl_abi___clock_t_defined
30 #define nacl_abi___clock_t_defined 31 #define nacl_abi___clock_t_defined
31 typedef long int nacl_abi_clock_t; /* to be deprecated */ 32 typedef long int nacl_abi_clock_t; /* to be deprecated */
32 #endif 33 #endif
33 34
35 #if NACL_WINDOWS
36 __declspec(align(8))
37 #endif
34 struct nacl_abi_timeval { 38 struct nacl_abi_timeval {
35 nacl_abi_time_t nacl_abi_tv_sec; 39 nacl_abi_time_t nacl_abi_tv_sec;
36 nacl_abi_suseconds_t nacl_abi_tv_usec; 40 nacl_abi_suseconds_t nacl_abi_tv_usec;
41 #if NACL_WINDOWS
37 }; 42 };
43 #else
44 } __attribute__((aligned(8)));
45 #endif
38 46
39 /* obsolete. should not be used */ 47 /* obsolete. should not be used */
40 struct nacl_abi_timezone { 48 struct nacl_abi_timezone {
41 int tz_minuteswest; 49 int tz_minuteswest;
42 int tz_dsttime; 50 int tz_dsttime;
43 }; 51 };
44 52
45 /* 53 /*
46 * In some places (e.g., the linux man page) the second parameter is defined 54 * In some places (e.g., the linux man page) the second parameter is defined
47 * as a struct timezone *. The header file says this struct type should 55 * as a struct timezone *. The header file says this struct type should
48 * never be used, and defines it by default as void *. The Mac man page says 56 * never be used, and defines it by default as void *. The Mac man page says
49 * it is void *. 57 * it is void *.
50 */ 58 */
51 extern int nacl_abi_gettimeofday(struct nacl_abi_timeval *tv, void *tz); 59 extern int nacl_abi_gettimeofday(struct nacl_abi_timeval *tv, void *tz);
52 60
53 /* 61 /*
54 * POSIX defined clock id values for clock_getres andn clock_gettime. 62 * POSIX defined clock id values for clock_getres andn clock_gettime.
55 */ 63 */
56 64
57 #define NACL_ABI_CLOCK_REALTIME (0) 65 #define NACL_ABI_CLOCK_REALTIME (0)
58 #define NACL_ABI_CLOCK_MONOTONIC (1) 66 #define NACL_ABI_CLOCK_MONOTONIC (1)
59 #define NACL_ABI_CLOCK_PROCESS_CPUTIME_ID (2) 67 #define NACL_ABI_CLOCK_PROCESS_CPUTIME_ID (2)
60 #define NACL_ABI_CLOCK_THREAD_CPUTIME_ID (3) 68 #define NACL_ABI_CLOCK_THREAD_CPUTIME_ID (3)
61 69
62 #ifdef __cplusplus 70 #ifdef __cplusplus
63 } 71 }
64 #endif 72 #endif
65 73
66 #endif 74 #endif
OLDNEW
« no previous file with comments | « src/trusted/service_runtime/include/bits/nacl_syscalls.h ('k') | src/trusted/service_runtime/include/sys/unistd.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698