Macros | Functions | Variables
unix/core.c File Reference
#include "uv.h"
#include "internal.h"
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <limits.h>
#include <sys/uio.h>
#include <sys/resource.h>
#include <pwd.h>
#include <sys/utsname.h>
#include <sys/time.h>
Include dependency graph for unix/core.c:

Go to the source code of this file.

Macros

#define CHECK_ENV_VAR(name)
 

Functions

static void maybe_resize (uv_loop_t *loop, unsigned int len)
 
static unsigned int next_power_of_two (unsigned int val)
 
 STATIC_ASSERT (offsetof(uv_buf_t, base)==offsetof(struct iovec, iov_base))
 
 STATIC_ASSERT (offsetof(uv_buf_t, len)==offsetof(struct iovec, iov_len))
 
 STATIC_ASSERT (sizeof(&((uv_buf_t *) 0) ->base)==sizeof(((struct iovec *) 0) ->iov_base))
 
 STATIC_ASSERT (sizeof(&((uv_buf_t *) 0) ->len)==sizeof(((struct iovec *) 0) ->iov_len))
 
 STATIC_ASSERT (sizeof(uv_buf_t)==sizeof(struct iovec))
 
int uv__accept (int sockfd)
 
int uv__cloexec_fcntl (int fd, int set)
 
int uv__cloexec_ioctl (int fd, int set)
 
int uv__close (int fd)
 
int uv__close_nocancel (int fd)
 
int uv__close_nocheckstdio (int fd)
 
int uv__dup2_cloexec (int oldfd, int newfd)
 
int uv__fd_exists (uv_loop_t *loop, int fd)
 
static void uv__finish_close (uv_handle_t *handle)
 
int uv__getiovmax (void)
 
int uv__getpwuid_r (uv_passwd_t *pwd)
 
int uv__getsockpeername (const uv_handle_t *handle, uv__peersockfunc func, struct sockaddr *name, int *namelen)
 
int uv__io_active (const uv__io_t *w, unsigned int events)
 
void uv__io_close (uv_loop_t *loop, uv__io_t *w)
 
void uv__io_feed (uv_loop_t *loop, uv__io_t *w)
 
void uv__io_init (uv__io_t *w, uv__io_cb cb, int fd)
 
void uv__io_start (uv_loop_t *loop, uv__io_t *w, unsigned int events)
 
void uv__io_stop (uv_loop_t *loop, uv__io_t *w, unsigned int events)
 
static int uv__loop_alive (const uv_loop_t *loop)
 
void uv__make_close_pending (uv_handle_t *handle)
 
int uv__nonblock_fcntl (int fd, int set)
 
int uv__nonblock_ioctl (int fd, int set)
 
int uv__open_cloexec (const char *path, int flags)
 
FILE * uv__open_file (const char *path)
 
ssize_t uv__recvmsg (int fd, struct msghdr *msg, int flags)
 
static void uv__run_closing_handles (uv_loop_t *loop)
 
static int uv__run_pending (uv_loop_t *loop)
 
int uv__socket (int domain, int type, int protocol)
 
int uv__socket_sockopt (uv_handle_t *handle, int optname, int *value)
 
int uv_backend_fd (const uv_loop_t *loop)
 
int uv_backend_timeout (const uv_loop_t *loop)
 
int uv_chdir (const char *dir)
 
void uv_close (uv_handle_t *handle, uv_close_cb close_cb)
 
int uv_cwd (char *buffer, size_t *size)
 
void uv_disable_stdio_inheritance (void)
 
int uv_fileno (const uv_handle_t *handle, uv_os_fd_t *fd)
 
uv_os_fd_t uv_get_osfhandle (int fd)
 
int uv_getrusage (uv_rusage_t *rusage)
 
int uv_gettimeofday (uv_timeval64_t *tv)
 
uint64_t uv_hrtime (void)
 
int uv_is_active (const uv_handle_t *handle)
 
int uv_is_closing (const uv_handle_t *handle)
 
int uv_loop_alive (const uv_loop_t *loop)
 
int uv_open_osfhandle (uv_os_fd_t os_fd)
 
int uv_os_environ (uv_env_item_t **envitems, int *count)
 
void uv_os_free_passwd (uv_passwd_t *pwd)
 
int uv_os_get_passwd (uv_passwd_t *pwd)
 
int uv_os_getenv (const char *name, char *buffer, size_t *size)
 
int uv_os_gethostname (char *buffer, size_t *size)
 
uv_pid_t uv_os_getpid (void)
 
uv_pid_t uv_os_getppid (void)
 
int uv_os_getpriority (uv_pid_t pid, int *priority)
 
int uv_os_homedir (char *buffer, size_t *size)
 
int uv_os_setenv (const char *name, const char *value)
 
int uv_os_setpriority (uv_pid_t pid, int priority)
 
int uv_os_tmpdir (char *buffer, size_t *size)
 
int uv_os_uname (uv_utsname_t *buffer)
 
int uv_os_unsetenv (const char *name)
 
int uv_run (uv_loop_t *loop, uv_run_mode mode)
 
void uv_sleep (unsigned int msec)
 
int uv_translate_sys_error (int sys_errno)
 
void uv_update_time (uv_loop_t *loop)
 

Variables

char ** environ
 

Macro Definition Documentation

◆ CHECK_ENV_VAR

#define CHECK_ENV_VAR (   name)
Value:
do { \
buf = getenv(name); \
if (buf != NULL) \
goto return_buffer; \
} \
while (0)

Function Documentation

◆ maybe_resize()

static void maybe_resize ( uv_loop_t loop,
unsigned int  len 
)
static

Definition at line 818 of file unix/core.c.

◆ next_power_of_two()

static unsigned int next_power_of_two ( unsigned int  val)
static

Definition at line 807 of file unix/core.c.

◆ STATIC_ASSERT() [1/5]

STATIC_ASSERT ( offsetof(uv_buf_t, base)  = =offsetof(struct iovec, iov_base))

◆ STATIC_ASSERT() [2/5]

STATIC_ASSERT ( offsetof(uv_buf_t, len = =offsetof(struct iovec, iov_len))

◆ STATIC_ASSERT() [3/5]

STATIC_ASSERT ( sizeof(&((uv_buf_t *) 0) ->base)  = =sizeof(((struct iovec *) 0) ->iov_base))

◆ STATIC_ASSERT() [4/5]

STATIC_ASSERT ( sizeof(&((uv_buf_t *) 0) ->len = =sizeof(((struct iovec *) 0) ->iov_len))

◆ STATIC_ASSERT() [5/5]

STATIC_ASSERT ( sizeof(uv_buf_t = =sizeof(struct iovec))

◆ uv__accept()

int uv__accept ( int  sockfd)

Definition at line 477 of file unix/core.c.

◆ uv__cloexec_fcntl()

int uv__cloexec_fcntl ( int  fd,
int  set 
)

Definition at line 627 of file unix/core.c.

◆ uv__cloexec_ioctl()

int uv__cloexec_ioctl ( int  fd,
int  set 
)

Definition at line 581 of file unix/core.c.

◆ uv__close()

int uv__close ( int  fd)

Definition at line 557 of file unix/core.c.

◆ uv__close_nocancel()

int uv__close_nocancel ( int  fd)

Definition at line 518 of file unix/core.c.

◆ uv__close_nocheckstdio()

int uv__close_nocheckstdio ( int  fd)

Definition at line 538 of file unix/core.c.

◆ uv__dup2_cloexec()

int uv__dup2_cloexec ( int  oldfd,
int  newfd 
)

Definition at line 1019 of file unix/core.c.

◆ uv__fd_exists()

int uv__fd_exists ( uv_loop_t loop,
int  fd 
)

Definition at line 953 of file unix/core.c.

◆ uv__finish_close()

static void uv__finish_close ( uv_handle_t handle)
static

Definition at line 239 of file unix/core.c.

◆ uv__getiovmax()

int uv__getiovmax ( void  )

Definition at line 219 of file unix/core.c.

◆ uv__getpwuid_r()

int uv__getpwuid_r ( uv_passwd_t pwd)

Definition at line 1134 of file unix/core.c.

◆ uv__getsockpeername()

int uv__getsockpeername ( const uv_handle_t handle,
uv__peersockfunc  func,
struct sockaddr *  name,
int namelen 
)

Definition at line 1485 of file unix/core.c.

◆ uv__io_active()

int uv__io_active ( const uv__io_t w,
unsigned int  events 
)

Definition at line 946 of file unix/core.c.

◆ uv__io_close()

void uv__io_close ( uv_loop_t loop,
uv__io_t w 
)

Definition at line 930 of file unix/core.c.

◆ uv__io_feed()

void uv__io_feed ( uv_loop_t loop,
uv__io_t w 
)

Definition at line 940 of file unix/core.c.

◆ uv__io_init()

void uv__io_init ( uv__io_t w,
uv__io_cb  cb,
int  fd 
)

Definition at line 853 of file unix/core.c.

◆ uv__io_start()

void uv__io_start ( uv_loop_t loop,
uv__io_t w,
unsigned int  events 
)

Definition at line 870 of file unix/core.c.

◆ uv__io_stop()

void uv__io_stop ( uv_loop_t loop,
uv__io_t w,
unsigned int  events 
)

Definition at line 898 of file unix/core.c.

◆ uv__loop_alive()

static int uv__loop_alive ( const uv_loop_t loop)
static

Definition at line 349 of file unix/core.c.

◆ uv__make_close_pending()

void uv__make_close_pending ( uv_handle_t handle)

Definition at line 212 of file unix/core.c.

◆ uv__nonblock_fcntl()

int uv__nonblock_fcntl ( int  fd,
int  set 
)

Definition at line 596 of file unix/core.c.

◆ uv__nonblock_ioctl()

int uv__nonblock_ioctl ( int  fd,
int  set 
)

Definition at line 566 of file unix/core.c.

◆ uv__open_cloexec()

int uv__open_cloexec ( const char *  path,
int  flags 
)

Definition at line 991 of file unix/core.c.

◆ uv__open_file()

FILE* uv__open_file ( const char *  path)

Definition at line 461 of file unix/core.c.

◆ uv__recvmsg()

ssize_t uv__recvmsg ( int  fd,
struct msghdr *  msg,
int  flags 
)

Definition at line 658 of file unix/core.c.

◆ uv__run_closing_handles()

static void uv__run_closing_handles ( uv_loop_t loop)
static

Definition at line 304 of file unix/core.c.

◆ uv__run_pending()

static int uv__run_pending ( uv_loop_t loop)
static

Definition at line 785 of file unix/core.c.

◆ uv__socket()

int uv__socket ( int  domain,
int  type,
int  protocol 
)

Definition at line 424 of file unix/core.c.

◆ uv__socket_sockopt()

int uv__socket_sockopt ( uv_handle_t handle,
int  optname,
int value 
)

Definition at line 184 of file unix/core.c.

◆ uv_backend_fd()

int uv_backend_fd ( const uv_loop_t loop)

Definition at line 324 of file unix/core.c.

◆ uv_backend_timeout()

int uv_backend_timeout ( const uv_loop_t loop)

Definition at line 329 of file unix/core.c.

◆ uv_chdir()

int uv_chdir ( const char *  dir)

Definition at line 735 of file unix/core.c.

◆ uv_close()

void uv_close ( uv_handle_t handle,
uv_close_cb  close_cb 
)

Definition at line 112 of file unix/core.c.

◆ uv_cwd()

int uv_cwd ( char *  buffer,
size_t *  size 
)

Definition at line 696 of file unix/core.c.

◆ uv_disable_stdio_inheritance()

void uv_disable_stdio_inheritance ( void  )

Definition at line 743 of file unix/core.c.

◆ uv_fileno()

int uv_fileno ( const uv_handle_t handle,
uv_os_fd_t fd 
)

Definition at line 755 of file unix/core.c.

◆ uv_get_osfhandle()

uv_os_fd_t uv_get_osfhandle ( int  fd)

Definition at line 1384 of file unix/core.c.

◆ uv_getrusage()

int uv_getrusage ( uv_rusage_t rusage)

Definition at line 958 of file unix/core.c.

◆ uv_gettimeofday()

int uv_gettimeofday ( uv_timeval64_t tv)

Definition at line 1507 of file unix/core.c.

◆ uv_hrtime()

uint64_t uv_hrtime ( void  )

Definition at line 107 of file unix/core.c.

◆ uv_is_active()

int uv_is_active ( const uv_handle_t handle)

Definition at line 418 of file unix/core.c.

◆ uv_is_closing()

int uv_is_closing ( const uv_handle_t handle)

Definition at line 319 of file unix/core.c.

◆ uv_loop_alive()

int uv_loop_alive ( const uv_loop_t loop)

Definition at line 356 of file unix/core.c.

◆ uv_open_osfhandle()

int uv_open_osfhandle ( uv_os_fd_t  os_fd)

Definition at line 1388 of file unix/core.c.

◆ uv_os_environ()

int uv_os_environ ( uv_env_item_t **  envitems,
int count 
)

Definition at line 1250 of file unix/core.c.

◆ uv_os_free_passwd()

void uv_os_free_passwd ( uv_passwd_t pwd)

Definition at line 1223 of file unix/core.c.

◆ uv_os_get_passwd()

int uv_os_get_passwd ( uv_passwd_t pwd)

Definition at line 1239 of file unix/core.c.

◆ uv_os_getenv()

int uv_os_getenv ( const char *  name,
char *  buffer,
size_t *  size 
)

Definition at line 1306 of file unix/core.c.

◆ uv_os_gethostname()

int uv_os_gethostname ( char *  buffer,
size_t *  size 
)

Definition at line 1354 of file unix/core.c.

◆ uv_os_getpid()

uv_pid_t uv_os_getpid ( void  )

Definition at line 1392 of file unix/core.c.

◆ uv_os_getppid()

uv_pid_t uv_os_getppid ( void  )

Definition at line 1397 of file unix/core.c.

◆ uv_os_getpriority()

int uv_os_getpriority ( uv_pid_t  pid,
int priority 
)

Definition at line 1402 of file unix/core.c.

◆ uv_os_homedir()

int uv_os_homedir ( char *  buffer,
size_t *  size 
)

Definition at line 1047 of file unix/core.c.

◆ uv_os_setenv()

int uv_os_setenv ( const char *  name,
const char *  value 
)

Definition at line 1332 of file unix/core.c.

◆ uv_os_setpriority()

int uv_os_setpriority ( uv_pid_t  pid,
int  priority 
)

Definition at line 1419 of file unix/core.c.

◆ uv_os_tmpdir()

int uv_os_tmpdir ( char *  buffer,
size_t *  size 
)

Definition at line 1083 of file unix/core.c.

◆ uv_os_uname()

int uv_os_uname ( uv_utsname_t buffer)

Definition at line 1430 of file unix/core.c.

◆ uv_os_unsetenv()

int uv_os_unsetenv ( const char *  name)

Definition at line 1343 of file unix/core.c.

◆ uv_run()

int uv_run ( uv_loop_t loop,
uv_run_mode  mode 
)

Definition at line 361 of file unix/core.c.

◆ uv_sleep()

void uv_sleep ( unsigned int  msec)

Definition at line 1521 of file unix/core.c.

◆ uv_translate_sys_error()

int uv_translate_sys_error ( int  sys_errno)

Definition at line 1244 of file unix/core.c.

◆ uv_update_time()

void uv_update_time ( uv_loop_t loop)

Definition at line 413 of file unix/core.c.

Variable Documentation

◆ environ

char** environ
buf
voidpf void * buf
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
setup.name
name
Definition: setup.py:542
getenv
#define getenv(ptr)
Definition: ares_private.h:106


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:08