ctiller | d79b486 | 2014-12-17 16:36:59 -0800 | [diff] [blame] | 1 | /* |
| 2 | * |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 3 | * Copyright 2015 gRPC authors. |
ctiller | d79b486 | 2014-12-17 16:36:59 -0800 | [diff] [blame] | 4 | * |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 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 |
ctiller | d79b486 | 2014-12-17 16:36:59 -0800 | [diff] [blame] | 8 | * |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
ctiller | d79b486 | 2014-12-17 16:36:59 -0800 | [diff] [blame] | 10 | * |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 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. |
ctiller | d79b486 | 2014-12-17 16:36:59 -0800 | [diff] [blame] | 16 | * |
| 17 | */ |
| 18 | |
murgatroid99 | 5407089 | 2016-08-08 17:01:18 -0700 | [diff] [blame] | 19 | #include "src/core/lib/iomgr/port.h" |
Nicolas "Pixel" Noble | 21f627a | 2015-02-04 01:31:14 +0100 | [diff] [blame] | 20 | |
murgatroid99 | 623dd4f | 2016-08-08 17:31:27 -0700 | [diff] [blame] | 21 | #ifdef GRPC_POSIX_SOCKET |
Nicolas "Pixel" Noble | 21f627a | 2015-02-04 01:31:14 +0100 | [diff] [blame] | 22 | |
Craig Tiller | 9533d04 | 2016-03-25 17:11:06 -0700 | [diff] [blame] | 23 | #include "src/core/lib/debug/trace.h" |
Craig Tiller | 8a03448 | 2016-03-28 16:09:04 -0700 | [diff] [blame] | 24 | #include "src/core/lib/iomgr/ev_posix.h" |
Craig Tiller | 9533d04 | 2016-03-25 17:11:06 -0700 | [diff] [blame] | 25 | #include "src/core/lib/iomgr/iomgr_posix.h" |
| 26 | #include "src/core/lib/iomgr/tcp_posix.h" |
ctiller | d79b486 | 2014-12-17 16:36:59 -0800 | [diff] [blame] | 27 | |
David Klempner | d178524 | 2015-01-28 17:00:21 -0800 | [diff] [blame] | 28 | void grpc_iomgr_platform_init(void) { |
Craig Tiller | b38197e | 2016-02-26 10:14:54 -0800 | [diff] [blame] | 29 | grpc_wakeup_fd_global_init(); |
Craig Tiller | 1a969c8 | 2016-02-22 12:13:16 -0800 | [diff] [blame] | 30 | grpc_event_engine_init(); |
ncteisen | 06bce6e | 2017-07-10 07:58:49 -0700 | [diff] [blame] | 31 | grpc_register_tracer(&grpc_tcp_trace); |
David Klempner | d178524 | 2015-01-28 17:00:21 -0800 | [diff] [blame] | 32 | } |
ctiller | 58393c2 | 2015-01-07 14:03:30 -0800 | [diff] [blame] | 33 | |
Craig Tiller | b7a5977 | 2015-10-01 08:01:58 -0700 | [diff] [blame] | 34 | void grpc_iomgr_platform_flush(void) {} |
Craig Tiller | 01be53d | 2015-09-30 08:36:03 -0700 | [diff] [blame] | 35 | |
Craig Tiller | d9a60bb | 2016-03-28 23:13:19 -0700 | [diff] [blame] | 36 | void grpc_iomgr_platform_shutdown(void) { |
| 37 | grpc_event_engine_shutdown(); |
| 38 | grpc_wakeup_fd_global_destroy(); |
| 39 | } |
Nicolas "Pixel" Noble | 21f627a | 2015-02-04 01:31:14 +0100 | [diff] [blame] | 40 | |
Craig Tiller | d6c98df | 2015-08-18 09:33:44 -0700 | [diff] [blame] | 41 | #endif /* GRPC_POSIX_SOCKET */ |