Rizin
unix-like reverse engineering framework and cli tools
|
#include "uv.h"
#include "internal.h"
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
#include <net/if.h>
#include <sys/epoll.h>
#include <sys/param.h>
#include <sys/prctl.h>
#include <sys/sysinfo.h>
#include <unistd.h>
#include <fcntl.h>
#include <time.h>
#include <ifaddrs.h>
#include <sys/socket.h>
#include <net/ethernet.h>
#include <netpacket/packet.h>
Go to the source code of this file.
Macros | |
#define | HAVE_IFADDRS_H 1 |
#define | CLOCK_MONOTONIC_COARSE 6 |
#define | CLOCK_BOOTTIME 7 |
#define CLOCK_BOOTTIME 7 |
Definition at line 75 of file linux-core.c.
#define CLOCK_MONOTONIC_COARSE 6 |
Definition at line 67 of file linux-core.c.
#define HAVE_IFADDRS_H 1 |
Definition at line 46 of file linux-core.c.
Definition at line 884 of file linux-core.c.
References benchmark::FILE, NULL, PRIu64, snprintf, uv__open_file(), and val.
Referenced by read_speeds().
|
static |
Definition at line 717 of file linux-core.c.
References benchmark::FILE, uv_cpu_info_s::model, NULL, uv_cpu_info_s::speed, UV__ERR, uv__open_file(), and uv__strndup().
Referenced by uv_cpu_info().
|
static |
Definition at line 704 of file linux-core.c.
References num, and read_cpufreq().
Referenced by uv_cpu_info().
|
static |
Definition at line 810 of file linux-core.c.
References assert(), uv_cpu_info_s::cpu_times, uv_cpu_times_s::idle, int, uv_cpu_times_s::irq, len, n, nice, uv_cpu_times_s::nice, num, PRIu64, r, uv_cpu_times_s::sys, and uv_cpu_times_s::user.
Referenced by uv_cpu_info().
uint64_t uv__hrtime | ( | uv_clocktype_t | type | ) |
Definition at line 512 of file linux-core.c.
References CLOCK_MONOTONIC_COARSE, done, timespec::tv_nsec, timespec::tv_sec, type, uv__load_relaxed, uv__store_relaxed, and UV_CLOCK_FAST.
Definition at line 907 of file linux-core.c.
References ifaddrs::ifa_addr, ifaddrs::ifa_flags, NULL, and PF_PACKET.
Referenced by uv_interface_addresses().
Definition at line 170 of file linux-core.c.
References e, EEXIST, epoll_ctl(), EPOLL_CTL_ADD, EPOLL_CTL_DEL, fd, loop, memset(), and UV__ERR.
Definition at line 111 of file linux-core.c.
References err, loop, uv__close(), uv__inotify_fork(), uv__platform_loop_delete(), and uv__platform_loop_init().
Definition at line 191 of file linux-core.c.
References ARRAY_SIZE, assert(), count, e, EEXIST, EINTR, epoll_ctl(), EPOLL_CTL_ADD, EPOLL_CTL_DEL, EPOLL_CTL_MOD, epoll_wait(), epoll_event::events, fd, epoll_event::fd, flags, i, loop, memset(), nfds, NULL, op, QUEUE_DATA, QUEUE_EMPTY, QUEUE_HEAD, QUEUE_INIT, QUEUE_REMOVE, SAVE_ERRNO, timeout, uv__get_internal_fields, uv__load_relaxed, uv__metrics_set_provider_entry_time(), uv__metrics_update_idle_time(), UV__POLLPRI, UV__POLLRDHUP, uv__store_relaxed, UV_LOOP_BLOCK_SIGPROF, UV_METRICS_IDLE_TIME, w, and x.
Definition at line 137 of file linux-core.c.
References assert(), epoll_ctl(), EPOLL_CTL_DEL, epoll_event::events, fd, i, loop, memset(), nfds, and NULL.
void uv__platform_loop_delete | ( | uv_loop_t * | loop | ) |
Definition at line 129 of file linux-core.c.
References loop, uv__close(), and uv__io_stop().
Referenced by uv__io_fork().
Definition at line 86 of file linux-core.c.
References EINVAL, epoll_create1(), fd, loop, NULL, O_CLOEXEC, uv__cloexec, and UV__ERR.
Referenced by uv__io_fork().
Definition at line 1108 of file linux-core.c.
References PRIu64, snprintf, and uv__slurp().
Referenced by uv_get_constrained_memory().
Definition at line 1054 of file linux-core.c.
References NULL, p, PRIu64, and uv__slurp().
Referenced by uv_get_free_memory(), and uv_get_total_memory().
void uv__set_process_title | ( | const char * | title | ) |
Definition at line 1021 of file linux-core.c.
Definition at line 1028 of file linux-core.c.
References assert(), EINTR, fd, len, n, O_RDONLY, read(), uv__close_nocheckstdio(), UV__ERR, and uv__open_cloexec().
Referenced by uv__read_cgroups_uint64(), uv__read_proc_meminfo(), and uv_loadavg().
int uv_cpu_info | ( | uv_cpu_info_t ** | cpu_infos, |
int * | count | ||
) |
Definition at line 653 of file linux-core.c.
References count, EINPROGRESS, EINTR, err, benchmark::FILE, NULL, out, read_models(), read_speeds(), read_times(), uv__calloc(), uv__cpu_num(), UV__ERR, uv__open_file(), and uv_free_cpu_info().
void uv_free_interface_addresses | ( | uv_interface_address_t * | addresses, |
int | count | ||
) |
Definition at line 1009 of file linux-core.c.
References count, i, and uv__free().
uint64_t uv_get_constrained_memory | ( | void | ) |
Definition at line 1122 of file linux-core.c.
References uv__read_cgroups_uint64().
uint64_t uv_get_free_memory | ( | void | ) |
Definition at line 1076 of file linux-core.c.
References info(), sysinfo, and uv__read_proc_meminfo().
uint64_t uv_get_total_memory | ( | void | ) |
Definition at line 1092 of file linux-core.c.
References info(), sysinfo, and uv__read_proc_meminfo().
int uv_interface_addresses | ( | uv_interface_address_t ** | addresses, |
int * | count | ||
) |
Definition at line 921 of file linux-core.c.
References uv_interface_address_s::address, uv_interface_address_s::address4, uv_interface_address_s::address6, AF_INET6, count, freeifaddrs(), getifaddrs(), i, ifaddrs::ifa_addr, ifaddrs::ifa_flags, ifaddrs::ifa_name, ifaddrs::ifa_netmask, ifaddrs::ifa_next, uv_interface_address_s::is_internal, memcpy(), uv_interface_address_s::name, uv_interface_address_s::netmask, uv_interface_address_s::netmask4, uv_interface_address_s::netmask6, NULL, uv_interface_address_s::phys_addr, uv__calloc(), UV__ERR, UV__EXCLUDE_IFADDR, UV__EXCLUDE_IFPHYS, uv__ifaddr_exclude(), and uv__strdup().
void uv_loadavg | ( | double | avg[3] | ) |
int uv_uptime | ( | double * | uptime | ) |
Definition at line 606 of file linux-core.c.
References CLOCK_BOOTTIME, EINVAL, r, timespec::tv_sec, and UV__ERR.