GRPC Core  9.0.0
iomgr_internal.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPC_CORE_LIB_IOMGR_IOMGR_INTERNAL_H
20 #define GRPC_CORE_LIB_IOMGR_IOMGR_INTERNAL_H
21 
23 
24 #include <stdbool.h>
25 
27 
28 typedef struct grpc_iomgr_object {
29  char* name;
33 
35  void (*init)(void);
36  void (*flush)(void);
37  void (*shutdown)(void);
41  grpc_error* error);
43 
44 void grpc_iomgr_register_object(grpc_iomgr_object* obj, const char* name);
46 
48 
50 
52 
53 void grpc_iomgr_platform_init(void);
55 void grpc_iomgr_platform_flush(void);
58 
61 
64 
69  grpc_error* error);
70 
71 bool grpc_iomgr_abort_on_leaks(void);
72 
73 #endif /* GRPC_CORE_LIB_IOMGR_IOMGR_INTERNAL_H */
void grpc_iomgr_register_object(grpc_iomgr_object *obj, const char *name)
Definition: iomgr.cc:176
struct grpc_iomgr_object grpc_iomgr_object
bool grpc_iomgr_platform_add_closure_to_background_poller(grpc_closure *closure, grpc_error *error)
Return true if the closure is registered into the background poller.
Definition: iomgr_internal.cc:53
struct grpc_iomgr_platform_vtable grpc_iomgr_platform_vtable
void grpc_iomgr_unregister_object(grpc_iomgr_object *obj)
Definition: iomgr.cc:185
void grpc_iomgr_platform_shutdown(void)
tear down all platform specific global iomgr structures
Definition: iomgr_internal.cc:43
bool grpc_iomgr_platform_is_any_background_poller_thread(void)
return true if the caller is a worker thread for any background poller
Definition: iomgr_internal.cc:49
bool grpc_iomgr_abort_on_leaks(void)
Definition: iomgr.cc:194
void grpc_determine_iomgr_platform()
Definition: iomgr_internal.cc:33
void grpc_set_iomgr_platform_vtable(grpc_iomgr_platform_vtable *vtable)
Definition: iomgr_internal.cc:29
void grpc_iomgr_platform_flush(void)
flush any globally queued work from iomgr
Definition: iomgr_internal.cc:41
void grpc_set_default_iomgr_platform()
void grpc_iomgr_platform_shutdown_background_closure(void)
shut down all the closures registered in the background poller
Definition: iomgr_internal.cc:45
void grpc_iomgr_platform_init(void)
Definition: iomgr_internal.cc:39
A closure over a grpc_iomgr_cb_func.
Definition: closure.h:56
Definition: error_internal.h:39
Definition: iomgr_internal.h:28
char * name
Definition: iomgr_internal.h:29
struct grpc_iomgr_object * prev
Definition: iomgr_internal.h:31
struct grpc_iomgr_object * next
Definition: iomgr_internal.h:30
Definition: iomgr_internal.h:34
bool(* is_any_background_poller_thread)(void)
Definition: iomgr_internal.h:39
void(* shutdown)(void)
Definition: iomgr_internal.h:37
void(* flush)(void)
Definition: iomgr_internal.h:36
void(* init)(void)
Definition: iomgr_internal.h:35
bool(* add_closure_to_background_poller)(grpc_closure *closure, grpc_error *error)
Definition: iomgr_internal.h:40
void(* shutdown_background_closure)(void)
Definition: iomgr_internal.h:38