Debian Codegraph @

crt/aws-c-common/source/windows/process.c

raw symbols SCIP
1 /**
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0.
4 */
5 #include <aws/common/process.h>
6 #include <process.h>
7
8 /**
9 * this is just the value it's hard coded to in windows NT and later
10 * see https://docs.microsoft.com/en-us/windows/win32/sysinfo/kernel-objects
11 * for more information.
12 */
13 static const size_t s_max_handles = 1 << 24;
14
15 int aws_get_pid(void) {
16 #if defined(AWS_OS_WINDOWS_DESKTOP)
17 return _getpid();
18 #else
19 return -1;
20 #endif
21 }
22
23 size_t aws_get_soft_limit_io_handles(void) {
24 return s_max_handles;
25 }
26
27 size_t aws_get_hard_limit_io_handles(void) {
28 return s_max_handles;
29 }
30
31 int aws_set_soft_limit_io_handles(size_t max_handles) {
32 (void)max_handles;
33
34 return aws_raise_error(AWS_ERROR_UNIMPLEMENTED);
35 }