Classes | Macros | Typedefs
unix.h File Reference
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <dirent.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <termios.h>
#include <pwd.h>
#include <semaphore.h>
#include <sys/param.h>
#include <pthread.h>
#include <signal.h>
#include "uv/threadpool.h"
Include dependency graph for unix.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _uv_barrier
 
struct  uv__io_s
 
struct  uv_barrier_t
 
struct  uv_buf_t
 
struct  uv_lib_t
 

Macros

#define NI_MAXHOST   1025
 
#define NI_MAXSERV   32
 
#define UV_ASYNC_PRIVATE_FIELDS
 
#define UV_CHECK_PRIVATE_FIELDS
 
#define UV_CONNECT_PRIVATE_FIELDS   void* queue[2]; \
 
#define UV_DIR_PRIVATE_FIELDS   DIR* dir;
 
#define UV_DYNAMIC   /* empty */
 
#define UV_FS_EVENT_PRIVATE_FIELDS
 
#define UV_FS_O_APPEND   0
 
#define UV_FS_O_CREAT   0
 
#define UV_FS_O_DIRECT   0
 
#define UV_FS_O_DIRECTORY   0
 
#define UV_FS_O_DSYNC   0
 
#define UV_FS_O_EXCL   0
 
#define UV_FS_O_EXLOCK   0
 
#define UV_FS_O_FILEMAP   0
 
#define UV_FS_O_NOATIME   0
 
#define UV_FS_O_NOCTTY   0
 
#define UV_FS_O_NOFOLLOW   0
 
#define UV_FS_O_NONBLOCK   0
 
#define UV_FS_O_RANDOM   0
 
#define UV_FS_O_RDONLY   0
 
#define UV_FS_O_RDWR   0
 
#define UV_FS_O_SEQUENTIAL   0
 
#define UV_FS_O_SHORT_LIVED   0
 
#define UV_FS_O_SYMLINK   0
 
#define UV_FS_O_SYNC   0
 
#define UV_FS_O_TEMPORARY   0
 
#define UV_FS_O_TRUNC   0
 
#define UV_FS_O_WRONLY   0
 
#define UV_FS_PRIVATE_FIELDS
 
#define UV_GETADDRINFO_PRIVATE_FIELDS
 
#define UV_GETNAMEINFO_PRIVATE_FIELDS
 
#define UV_HANDLE_PRIVATE_FIELDS
 
#define UV_IDLE_PRIVATE_FIELDS
 
#define UV_IO_PRIVATE_PLATFORM_FIELDS   /* empty */
 
#define UV_LOOP_PRIVATE_FIELDS
 
#define UV_ONCE_INIT   PTHREAD_ONCE_INIT
 
#define UV_PIPE_PRIVATE_FIELDS   const char* pipe_fname; /* strdup'ed */
 
#define UV_PLATFORM_FS_EVENT_FIELDS   /* empty */
 
#define UV_PLATFORM_LOOP_FIELDS   /* empty */
 
#define UV_PLATFORM_SEM_T   sem_t
 
#define UV_POLL_PRIVATE_FIELDS   uv__io_t io_watcher;
 
#define UV_PREPARE_PRIVATE_FIELDS
 
#define UV_PRIVATE_REQ_TYPES   /* empty */
 
#define UV_PROCESS_PRIVATE_FIELDS
 
#define UV_REQ_PRIVATE_FIELDS   /* empty */
 
#define UV_REQ_TYPE_PRIVATE   /* empty */
 
#define UV_SHUTDOWN_PRIVATE_FIELDS   /* empty */
 
#define UV_SIGNAL_PRIVATE_FIELDS
 
#define UV_STREAM_PRIVATE_FIELDS
 
#define UV_STREAM_PRIVATE_PLATFORM_FIELDS   /* empty */
 
#define UV_TCP_PRIVATE_FIELDS   /* empty */
 
#define UV_TIMER_PRIVATE_FIELDS
 
#define UV_TTY_PRIVATE_FIELDS
 
#define UV_UDP_PRIVATE_FIELDS
 
#define UV_UDP_SEND_PRIVATE_FIELDS
 
#define UV_WORK_PRIVATE_FIELDS   struct uv__work work_req;
 
#define UV_WRITE_PRIVATE_FIELDS
 

Typedefs

typedef struct dirent uv__dirent_t
 
typedef void(* uv__io_cb) (struct uv_loop_s *loop, struct uv__io_s *w, unsigned int events)
 
typedef struct uv__io_s uv__io_t
 
typedef struct uv_buf_t uv_buf_t
 
typedef pthread_cond_t uv_cond_t
 
typedef int uv_file
 
typedef gid_t uv_gid_t
 
typedef pthread_key_t uv_key_t
 
typedef pthread_mutex_t uv_mutex_t
 
typedef pthread_once_t uv_once_t
 
typedef int uv_os_fd_t
 
typedef int uv_os_sock_t
 
typedef pid_t uv_pid_t
 
typedef pthread_rwlock_t uv_rwlock_t
 
typedef UV_PLATFORM_SEM_T uv_sem_t
 
typedef pthread_t uv_thread_t
 
typedef uid_t uv_uid_t
 

Macro Definition Documentation

◆ NI_MAXHOST

#define NI_MAXHOST   1025

Definition at line 75 of file unix.h.

◆ NI_MAXSERV

#define NI_MAXSERV   32

Definition at line 79 of file unix.h.

◆ UV_ASYNC_PRIVATE_FIELDS

#define UV_ASYNC_PRIVATE_FIELDS
Value:
void* queue[2]; \
int pending; \

Definition at line 325 of file unix.h.

◆ UV_CHECK_PRIVATE_FIELDS

#define UV_CHECK_PRIVATE_FIELDS
Value:
void* queue[2]; \

Definition at line 317 of file unix.h.

◆ UV_CONNECT_PRIVATE_FIELDS

#define UV_CONNECT_PRIVATE_FIELDS   void* queue[2]; \

Definition at line 268 of file unix.h.

◆ UV_DIR_PRIVATE_FIELDS

#define UV_DIR_PRIVATE_FIELDS   DIR* dir;

Definition at line 171 of file unix.h.

◆ UV_DYNAMIC

#define UV_DYNAMIC   /* empty */

Definition at line 214 of file unix.h.

◆ UV_FS_EVENT_PRIVATE_FIELDS

#define UV_FS_EVENT_PRIVATE_FIELDS
Value:
UV_PLATFORM_FS_EVENT_FIELDS \

Definition at line 393 of file unix.h.

◆ UV_FS_O_APPEND

#define UV_FS_O_APPEND   0

Definition at line 401 of file unix.h.

◆ UV_FS_O_CREAT

#define UV_FS_O_CREAT   0

Definition at line 406 of file unix.h.

◆ UV_FS_O_DIRECT

#define UV_FS_O_DIRECT   0

Definition at line 424 of file unix.h.

◆ UV_FS_O_DIRECTORY

#define UV_FS_O_DIRECTORY   0

Definition at line 430 of file unix.h.

◆ UV_FS_O_DSYNC

#define UV_FS_O_DSYNC   0

Definition at line 435 of file unix.h.

◆ UV_FS_O_EXCL

#define UV_FS_O_EXCL   0

Definition at line 440 of file unix.h.

◆ UV_FS_O_EXLOCK

#define UV_FS_O_EXLOCK   0

Definition at line 445 of file unix.h.

◆ UV_FS_O_FILEMAP

#define UV_FS_O_FILEMAP   0

Definition at line 499 of file unix.h.

◆ UV_FS_O_NOATIME

#define UV_FS_O_NOATIME   0

Definition at line 450 of file unix.h.

◆ UV_FS_O_NOCTTY

#define UV_FS_O_NOCTTY   0

Definition at line 455 of file unix.h.

◆ UV_FS_O_NOFOLLOW

#define UV_FS_O_NOFOLLOW   0

Definition at line 460 of file unix.h.

◆ UV_FS_O_NONBLOCK

#define UV_FS_O_NONBLOCK   0

Definition at line 465 of file unix.h.

◆ UV_FS_O_RANDOM

#define UV_FS_O_RANDOM   0

Definition at line 500 of file unix.h.

◆ UV_FS_O_RDONLY

#define UV_FS_O_RDONLY   0

Definition at line 470 of file unix.h.

◆ UV_FS_O_RDWR

#define UV_FS_O_RDWR   0

Definition at line 475 of file unix.h.

◆ UV_FS_O_SEQUENTIAL

#define UV_FS_O_SEQUENTIAL   0

Definition at line 502 of file unix.h.

◆ UV_FS_O_SHORT_LIVED

#define UV_FS_O_SHORT_LIVED   0

Definition at line 501 of file unix.h.

◆ UV_FS_O_SYMLINK

#define UV_FS_O_SYMLINK   0

Definition at line 480 of file unix.h.

◆ UV_FS_O_SYNC

#define UV_FS_O_SYNC   0

Definition at line 485 of file unix.h.

◆ UV_FS_O_TEMPORARY

#define UV_FS_O_TEMPORARY   0

Definition at line 503 of file unix.h.

◆ UV_FS_O_TRUNC

#define UV_FS_O_TRUNC   0

Definition at line 490 of file unix.h.

◆ UV_FS_O_WRONLY

#define UV_FS_O_WRONLY   0

Definition at line 495 of file unix.h.

◆ UV_FS_PRIVATE_FIELDS

#define UV_FS_PRIVATE_FIELDS
Value:
const char *new_path; \
uv_file file; \
int flags; \
mode_t mode; \
unsigned int nbufs; \
uv_buf_t* bufs; \
off_t off; \
uv_uid_t uid; \
uv_gid_t gid; \
double atime; \
double mtime; \
struct uv__work work_req; \
uv_buf_t bufsml[4]; \

Definition at line 359 of file unix.h.

◆ UV_GETADDRINFO_PRIVATE_FIELDS

#define UV_GETADDRINFO_PRIVATE_FIELDS
Value:
struct uv__work work_req; \
uv_getaddrinfo_cb cb; \
struct addrinfo* hints; \
char* hostname; \
char* service; \
struct addrinfo* addrinfo; \
int retcode;

Definition at line 337 of file unix.h.

◆ UV_GETNAMEINFO_PRIVATE_FIELDS

#define UV_GETNAMEINFO_PRIVATE_FIELDS
Value:
struct uv__work work_req; \
uv_getnameinfo_cb getnameinfo_cb; \
struct sockaddr_storage storage; \
int flags; \
char host[NI_MAXHOST]; \
int retcode;

Definition at line 346 of file unix.h.

◆ UV_HANDLE_PRIVATE_FIELDS

#define UV_HANDLE_PRIVATE_FIELDS
Value:
uv_handle_t* next_closing; \
unsigned int flags; \

Definition at line 282 of file unix.h.

◆ UV_IDLE_PRIVATE_FIELDS

#define UV_IDLE_PRIVATE_FIELDS
Value:
void* queue[2]; \

Definition at line 321 of file unix.h.

◆ UV_IO_PRIVATE_PLATFORM_FIELDS

#define UV_IO_PRIVATE_PLATFORM_FIELDS   /* empty */

Definition at line 83 of file unix.h.

◆ UV_LOOP_PRIVATE_FIELDS

#define UV_LOOP_PRIVATE_FIELDS

Definition at line 221 of file unix.h.

◆ UV_ONCE_INIT

#define UV_ONCE_INIT   PTHREAD_ONCE_INIT

Definition at line 131 of file unix.h.

◆ UV_PIPE_PRIVATE_FIELDS

#define UV_PIPE_PRIVATE_FIELDS   const char* pipe_fname; /* strdup'ed */

Definition at line 307 of file unix.h.

◆ UV_PLATFORM_FS_EVENT_FIELDS

#define UV_PLATFORM_FS_EVENT_FIELDS   /* empty */

Definition at line 113 of file unix.h.

◆ UV_PLATFORM_LOOP_FIELDS

#define UV_PLATFORM_LOOP_FIELDS   /* empty */

Definition at line 109 of file unix.h.

◆ UV_PLATFORM_SEM_T

#define UV_PLATFORM_SEM_T   sem_t

Definition at line 105 of file unix.h.

◆ UV_POLL_PRIVATE_FIELDS

#define UV_POLL_PRIVATE_FIELDS   uv__io_t io_watcher;

Definition at line 310 of file unix.h.

◆ UV_PREPARE_PRIVATE_FIELDS

#define UV_PREPARE_PRIVATE_FIELDS
Value:
void* queue[2]; \

Definition at line 313 of file unix.h.

◆ UV_PRIVATE_REQ_TYPES

#define UV_PRIVATE_REQ_TYPES   /* empty */

Definition at line 258 of file unix.h.

◆ UV_PROCESS_PRIVATE_FIELDS

#define UV_PROCESS_PRIVATE_FIELDS
Value:
void* queue[2]; \
int status; \

Definition at line 355 of file unix.h.

◆ UV_REQ_PRIVATE_FIELDS

#define UV_REQ_PRIVATE_FIELDS   /* empty */

Definition at line 256 of file unix.h.

◆ UV_REQ_TYPE_PRIVATE

#define UV_REQ_TYPE_PRIVATE   /* empty */

Definition at line 254 of file unix.h.

◆ UV_SHUTDOWN_PRIVATE_FIELDS

#define UV_SHUTDOWN_PRIVATE_FIELDS   /* empty */

Definition at line 271 of file unix.h.

◆ UV_SIGNAL_PRIVATE_FIELDS

#define UV_SIGNAL_PRIVATE_FIELDS
Value:
/* RB_ENTRY(uv_signal_s) tree_entry; */ \
struct { \
struct uv_signal_s* rbe_left; \
struct uv_signal_s* rbe_right; \
struct uv_signal_s* rbe_parent; \
int rbe_color; \
} tree_entry; \
/* Use two counters here so we don have to fiddle with atomics. */ \
unsigned int caught_signals; \
unsigned int dispatched_signals;

Definition at line 381 of file unix.h.

◆ UV_STREAM_PRIVATE_FIELDS

#define UV_STREAM_PRIVATE_FIELDS
Value:
uv_shutdown_t *shutdown_req; \
uv__io_t io_watcher; \
void* write_queue[2]; \
void* write_completed_queue[2]; \
uv_connection_cb connection_cb; \
int delayed_error; \
int accepted_fd; \
void* queued_fds; \
UV_STREAM_PRIVATE_PLATFORM_FIELDS \

Definition at line 286 of file unix.h.

◆ UV_STREAM_PRIVATE_PLATFORM_FIELDS

#define UV_STREAM_PRIVATE_PLATFORM_FIELDS   /* empty */

Definition at line 117 of file unix.h.

◆ UV_TCP_PRIVATE_FIELDS

#define UV_TCP_PRIVATE_FIELDS   /* empty */

Definition at line 298 of file unix.h.

◆ UV_TIMER_PRIVATE_FIELDS

#define UV_TIMER_PRIVATE_FIELDS
Value:
void* heap_node[3]; \
uint64_t timeout; \
uint64_t repeat; \
uint64_t start_id;

Definition at line 330 of file unix.h.

◆ UV_TTY_PRIVATE_FIELDS

#define UV_TTY_PRIVATE_FIELDS
Value:
struct termios orig_termios; \
int mode;

Definition at line 377 of file unix.h.

◆ UV_UDP_PRIVATE_FIELDS

#define UV_UDP_PRIVATE_FIELDS
Value:
uv_udp_recv_cb recv_cb; \
uv__io_t io_watcher; \
void* write_queue[2]; \
void* write_completed_queue[2]; \

Definition at line 300 of file unix.h.

◆ UV_UDP_SEND_PRIVATE_FIELDS

#define UV_UDP_SEND_PRIVATE_FIELDS
Value:
void* queue[2]; \
struct sockaddr_storage addr; \
unsigned int nbufs; \
uv_buf_t* bufs; \
ssize_t status; \
uv_udp_send_cb send_cb; \
uv_buf_t bufsml[4]; \

Definition at line 273 of file unix.h.

◆ UV_WORK_PRIVATE_FIELDS

#define UV_WORK_PRIVATE_FIELDS   struct uv__work work_req;

Definition at line 374 of file unix.h.

◆ UV_WRITE_PRIVATE_FIELDS

#define UV_WRITE_PRIVATE_FIELDS
Value:
void* queue[2]; \
unsigned int write_index; \
uv_buf_t* bufs; \
unsigned int nbufs; \
int error; \
uv_buf_t bufsml[4]; \

Definition at line 260 of file unix.h.

Typedef Documentation

◆ uv__dirent_t

typedef struct dirent uv__dirent_t

Definition at line 169 of file unix.h.

◆ uv__io_cb

typedef void(* uv__io_cb) (struct uv_loop_s *loop, struct uv__io_s *w, unsigned int events)

Definition at line 89 of file unix.h.

◆ uv__io_t

typedef struct uv__io_s uv__io_t

Definition at line 92 of file unix.h.

◆ uv_buf_t

typedef struct uv_buf_t uv_buf_t

◆ uv_cond_t

typedef pthread_cond_t uv_cond_t

Definition at line 138 of file unix.h.

◆ uv_file

typedef int uv_file

Definition at line 126 of file unix.h.

◆ uv_gid_t

typedef gid_t uv_gid_t

Definition at line 166 of file unix.h.

◆ uv_key_t

typedef pthread_key_t uv_key_t

Definition at line 139 of file unix.h.

◆ uv_mutex_t

typedef pthread_mutex_t uv_mutex_t

Definition at line 135 of file unix.h.

◆ uv_once_t

typedef pthread_once_t uv_once_t

Definition at line 133 of file unix.h.

◆ uv_os_fd_t

typedef int uv_os_fd_t

Definition at line 128 of file unix.h.

◆ uv_os_sock_t

typedef int uv_os_sock_t

Definition at line 127 of file unix.h.

◆ uv_pid_t

typedef pid_t uv_pid_t

Definition at line 129 of file unix.h.

◆ uv_rwlock_t

typedef pthread_rwlock_t uv_rwlock_t

Definition at line 136 of file unix.h.

◆ uv_sem_t

Definition at line 137 of file unix.h.

◆ uv_thread_t

typedef pthread_t uv_thread_t

Definition at line 134 of file unix.h.

◆ uv_uid_t

typedef uid_t uv_uid_t

Definition at line 167 of file unix.h.

uv__work
Definition: third_party/libuv/include/uv/threadpool.h:30
timer_cb
static void timer_cb(uv_timer_t *timer)
Definition: fs-poll.c:172
file
const grpc_generator::File * file
Definition: python_private_generator.h:38
uv_connect_s
Definition: uv.h:580
error
grpc_error_handle error
Definition: retry_filter.cc:499
alloc_cb
static void alloc_cb(uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf)
Definition: benchmark-pound.c:84
send_cb
static void send_cb(uv_udp_send_t *req, int status)
Definition: benchmark-udp-pummel.c:72
status
absl::Status status
Definition: rls.cc:251
mode
const char int mode
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:135
NI_MAXHOST
#define NI_MAXHOST
Definition: unix.h:75
shutdown_req
static uv_shutdown_t shutdown_req
Definition: benchmark-tcp-write-batch.c:40
grpc_core::pending
P< T > pending()
Definition: try_join_test.cc:50
uv_check_cb
void(* uv_check_cb)(uv_check_t *handle)
Definition: uv.h:321
uv_alloc_cb
void(* uv_alloc_cb)(uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf)
Definition: uv.h:306
queue
Definition: sync_test.cc:39
getnameinfo_cb
static void getnameinfo_cb(uv_getnameinfo_t *handle, int status, const char *hostname, const char *service)
Definition: test-threadpool-cancel.c:106
orig_termios
static struct termios orig_termios
Definition: unix/tty.c:66
check_cb
static void check_cb(uv_check_t *handle)
Definition: test-async-null-cb.c:38
heap_node
Definition: heap-inl.h:27
recv_cb
static void recv_cb(uv_udp_t *handle, ssize_t nread, const uv_buf_t *buf, const struct sockaddr *addr, unsigned flags)
Definition: benchmark-udp-pummel.c:109
connection_cb
static void connection_cb(uv_stream_t *s, int status)
Definition: benchmark-pump.c:277
bufs
static uv_buf_t bufs[5]
Definition: benchmark-udp-pummel.c:51
async_cb
static void async_cb(uv_async_t *handle)
Definition: benchmark-async-pummel.c:39
uv_signal_s
Definition: uv.h:1561
uv_async_cb
void(* uv_async_cb)(uv_async_t *handle)
Definition: uv.h:319
NI_MAXSERV
#define NI_MAXSERV
Definition: unix.h:79
uv_timer_cb
void(* uv_timer_cb)(uv_timer_t *handle)
Definition: uv.h:318
connect_req
static uv_connect_t connect_req
Definition: benchmark-tcp-write-batch.c:39
uv_fs_event_cb
void(* uv_fs_event_cb)(uv_fs_event_t *handle, const char *filename, int events, int status)
Definition: uv.h:366
run_tests.retcode
retcode
Definition: run_tests.py:1646
uv_handle_s
Definition: uv.h:441
flags
uint32_t flags
Definition: retry_filter.cc:632
uv_prepare_cb
void(* uv_prepare_cb)(uv_prepare_t *handle)
Definition: uv.h:320
idle_cb
void idle_cb(uv_idle_t *handle)
Definition: libuv/docs/code/uvstop/main.c:6
service
__attribute__((deprecated("Please use GRPCProtoMethod."))) @interface ProtoMethod NSString * service
Definition: ProtoMethod.h:25
work_req
static uv_work_t work_req
Definition: test-loop-alive.c:32
uv_idle_cb
void(* uv_idle_cb)(uv_idle_t *handle)
Definition: uv.h:322
prepare_cb
static void prepare_cb(uv_prepare_t *handle)
Definition: test-async.c:94
absl::status_internal::storage
static ABSL_INTERNAL_ATOMIC_HOOK_ATTRIBUTES absl::base_internal::AtomicHook< StatusPayloadPrinter > storage
Definition: abseil-cpp/absl/status/status_payload_printer.cc:26
addrinfo
Definition: ares_ipv6.h:43
addr
struct sockaddr_in addr
Definition: libuv/docs/code/tcp-echo-server/main.c:10
timeout
uv_timer_t timeout
Definition: libuv/docs/code/uvwget/main.c:9
cb
OPENSSL_EXPORT pem_password_cb * cb
Definition: pem.h:351


grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:02:28