Functions | Variables
iomgr.cc File Reference
#include <grpc/support/port_platform.h>
#include "src/core/lib/iomgr/iomgr.h"
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/gprpp/global_config.h"
#include "src/core/lib/gprpp/thd.h"
#include "src/core/lib/iomgr/buffer_list.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/executor.h"
#include "src/core/lib/iomgr/internal_errqueue.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/iomgr/timer_manager.h"
Include dependency graph for iomgr.cc:

Go to the source code of this file.

Functions

static size_t count_objects (void)
 
static void dump_objects (const char *kind)
 
 GPR_GLOBAL_CONFIG_DEFINE_BOOL (grpc_abort_on_leaks, false, "A debugging aid to cause a call to abort() when " "gRPC objects are leaked past grpc_shutdown()")
 
 GPR_GLOBAL_CONFIG_DEFINE_BOOL (grpc_experimental_enable_tcp_frame_size_tuning, false, "If set, enables TCP to use RPC size estimation made by higher layers. TCP " "would not indicate completion of a read operation until a specified " "number of bytes have been read over the socket. Buffers are also " "allocated according to estimated RPC sizes.")
 
bool grpc_iomgr_abort_on_leaks (void)
 
bool grpc_iomgr_add_closure_to_background_poller (grpc_closure *closure, grpc_error_handle error)
 
size_t grpc_iomgr_count_objects_for_testing (void)
 
void grpc_iomgr_init ()
 
bool grpc_iomgr_is_any_background_poller_thread ()
 
void grpc_iomgr_register_object (grpc_iomgr_object *obj, const char *name)
 
void grpc_iomgr_shutdown ()
 
void grpc_iomgr_shutdown_background_closure ()
 
void grpc_iomgr_start ()
 
void grpc_iomgr_unregister_object (grpc_iomgr_object *obj)
 

Variables

static bool g_grpc_abort_on_leaks
 
static gpr_mu g_mu
 
static gpr_cv g_rcv
 
static grpc_iomgr_object g_root_object
 
static int g_shutdown
 

Function Documentation

◆ count_objects()

static size_t count_objects ( void  )
static

Definition at line 79 of file iomgr.cc.

◆ dump_objects()

static void dump_objects ( const char *  kind)
static

Definition at line 90 of file iomgr.cc.

◆ GPR_GLOBAL_CONFIG_DEFINE_BOOL() [1/2]

GPR_GLOBAL_CONFIG_DEFINE_BOOL ( grpc_abort_on_leaks  ,
false  ,
"A debugging aid to cause a call to abort() when " "gRPC objects are leaked past grpc_shutdown()"   
)

◆ GPR_GLOBAL_CONFIG_DEFINE_BOOL() [2/2]

GPR_GLOBAL_CONFIG_DEFINE_BOOL ( grpc_experimental_enable_tcp_frame_size_tuning  ,
false  ,
"If  set,
enables TCP to use RPC size estimation made by higher layers. TCP " "would not indicate completion of a read operation until a specified " "number of bytes have been read over the socket. Buffers are also " "allocated according to estimated RPC sizes."   
)

◆ grpc_iomgr_abort_on_leaks()

bool grpc_iomgr_abort_on_leaks ( void  )

Definition at line 202 of file iomgr.cc.

◆ grpc_iomgr_add_closure_to_background_poller()

bool grpc_iomgr_add_closure_to_background_poller ( grpc_closure closure,
grpc_error_handle  error 
)

Returns true if the closure is registered into the background poller. Note that the closure may or may not run yet when this function returns, and the closure should not be blocking or long-running.

Definition at line 179 of file iomgr.cc.

◆ grpc_iomgr_count_objects_for_testing()

size_t grpc_iomgr_count_objects_for_testing ( void  )

Definition at line 88 of file iomgr.cc.

◆ grpc_iomgr_init()

void grpc_iomgr_init ( )

Initializes the iomgr.

Definition at line 61 of file iomgr.cc.

◆ grpc_iomgr_is_any_background_poller_thread()

bool grpc_iomgr_is_any_background_poller_thread ( )

Returns true if the caller is a worker thread for any background poller.

Definition at line 175 of file iomgr.cc.

◆ grpc_iomgr_register_object()

void grpc_iomgr_register_object ( grpc_iomgr_object obj,
const char *  name 
)

Definition at line 184 of file iomgr.cc.

◆ grpc_iomgr_shutdown()

void grpc_iomgr_shutdown ( )

Signals the intention to shutdown the iomgr. Expects to be able to flush exec_ctx.

Definition at line 97 of file iomgr.cc.

◆ grpc_iomgr_shutdown_background_closure()

void grpc_iomgr_shutdown_background_closure ( )

Signals the intention to shutdown all the closures registered in the background poller.

Definition at line 171 of file iomgr.cc.

◆ grpc_iomgr_start()

void grpc_iomgr_start ( )

Starts any background threads for iomgr.

Definition at line 77 of file iomgr.cc.

◆ grpc_iomgr_unregister_object()

void grpc_iomgr_unregister_object ( grpc_iomgr_object obj)

Definition at line 193 of file iomgr.cc.

Variable Documentation

◆ g_grpc_abort_on_leaks

bool g_grpc_abort_on_leaks
static

Definition at line 59 of file iomgr.cc.

◆ g_mu

gpr_mu g_mu
static

Definition at line 55 of file iomgr.cc.

◆ g_rcv

gpr_cv g_rcv
static

Definition at line 56 of file iomgr.cc.

◆ g_root_object

grpc_iomgr_object g_root_object
static

Definition at line 58 of file iomgr.cc.

◆ g_shutdown

int g_shutdown
static

Definition at line 57 of file iomgr.cc.



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