54 #define MAX_TITLE_LENGTH 8192
57 #define UV__NANOSEC 1000000000
80 LARGE_INTEGER perf_frequency;
88 if (QueryPerformanceFrequency(&perf_frequency)) {
97 int utf8_len, utf16_buffer_len, utf16_len;
105 if (*size_ptr > 32768) {
107 utf16_buffer_len = 32768;
109 utf16_buffer_len = (
int) *size_ptr;
112 utf16_buffer = (WCHAR*)
uv__malloc(
sizeof(WCHAR) * utf16_buffer_len);
118 utf16_len = GetModuleFileNameW(
NULL, utf16_buffer, utf16_buffer_len);
119 if (utf16_len <= 0) {
120 err = GetLastError();
125 utf16_buffer[utf16_len] =
L'\0';
128 utf8_len = WideCharToMultiByte(CP_UTF8,
137 err = GetLastError();
145 *size_ptr = utf8_len - 1;
163 utf16_len = GetCurrentDirectoryW(0,
NULL);
164 if (utf16_len == 0) {
167 utf16_buffer =
uv__malloc(utf16_len *
sizeof(WCHAR));
168 if (utf16_buffer ==
NULL) {
172 utf16_len = GetCurrentDirectoryW(utf16_len, utf16_buffer);
173 if (utf16_len == 0) {
179 utf16_buffer[utf16_len] =
L'\0';
183 if (utf16_buffer[utf16_len - 1] ==
L'\\' &&
184 !(utf16_len == 3 && utf16_buffer[1] ==
L':')) {
186 utf16_buffer[utf16_len] =
L'\0';
190 r = WideCharToMultiByte(CP_UTF8,
201 }
else if (
r > (
int) *
size) {
208 r = WideCharToMultiByte(CP_UTF8,
229 size_t utf16_len, new_utf16_len;
230 WCHAR drive_letter,
env_var[4];
236 utf16_len = MultiByteToWideChar(CP_UTF8,
242 if (utf16_len == 0) {
245 utf16_buffer =
uv__malloc(utf16_len *
sizeof(WCHAR));
246 if (utf16_buffer ==
NULL) {
250 if (MultiByteToWideChar(CP_UTF8,
260 if (!SetCurrentDirectoryW(utf16_buffer)) {
268 new_utf16_len = GetCurrentDirectoryW(utf16_len, utf16_buffer);
269 if (new_utf16_len > utf16_len ) {
271 utf16_buffer =
uv__malloc(new_utf16_len *
sizeof(WCHAR));
272 if (utf16_buffer ==
NULL) {
278 new_utf16_len = GetCurrentDirectoryW(new_utf16_len, utf16_buffer);
280 if (utf16_len == 0) {
287 if (utf16_buffer[utf16_len - 1] ==
L'\\' &&
288 !(utf16_len == 3 && utf16_buffer[1] ==
L':')) {
290 utf16_buffer[utf16_len] =
L'\0';
293 if (utf16_len < 2 || utf16_buffer[1] !=
L':') {
297 }
else if (utf16_buffer[0] >=
L'A' && utf16_buffer[0] <=
L'Z') {
298 drive_letter = utf16_buffer[0];
299 }
else if (utf16_buffer[0] >=
L'a' && utf16_buffer[0] <=
L'z') {
301 drive_letter = utf16_buffer[0] -
L'a' +
L'A';
307 if (drive_letter != 0) {
314 SetEnvironmentVariableW(
env_var, utf16_buffer);
324 avg[0] = avg[1] = avg[2] = 0;
329 MEMORYSTATUSEX memory_status;
330 memory_status.dwLength =
sizeof(memory_status);
332 if (!GlobalMemoryStatusEx(&memory_status)) {
336 return (
uint64_t)memory_status.ullAvailPhys;
341 MEMORYSTATUSEX memory_status;
342 memory_status.dwLength =
sizeof(memory_status);
344 if (!GlobalMemoryStatusEx(&memory_status)) {
348 return (
uint64_t)memory_status.ullTotalPhys;
358 return GetCurrentProcessId();
366 DWORD current_pid = GetCurrentProcessId();
368 pe.dwSize =
sizeof(PROCESSENTRY32);
369 handle = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
371 if (Process32First(
handle, &pe)) {
373 if (pe.th32ProcessID == current_pid) {
374 parent_pid = pe.th32ParentProcessID;
377 }
while( Process32Next(
handle, &pe));
397 WCHAR* title_w =
NULL;
402 length = MultiByteToWideChar(CP_UTF8, 0, title, -1,
NULL, 0);
404 err = GetLastError();
414 length = MultiByteToWideChar(CP_UTF8, 0, title, -1, title_w,
length);
416 err = GetLastError();
425 if (!SetConsoleTitleW(title_w)) {
426 err = GetLastError();
446 if (!GetConsoleTitleW(title_w,
sizeof(title_w) /
sizeof(WCHAR))) {
502 if (!QueryPerformanceCounter(&
counter)) {
512 result = (double)
counter.QuadPart / scaled_freq;
519 PROCESS_MEMORY_COUNTERS pmc;
521 current_process = GetCurrentProcess();
523 if (!GetProcessMemoryInfo(current_process, &pmc,
sizeof(pmc))) {
527 *rss = pmc.WorkingSetSize;
534 BYTE stack_buffer[4096];
540 PERF_DATA_BLOCK* data_block;
541 PERF_OBJECT_TYPE* object_type;
542 PERF_COUNTER_DEFINITION* counter_definition;
550 result = RegQueryValueExW(HKEY_PERFORMANCE_DATA,
556 if (result == ERROR_SUCCESS) {
558 }
else if (result != ERROR_MORE_DATA) {
572 if (malloced_buffer ==
NULL) {
578 if (data_size <
sizeof(*data_block))
581 data_block = (PERF_DATA_BLOCK*)
buffer;
583 if (wmemcmp(data_block->Signature,
L"PERF", 4) != 0)
586 if (data_size < data_block->HeaderLength +
sizeof(*object_type))
589 object_type = (PERF_OBJECT_TYPE*) (
buffer + data_block->HeaderLength);
591 if (object_type->NumInstances != PERF_NO_INSTANCES)
594 counter_definition = (PERF_COUNTER_DEFINITION*) (
buffer +
595 data_block->HeaderLength + object_type->HeaderLength);
596 for (
i = 0;
i < object_type->NumCounters;
i++) {
597 if ((
BYTE*) counter_definition +
sizeof(*counter_definition) >
602 if (counter_definition->CounterNameTitleIndex == 674 &&
603 counter_definition->CounterSize ==
sizeof(
uint64_t)) {
604 if (counter_definition->CounterOffset +
sizeof(
uint64_t) > data_size ||
605 !(counter_definition->CounterType & PERF_OBJECT_TIMER)) {
608 BYTE* address = (
BYTE*) object_type + object_type->DefinitionLength +
609 counter_definition->CounterOffset;
611 *uptime = floor((
double) (object_type->PerfTime.QuadPart -
value) /
612 (
double) object_type->PerfFreq.QuadPart);
618 counter_definition = (PERF_COUNTER_DEFINITION*)
619 ((
BYTE*) counter_definition + counter_definition->ByteLength);
638 SYSTEM_INFO system_info;
651 GetSystemInfo(&system_info);
652 cpu_count = system_info.dwNumberOfProcessors;
654 cpu_infos =
uv__calloc(cpu_count,
sizeof *cpu_infos);
655 if (cpu_infos ==
NULL) {
656 err = ERROR_OUTOFMEMORY;
660 sppi_size = cpu_count *
sizeof(*sppi);
663 err = ERROR_OUTOFMEMORY;
676 assert(result_size == sppi_size);
678 for (
i = 0;
i < cpu_count;
i++) {
682 DWORD cpu_speed_size =
sizeof(cpu_speed);
683 WCHAR cpu_brand[256];
684 DWORD cpu_brand_size =
sizeof(cpu_brand);
687 len = _snwprintf(key_name,
689 L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\%d",
694 err = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
699 if (
err != ERROR_SUCCESS) {
703 err = RegQueryValueExW(processor_key,
709 if (
err != ERROR_SUCCESS) {
710 RegCloseKey(processor_key);
714 err = RegQueryValueExW(processor_key,
715 L"ProcessorNameString",
720 RegCloseKey(processor_key);
721 if (
err != ERROR_SUCCESS)
724 cpu_info = &cpu_infos[
i];
725 cpu_info->
speed = cpu_speed;
734 cpu_brand_size /
sizeof(WCHAR),
740 *cpu_count_ptr = cpu_count;
741 *cpu_infos_ptr = cpu_infos;
746 if (cpu_infos !=
NULL) {
748 for (
i = 0;
i < cpu_count;
i++)
761 WORD service_pack_major,
762 WORD service_pack_minor) {
763 OSVERSIONINFOEX osvi;
764 DWORDLONG condition_mask = 0;
765 int op = VER_GREATER_EQUAL;
768 ZeroMemory(&osvi,
sizeof(OSVERSIONINFOEX));
769 osvi.dwOSVersionInfoSize =
sizeof(OSVERSIONINFOEX);
770 osvi.dwMajorVersion = os_major;
771 osvi.dwMinorVersion = os_minor;
772 osvi.wServicePackMajor = service_pack_major;
773 osvi.wServicePackMinor = service_pack_minor;
776 VER_SET_CONDITION(condition_mask, VER_MAJORVERSION,
op);
777 VER_SET_CONDITION(condition_mask, VER_MINORVERSION,
op);
778 VER_SET_CONDITION(condition_mask, VER_SERVICEPACKMAJOR,
op);
779 VER_SET_CONDITION(condition_mask, VER_SERVICEPACKMINOR,
op);
782 return (
int) VerifyVersionInfo(
784 VER_MAJORVERSION | VER_MINORVERSION |
785 VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
798 assert(address->sa_family == family);
799 assert(prefix_address->sa_family == family);
803 prefix_address_data =
807 prefix_address_data =
811 for (
i = 0; i < prefix_len >> 3;
i++) {
812 if (address_data[
i] != prefix_address_data[
i])
817 return prefix_address_data[
i] ==
818 (address_data[
i] & (0xff << (8 - prefix_len % 8)));
826 IP_ADAPTER_ADDRESSES* win_address_buf;
827 ULONG win_address_buf_size;
828 IP_ADAPTER_ADDRESSES* adapter;
832 size_t uv_address_buf_size;
837 int is_vista_or_greater;
840 *addresses_ptr =
NULL;
844 if (is_vista_or_greater) {
845 flags = GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST |
846 GAA_FLAG_SKIP_DNS_SERVER;
852 flags = GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST |
853 GAA_FLAG_SKIP_DNS_SERVER | GAA_FLAG_INCLUDE_PREFIX;
859 win_address_buf_size = 0;
860 win_address_buf =
NULL;
872 &win_address_buf_size);
874 if (
r == ERROR_SUCCESS)
880 case ERROR_BUFFER_OVERFLOW:
883 win_address_buf =
uv__malloc(win_address_buf_size);
884 if (win_address_buf ==
NULL)
889 case ERROR_NO_DATA: {
892 if (uv_address_buf ==
NULL)
896 *addresses_ptr = uv_address_buf;
901 case ERROR_ADDRESS_NOT_ASSOCIATED:
904 case ERROR_INVALID_PARAMETER:
926 uv_address_buf_size = 0;
928 for (adapter = win_address_buf;
930 adapter = adapter->Next) {
931 IP_ADAPTER_UNICAST_ADDRESS* unicast_address;
937 if (adapter->OperStatus != IfOperStatusUp ||
938 adapter->FirstUnicastAddress ==
NULL)
942 name_size = WideCharToMultiByte(CP_UTF8,
944 adapter->FriendlyName,
950 if (name_size <= 0) {
954 uv_address_buf_size += name_size;
958 for (unicast_address = (IP_ADAPTER_UNICAST_ADDRESS*)
959 adapter->FirstUnicastAddress;
960 unicast_address !=
NULL;
961 unicast_address = unicast_address->Next) {
968 uv_address_buf =
uv__malloc(uv_address_buf_size);
969 if (uv_address_buf ==
NULL) {
976 uv_address = uv_address_buf;
977 name_buf = (
char*) (uv_address_buf +
count);
980 for (adapter = win_address_buf;
982 adapter = adapter->Next) {
983 IP_ADAPTER_UNICAST_ADDRESS* unicast_address;
985 size_t max_name_size;
987 if (adapter->OperStatus != IfOperStatusUp ||
988 adapter->FirstUnicastAddress ==
NULL)
992 max_name_size = (
char*) uv_address_buf + uv_address_buf_size - name_buf;
993 if (max_name_size > (
size_t)
INT_MAX)
995 name_size = WideCharToMultiByte(CP_UTF8,
997 adapter->FriendlyName,
1000 (
int) max_name_size,
1003 if (name_size <= 0) {
1010 for (unicast_address = (IP_ADAPTER_UNICAST_ADDRESS*)
1011 adapter->FirstUnicastAddress;
1012 unicast_address !=
NULL;
1013 unicast_address = unicast_address->Next) {
1017 sa = unicast_address->Address.lpSockaddr;
1020 if (is_vista_or_greater) {
1022 ((IP_ADAPTER_UNICAST_ADDRESS_LH*) unicast_address)->OnLinkPrefixLength;
1029 IP_ADAPTER_PREFIX*
prefix;
1034 if (
prefix->Address.lpSockaddr->sa_family != sa->sa_family ||
1035 prefix->PrefixLength <= prefix_len)
1040 prefix_len =
prefix->PrefixLength;
1048 prefix_len = (sa->sa_family ==
AF_INET6) ? 128 : 32;
1051 memset(uv_address, 0,
sizeof *uv_address);
1053 uv_address->
name = name_buf;
1055 if (adapter->PhysicalAddressLength ==
sizeof(uv_address->
phys_addr)) {
1057 adapter->PhysicalAddress,
1062 (adapter->IfType == IF_TYPE_SOFTWARE_LOOPBACK);
1070 if (prefix_len % 8) {
1072 0xff << (8 - prefix_len % 8);
1080 htonl(0xffffffff << (32 - prefix_len)) : 0;
1086 name_buf += name_size;
1091 *addresses_ptr = uv_address_buf;
1105 FILETIME createTime, exitTime, kernelTime, userTime;
1106 SYSTEMTIME kernelSystemTime, userSystemTime;
1107 PROCESS_MEMORY_COUNTERS memCounters;
1108 IO_COUNTERS ioCounters;
1111 ret = GetProcessTimes(GetCurrentProcess(), &createTime, &exitTime, &kernelTime, &userTime);
1116 ret = FileTimeToSystemTime(&kernelTime, &kernelSystemTime);
1121 ret = FileTimeToSystemTime(&userTime, &userSystemTime);
1126 ret = GetProcessMemoryInfo(GetCurrentProcess(),
1128 sizeof(memCounters));
1133 ret = GetProcessIoCounters(GetCurrentProcess(), &ioCounters);
1138 memset(uv_rusage, 0,
sizeof(*uv_rusage));
1141 userSystemTime.wMinute * 60 +
1142 userSystemTime.wSecond;
1146 kernelSystemTime.wMinute * 60 +
1147 kernelSystemTime.wSecond;
1237 }
else if (bufsize > *
size) {
1244 bufsize = WideCharToMultiByte(CP_UTF8,
1257 *
size = bufsize - 1;
1287 bufsize = WideCharToMultiByte(CP_UTF8,
1308 bufsize = WideCharToMultiByte(CP_UTF8,
1323 (*utf8)[bufsize] =
'\0';
1342 bufsize = MultiByteToWideChar(CP_UTF8, 0, utf8, utf8len,
NULL, 0);
1350 *utf16 =
uv__malloc(
sizeof(WCHAR) * (bufsize + 1));
1356 bufsize = MultiByteToWideChar(CP_UTF8, 0, utf8, utf8len, *utf16, bufsize);
1364 (*utf16)[bufsize] =
L'\0';
1371 wchar_t username[
UNLEN + 1];
1380 if (OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &token) == 0)
1384 GetUserProfileDirectoryW(token,
NULL, &bufsize);
1385 if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
1397 if (!GetUserProfileDirectoryW(token,
path, &bufsize)) {
1408 if (!GetUserNameW(username, &bufsize)) {
1413 if (
r == ERROR_INSUFFICIENT_BUFFER)
1456 env = GetEnvironmentStringsW();
1460 for (penv =
env,
i = 0; *penv !=
L'\0'; penv += wcslen(penv) + 1,
i++);
1463 if (*envitems ==
NULL) {
1464 FreeEnvironmentStringsW(
env);
1471 while (*penv !=
L'\0' && cnt <
i) {
1480 ptr = strchr(
buf + 1,
'=');
1488 envitem = &(*envitems)[cnt];
1490 envitem->
value = ptr + 1;
1495 penv += wcslen(penv) + 1;
1498 FreeEnvironmentStringsW(
env);
1504 FreeEnvironmentStringsW(
env);
1506 for (
i = 0;
i < cnt;
i++) {
1507 envitem = &(*envitems)[cnt];
1519 wchar_t fastvar[512];
1539 SetLastError(ERROR_SUCCESS);
1540 len = GetEnvironmentVariableW(name_w, var, varlen);
1565 if (
r != ERROR_SUCCESS) {
1572 bufsize = WideCharToMultiByte(CP_UTF8, 0, var, -1,
NULL, 0,
NULL,
NULL);
1577 }
else if (bufsize > *
size) {
1584 bufsize = WideCharToMultiByte(CP_UTF8,
1598 *
size = bufsize - 1;
1633 r = SetEnvironmentVariableW(name_w, value_w);
1656 r = SetEnvironmentVariableW(name_w,
NULL);
1675 if (gethostname(
buf,
sizeof(
buf)) != 0)
1678 buf[
sizeof(
buf) - 1] =
'\0';
1696 *
handle = GetCurrentProcess();
1703 if (
r == ERROR_INVALID_PARAMETER)
1717 if (priority ==
NULL)
1731 if (
r == REALTIME_PRIORITY_CLASS)
1733 else if (
r == HIGH_PRIORITY_CLASS)
1735 else if (
r == ABOVE_NORMAL_PRIORITY_CLASS)
1737 else if (
r == NORMAL_PRIORITY_CLASS)
1739 else if (
r == BELOW_NORMAL_PRIORITY_CLASS)
1761 priority_class = REALTIME_PRIORITY_CLASS;
1763 priority_class = HIGH_PRIORITY_CLASS;
1765 priority_class = ABOVE_NORMAL_PRIORITY_CLASS;
1767 priority_class = NORMAL_PRIORITY_CLASS;
1769 priority_class = BELOW_NORMAL_PRIORITY_CLASS;
1771 priority_class = IDLE_PRIORITY_CLASS;
1778 if (SetPriorityClass(
handle, priority_class) == 0)
1789 OSVERSIONINFOW os_info;
1790 SYSTEM_INFO system_info;
1792 WCHAR product_name_w[256];
1793 DWORD product_name_w_size;
1795 int processor_level;
1802 os_info.dwOSVersionInfoSize =
sizeof(os_info);
1803 os_info.szCSDVersion[0] =
L'\0';
1812 #pragma warning(suppress : 4996)
1814 if (GetVersionExW(&os_info) == 0) {
1822 r = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
1823 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion",
1828 if (
r == ERROR_SUCCESS) {
1829 product_name_w_size =
sizeof(product_name_w);
1830 r = RegGetValueW(registry_key,
1835 (
PVOID) product_name_w,
1836 &product_name_w_size);
1837 RegCloseKey(registry_key);
1839 if (
r == ERROR_SUCCESS) {
1840 version_size = WideCharToMultiByte(CP_UTF8,
1848 if (version_size == 0) {
1856 if (os_info.szCSDVersion[0] !=
L'\0') {
1857 if (version_size > 0)
1858 buffer->version[version_size - 1] =
' ';
1860 if (WideCharToMultiByte(CP_UTF8,
1862 os_info.szCSDVersion,
1864 buffer->version + version_size,
1865 sizeof(
buffer->version) - version_size,
1878 (
unsigned int) os_info.dwMajorVersion,
1879 (
unsigned int) os_info.dwMinorVersion);
1889 (
unsigned int) os_info.dwMajorVersion,
1890 (
unsigned int) os_info.dwMinorVersion,
1891 (
unsigned int) os_info.dwBuildNumber);
1895 GetSystemInfo(&system_info);
1897 switch (system_info.wProcessorArchitecture) {
1898 case PROCESSOR_ARCHITECTURE_AMD64:
1901 case PROCESSOR_ARCHITECTURE_IA64:
1904 case PROCESSOR_ARCHITECTURE_INTEL:
1907 if (system_info.wProcessorLevel > 3) {
1908 processor_level = system_info.wProcessorLevel < 6 ?
1909 system_info.wProcessorLevel : 6;
1910 buffer->machine[1] =
'0' + processor_level;
1914 case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64:
1917 case PROCESSOR_ARCHITECTURE_MIPS:
1920 case PROCESSOR_ARCHITECTURE_ALPHA:
1921 case PROCESSOR_ARCHITECTURE_ALPHA64:
1924 case PROCESSOR_ARCHITECTURE_PPC:
1927 case PROCESSOR_ARCHITECTURE_SHX:
1930 case PROCESSOR_ARCHITECTURE_ARM:
1941 buffer->sysname[0] =
'\0';
1942 buffer->release[0] =
'\0';
1943 buffer->version[0] =
'\0';
1944 buffer->machine[0] =
'\0';
1952 ULARGE_INTEGER ularge;
1957 GetSystemTimeAsFileTime(&file_time);
1958 ularge.LowPart = file_time.dwLowDateTime;
1959 ularge.HighPart = file_time.dwHighDateTime;
1960 tv->tv_sec = (
int64_t) ((ularge.QuadPart - epoch) / 10000000L);
1961 tv->tv_usec = (
int32_t) (((ularge.QuadPart - epoch) % 10000000L) / 10);
static mcore_handle handle
static static fork const void static count static fd const char const char static newpath const char static path const char path
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval tv
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
void uv_fatal_error(const int errorno, const char *syscall)
unsigned short prefix[65536]
return memset(p, 0, total)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc pid
static static fork const void static count static fd const char const char static newpath char char argv
static static fork const void static count static fd const char static mode const char static pathname const char static path const char static dev const char static group static getpid static getuid void void static data static pause access
static const char struct stat static buf struct stat static buf static vhangup int status
assert(limit<=UINT32_MAX/2)
static struct sockaddr static addrlen static backlog const void static flags void flags
ssize_t uv__strscpy(char *d, const char *s, size_t n)
struct in6_addr sin6_addr
struct uv_cpu_times_s cpu_times
struct sockaddr_in6 netmask6
struct sockaddr_in6 address6
struct sockaddr_in netmask4
union uv_interface_address_s::@399 netmask
union uv_interface_address_s::@398 address
struct sockaddr_in address4
static CRITICAL_SECTION process_title_lock
BOOLEAN NTAPI SystemFunction036(PVOID Buffer, ULONG BufferLength)
int uv_exepath(char *buffer, size_t *size_ptr)
void uv_os_free_passwd(uv_passwd_t *pwd)
uint64_t uv__hrtime(unsigned int scale)
int uv_cwd(char *buffer, size_t *size)
uint64_t uv_get_total_memory(void)
int uv_os_homedir(char *buffer, size_t *size)
void uv_loadavg(double avg[3])
int uv_cpu_info(uv_cpu_info_t **cpu_infos_ptr, int *cpu_count_ptr)
int uv_chdir(const char *dir)
int uv_os_setenv(const char *name, const char *value)
int uv_os_getenv(const char *name, char *buffer, size_t *size)
uint64_t uv_get_free_memory(void)
int uv__convert_utf16_to_utf8(const WCHAR *utf16, int utf16len, char **utf8)
int uv_os_get_passwd(uv_passwd_t *pwd)
void uv__process_title_cleanup(void)
int uv__getpwuid_r(uv_passwd_t *pwd)
int uv_os_tmpdir(char *buffer, size_t *size)
uv_pid_t uv_os_getpid(void)
int uv_os_setpriority(uv_pid_t pid, int priority)
int uv_os_environ(uv_env_item_t **envitems, int *count)
int uv_os_gethostname(char *buffer, size_t *size)
int uv_getrusage(uv_rusage_t *uv_rusage)
static int is_windows_version_or_greater(DWORD os_major, DWORD os_minor, WORD service_pack_major, WORD service_pack_minor)
char ** uv_setup_args(int argc, char **argv)
int uv_uptime(double *uptime)
void uv_free_interface_addresses(uv_interface_address_t *addresses, int count)
uv_pid_t uv_os_getppid(void)
int uv_os_uname(uv_utsname_t *buffer)
int uv_os_getpriority(uv_pid_t pid, int *priority)
int uv_interface_addresses(uv_interface_address_t **addresses_ptr, int *count_ptr)
static uint64_t hrtime_frequency_
uint64_t uv_get_constrained_memory(void)
int uv_gettimeofday(uv_timeval64_t *tv)
int uv__convert_utf8_to_utf16(const char *utf8, int utf8len, WCHAR **utf16)
void uv_sleep(unsigned int msec)
static char * process_title
int uv_os_unsetenv(const char *name)
static int uv__get_process_title(void)
int uv__random_rtlgenrandom(void *buf, size_t buflen)
static int uv__get_handle(uv_pid_t pid, int access, HANDLE *handle)
int uv_set_process_title(const char *title)
int uv_get_process_title(char *buffer, size_t size)
int uv_resident_set_memory(size_t *rss)
static int address_prefix_match(int family, struct sockaddr *address, struct sockaddr *prefix_address, int prefix_len)
void error(const char *msg)
char * uv__strdup(const char *s)
void * uv__malloc(size_t size)
void * uv__calloc(size_t count, size_t size)
struct uv_interface_address_s uv_interface_address_t
UV_EXTERN int uv_translate_sys_error(int sys_errno)
#define UV_PRIORITY_BELOW_NORMAL
#define UV_PRIORITY_ABOVE_NORMAL
#define UV_MAXHOSTNAMESIZE
#define UV_PRIORITY_NORMAL
#define UV_PRIORITY_HIGHEST
sRtlGetVersion pRtlGetVersion
sRtlNtStatusToDosError pRtlNtStatusToDosError
sNtQuerySystemInformation pNtQuerySystemInformation
#define SystemProcessorPerformanceInformation
#define NT_SUCCESS(status)
#define buffer_size(buffer)