blob: f5875a247eed1ce227426f949907d18c6448749c [file] [log] [blame]
ctillerd79b4862014-12-17 16:36:59 -08001/*
2 *
Jan Tattermusch7897ae92017-06-07 22:57:36 +02003 * Copyright 2015 gRPC authors.
ctillerd79b4862014-12-17 16:36:59 -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
ctillerd79b4862014-12-17 16:36:59 -08008 *
Jan Tattermusch7897ae92017-06-07 22:57:36 +02009 * http://www.apache.org/licenses/LICENSE-2.0
ctillerd79b4862014-12-17 16:36:59 -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.
ctillerd79b4862014-12-17 16:36:59 -080016 *
17 */
18
murgatroid9954070892016-08-08 17:01:18 -070019#include "src/core/lib/iomgr/port.h"
Nicolas "Pixel" Noble21f627a2015-02-04 01:31:14 +010020
murgatroid99623dd4f2016-08-08 17:31:27 -070021#ifdef GRPC_POSIX_SOCKET
Nicolas "Pixel" Noble21f627a2015-02-04 01:31:14 +010022
Craig Tiller9533d042016-03-25 17:11:06 -070023#include "src/core/lib/debug/trace.h"
Craig Tiller8a034482016-03-28 16:09:04 -070024#include "src/core/lib/iomgr/ev_posix.h"
Craig Tiller9533d042016-03-25 17:11:06 -070025#include "src/core/lib/iomgr/iomgr_posix.h"
26#include "src/core/lib/iomgr/tcp_posix.h"
ctillerd79b4862014-12-17 16:36:59 -080027
David Klempnerd1785242015-01-28 17:00:21 -080028void grpc_iomgr_platform_init(void) {
Craig Tillerb38197e2016-02-26 10:14:54 -080029 grpc_wakeup_fd_global_init();
Craig Tiller1a969c82016-02-22 12:13:16 -080030 grpc_event_engine_init();
ncteisen06bce6e2017-07-10 07:58:49 -070031 grpc_register_tracer(&grpc_tcp_trace);
David Klempnerd1785242015-01-28 17:00:21 -080032}
ctiller58393c22015-01-07 14:03:30 -080033
Craig Tillerb7a59772015-10-01 08:01:58 -070034void grpc_iomgr_platform_flush(void) {}
Craig Tiller01be53d2015-09-30 08:36:03 -070035
Craig Tillerd9a60bb2016-03-28 23:13:19 -070036void grpc_iomgr_platform_shutdown(void) {
37 grpc_event_engine_shutdown();
38 grpc_wakeup_fd_global_destroy();
39}
Nicolas "Pixel" Noble21f627a2015-02-04 01:31:14 +010040
Craig Tillerd6c98df2015-08-18 09:33:44 -070041#endif /* GRPC_POSIX_SOCKET */