OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Configuration for other mojio_*.h. Note that this is a C header. | 5 // Configuration for other mojio_*.h. Note that this is a C header. |
6 // | 6 // |
7 // Things in this file may be tweaked (the values of macros or the underlying | 7 // Things in this file may be tweaked (the values of macros or the underlying |
8 // types for typedefs) as necessary/appropriate, but they should not be used | 8 // types for typedefs) as necessary/appropriate, but they should not be used |
9 // directly by application code. | 9 // directly by application code. |
10 | 10 |
11 #ifndef MOJO_SERVICES_FILES_PUBLIC_C_MOJIO_CONFIG_H_ | 11 #ifndef MOJO_SERVICES_FILES_C_MOJIO_CONFIG_H_ |
12 #define MOJO_SERVICES_FILES_PUBLIC_C_MOJIO_CONFIG_H_ | 12 #define MOJO_SERVICES_FILES_C_MOJIO_CONFIG_H_ |
13 | 13 |
14 // Macros ---------------------------------------------------------------------- | 14 // Macros ---------------------------------------------------------------------- |
15 | 15 |
16 #define MOJIO_CONFIG_BUFSIZ 8192 | 16 #define MOJIO_CONFIG_BUFSIZ 8192 |
17 #define MOJIO_CONFIG_FILENAME_MAX 4096 | 17 #define MOJIO_CONFIG_FILENAME_MAX 4096 |
18 #define MOJIO_CONFIG_FOPEN_MAX 16 | 18 #define MOJIO_CONFIG_FOPEN_MAX 16 |
19 | 19 |
20 // What to use for the C |restrict| keyword (not supported in C++). | 20 // What to use for the C |restrict| keyword (not supported in C++). |
21 // TODO(vtl): Is this right? | 21 // TODO(vtl): Is this right? |
22 #define MOJIO_CONFIG_RESTRICT __restrict__ | 22 #define MOJIO_CONFIG_RESTRICT __restrict__ |
23 | 23 |
24 // Maximum number of (simultaneously open) FDs. | 24 // Maximum number of (simultaneously open) FDs. |
25 #define MOJIO_CONFIG_MAX_NUM_FDS 1024 | 25 #define MOJIO_CONFIG_MAX_NUM_FDS 1024 |
26 | 26 |
27 // Types ----------------------------------------------------------------------- | 27 // Types ----------------------------------------------------------------------- |
28 | 28 |
29 // We want types of exact bitwidths (since values will usually come from Mojo | 29 // We want types of exact bitwidths (since values will usually come from Mojo |
30 // messages), but we don't want to include <stdint.h> from our headers. Thus we | 30 // messages), but we don't want to include <stdint.h> from our headers. Thus we |
31 // define our own. These are meant for internal use only. | 31 // define our own. These are meant for internal use only. |
32 // TODO(vtl): Add static_assert()s/_Static_assert()s verifying the sizes. | 32 // TODO(vtl): Add static_assert()s/_Static_assert()s verifying the sizes. |
33 typedef int mojio_config_int32; | 33 typedef int mojio_config_int32; |
34 typedef unsigned mojio_config_uint32; | 34 typedef unsigned mojio_config_uint32; |
35 typedef long long mojio_config_int64; | 35 typedef long long mojio_config_int64; |
36 typedef unsigned long long mojio_config_uint64; | 36 typedef unsigned long long mojio_config_uint64; |
37 | 37 |
38 #endif // MOJO_SERVICES_FILES_PUBLIC_C_MOJIO_CONFIG_H_ | 38 #endif // MOJO_SERVICES_FILES_C_MOJIO_CONFIG_H_ |
OLD | NEW |