Rizin
unix-like reverse engineering framework and cli tools
cygwin.c File Reference
#include "uv.h"
#include "internal.h"
#include <sys/sysinfo.h>
#include <unistd.h>

Go to the source code of this file.

Functions

int uv_uptime (double *uptime)
 
int uv_resident_set_memory (size_t *rss)
 
int uv_cpu_info (uv_cpu_info_t **cpu_infos, int *count)
 
uint64_t uv_get_constrained_memory (void)
 

Function Documentation

◆ uv_cpu_info()

int uv_cpu_info ( uv_cpu_info_t **  cpu_infos,
int count 
)

Definition at line 44 of file cygwin.c.

44  {
45  /* FIXME: read /proc/stat? */
46  *cpu_infos = NULL;
47  *count = 0;
48  return UV_ENOSYS;
49 }
#define NULL
Definition: cris-opc.c:27
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
Definition: sflib.h:98

References count, and NULL.

◆ uv_get_constrained_memory()

uint64_t uv_get_constrained_memory ( void  )

Definition at line 51 of file cygwin.c.

51  {
52  return 0; /* Memory constraints are unknown. */
53 }

◆ uv_resident_set_memory()

int uv_resident_set_memory ( size_t rss)

Definition at line 38 of file cygwin.c.

38  {
39  /* FIXME: read /proc/meminfo? */
40  *rss = 0;
41  return 0;
42 }

◆ uv_uptime()

int uv_uptime ( double *  uptime)

Definition at line 28 of file cygwin.c.

28  {
29  struct sysinfo info;
30 
31  if (sysinfo(&info) < 0)
32  return UV__ERR(errno);
33 
34  *uptime = info.uptime;
35  return 0;
36 }
RzBinInfo * info(RzBinFile *bf)
Definition: bin_ne.c:86
#define UV__ERR(x)
Definition: errno.h:29
static const char struct stat static buf struct stat static buf static vhangup int struct rusage static rusage sysinfo
Definition: sflib.h:147

References info(), sysinfo, and UV__ERR.