Debian Codegraph @

crt/aws-c-common/include/aws/common/private/system_info_priv.h

raw symbols SCIP
1 #ifndef AWS_COMMON_PRIVATE_SYSTEM_INFO_PRIV_H
2 #define AWS_COMMON_PRIVATE_SYSTEM_INFO_PRIV_H
3 /**
4 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
5 * SPDX-License-Identifier: Apache-2.0.
6 */
7 #include <aws/common/byte_buf.h>
8 #include <aws/common/ref_count.h>
9 #include <aws/common/string.h>
10 #include <aws/common/system_info.h>
11
12 struct aws_system_environment {
13 struct aws_allocator *allocator;
14 struct aws_ref_count ref_count;
15 struct aws_byte_buf virtualization_vendor;
16 struct aws_byte_buf product_name;
17 enum aws_platform_os os;
18 size_t cpu_count;
19 size_t cpu_group_count;
20 void *impl;
21 };
22
23 /**
24 * For internal implementors. Fill in info in env that you're able to grab, such as dmi info, os version strings etc...
25 * in here. The default just returns AWS_OP_SUCCESS. This is currently only implemented for linux.
26 *
27 * Returns AWS_OP_ERR if the implementation wasn't able to fill in required information for the platform.
28 */
29 int aws_system_environment_load_platform_impl(struct aws_system_environment *env);
30
31 /**
32 * For internal implementors. Cleans up anything allocated in aws_system_environment_load_platform_impl,
33 * but does not release the memory for env.
34 */
35 void aws_system_environment_destroy_platform_impl(struct aws_system_environment *env);
36
37 #endif // AWS_COMMON_PRIVATE_SYSTEM_INFO_PRIV_H