Mark Salyzyn | dd9094a | 2016-03-01 13:45:42 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Tom Cherry | e336018 | 2019-01-15 17:47:48 -0800 | [diff] [blame] | 17 | #pragma once |
Mark Salyzyn | dd9094a | 2016-03-01 13:45:42 -0800 | [diff] [blame] | 18 | |
| 19 | #include <cutils/list.h> |
| 20 | |
| 21 | #include "log_portability.h" |
| 22 | |
| 23 | __BEGIN_DECLS |
| 24 | |
Tom Cherry | 3d6a878 | 2019-02-08 11:46:19 -0800 | [diff] [blame] | 25 | extern struct listnode __android_log_transport_write; |
| 26 | extern struct listnode __android_log_persist_write; |
Mark Salyzyn | dd9094a | 2016-03-01 13:45:42 -0800 | [diff] [blame] | 27 | |
Mark Salyzyn | 6e31568 | 2017-03-09 08:09:43 -0800 | [diff] [blame] | 28 | #define write_transport_for_each(transp, transports) \ |
| 29 | for ((transp) = node_to_item((transports)->next, \ |
| 30 | struct android_log_transport_write, node); \ |
| 31 | ((transp) != node_to_item((transports), \ |
| 32 | struct android_log_transport_write, node)) && \ |
| 33 | ((transp) != node_to_item((transp)->node.next, \ |
| 34 | struct android_log_transport_write, node)); \ |
| 35 | (transp) = node_to_item((transp)->node.next, \ |
| 36 | struct android_log_transport_write, node)) |
Mark Salyzyn | dd9094a | 2016-03-01 13:45:42 -0800 | [diff] [blame] | 37 | |
Mark Salyzyn | 6e31568 | 2017-03-09 08:09:43 -0800 | [diff] [blame] | 38 | #define write_transport_for_each_safe(transp, n, transports) \ |
| 39 | for ((transp) = node_to_item((transports)->next, \ |
| 40 | struct android_log_transport_write, node), \ |
| 41 | (n) = (transp)->node.next; \ |
| 42 | ((transp) != node_to_item((transports), \ |
| 43 | struct android_log_transport_write, node)) && \ |
| 44 | ((transp) != \ |
| 45 | node_to_item((n), struct android_log_transport_write, node)); \ |
| 46 | (transp) = node_to_item((n), struct android_log_transport_write, node), \ |
| 47 | (n) = (transp)->node.next) |
Mark Salyzyn | dd9094a | 2016-03-01 13:45:42 -0800 | [diff] [blame] | 48 | |
Tom Cherry | 3d6a878 | 2019-02-08 11:46:19 -0800 | [diff] [blame] | 49 | void __android_log_config_write(); |
| 50 | void __android_log_config_write_close(); |
Mark Salyzyn | dd9094a | 2016-03-01 13:45:42 -0800 | [diff] [blame] | 51 | |
| 52 | __END_DECLS |