blob: 6c0a08b9183fd7d578e3091a29f8b5f48e9c20b0 [file] [log] [blame]
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -08001/*
2 *
Jan Tattermusch7897ae92017-06-07 22:57:36 +02003 * Copyright 2015 gRPC authors.
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -08004 *
Jan Tattermusch7897ae92017-06-07 22:57:36 +02005 * 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
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -08008 *
Jan Tattermusch7897ae92017-06-07 22:57:36 +02009 * http://www.apache.org/licenses/LICENSE-2.0
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -080010 *
Jan Tattermusch7897ae92017-06-07 22:57:36 +020011 * 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.
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -080016 *
17 */
18
Craig Tiller9a4dddd2016-03-25 17:08:13 -070019#ifndef GRPC_CORE_LIB_IOMGR_IOMGR_H
20#define GRPC_CORE_LIB_IOMGR_IOMGR_H
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -080021
Craig Tiller3cf79222016-11-14 08:02:45 -080022#include <grpc/impl/codegen/exec_ctx_fwd.h>
murgatroid999030c812016-09-16 13:25:08 -070023#include "src/core/lib/iomgr/port.h"
24
Yash Tibrewala7e6d652017-09-20 18:56:37 -070025#ifdef __cplusplus
26extern "C" {
27#endif
28
David Garcia Quintas1c762bd2015-05-31 17:04:43 -070029/** Initializes the iomgr. */
Craig Tiller5e56f002017-05-16 15:02:50 -070030void grpc_iomgr_init(grpc_exec_ctx *exec_ctx);
David Garcia Quintas1c762bd2015-05-31 17:04:43 -070031
Craig Tiller84f75d42017-05-03 13:06:35 -070032/** Starts any background threads for iomgr. */
Craig Tiller5e56f002017-05-16 15:02:50 -070033void grpc_iomgr_start(grpc_exec_ctx *exec_ctx);
Craig Tiller84f75d42017-05-03 13:06:35 -070034
Craig Tiller3cf79222016-11-14 08:02:45 -080035/** Signals the intention to shutdown the iomgr. Expects to be able to flush
36 * exec_ctx. */
37void grpc_iomgr_shutdown(grpc_exec_ctx *exec_ctx);
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -080038
Yash Tibrewala7e6d652017-09-20 18:56:37 -070039#ifdef __cplusplus
40}
41#endif
42
Yash Tibrewal12fc6d42017-10-09 16:43:34 -070043#endif /* GRPC_CORE_LIB_IOMGR_IOMGR_H */