OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 The Native Client Authors. All rights reserved. | 2 * Copyright 2008 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 /* | 7 /* |
8 * NaCl Service Runtime. Directory descriptor abstraction. | 8 * NaCl Service Runtime. Directory descriptor abstraction. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_WIN_NACL_HOST_DIR_TYPES_H_ | 11 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_WIN_NACL_HOST_DIR_TYPES_H_ |
12 #define NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_WIN_NACL_HOST_DIR_TYPES_H_ | 12 #define NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_WIN_NACL_HOST_DIR_TYPES_H_ |
13 | 13 |
14 #include <windows.h> | 14 #include <windows.h> |
15 | 15 |
16 #include "native_client/src/shared/platform/nacl_sync.h" | 16 #include "native_client/src/shared/platform/nacl_sync.h" |
17 #include "native_client/src/trusted/service_runtime/nacl_config.h" | 17 #include "native_client/src/trusted/service_runtime/nacl_config.h" |
18 | 18 |
19 struct NaClHostDir { | 19 struct NaClHostDir { |
20 struct NaClMutex mu; | 20 struct NaClMutex mu; |
21 /* | 21 /* |
22 * Windows HANDLEs are used by FindFirst/FindNext/FindClose | 22 * Windows HANDLEs are used by FindFirst/FindNext/FindClose |
23 */ | 23 */ |
24 HANDLE handle; | 24 HANDLE handle; |
25 /* | 25 /* |
26 * The data found from the previous call is in this slot. | 26 * The data found from the previous call is in this slot. |
27 */ | 27 */ |
28 WIN32_FIND_DATA find_data; | 28 WIN32_FIND_DATAW find_data; |
29 /* | 29 /* |
30 * Monotonic count returned in dirents. | 30 * Monotonic count returned in dirents. |
31 */ | 31 */ |
32 int off; | 32 int off; |
33 /* | 33 /* |
34 * Set when no more files can be found, i.e., FindNextFile has | 34 * Set when no more files can be found, i.e., FindNextFile has |
35 * already returned ERROR_NO_MORE_FILES, so find_data is no longer | 35 * already returned ERROR_NO_MORE_FILES, so find_data is no longer |
36 * valid. | 36 * valid. |
37 */ | 37 */ |
38 int done; | 38 int done; |
39 /* | 39 /* |
40 * Pattern representing the directory we are listing. | 40 * Pattern representing the directory we are listing. |
41 * This is cached in the descriptor so that it can be restarted | 41 * This is cached in the descriptor so that it can be restarted |
42 * (i.e. rewinddir) | 42 * (i.e. rewinddir) |
43 */ | 43 */ |
44 wchar_t pattern[NACL_CONFIG_PATH_MAX + 1]; | 44 wchar_t pattern[NACL_CONFIG_PATH_MAX + 1]; |
45 }; | 45 }; |
46 | 46 |
47 #endif /* NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_WIN_NACL_HOST_DIR_TYPES_H_ */ | 47 #endif /* NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_WIN_NACL_HOST_DIR_TYPES_H_ */ |
OLD | NEW |