blob: a901f1352cbe28e741196b5dee2ee7d02ff4cb65 [file] [log] [blame]
Mark Salyzyndd9094a2016-03-01 13:45:42 -08001/*
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 Cherrye3360182019-01-15 17:47:48 -080017#pragma once
Mark Salyzyndd9094a2016-03-01 13:45:42 -080018
19#include <cutils/list.h>
20
21#include "log_portability.h"
22
23__BEGIN_DECLS
24
Tom Cherry3d6a8782019-02-08 11:46:19 -080025extern struct listnode __android_log_transport_write;
26extern struct listnode __android_log_persist_write;
Mark Salyzyndd9094a2016-03-01 13:45:42 -080027
Mark Salyzyn6e315682017-03-09 08:09:43 -080028#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 Salyzyndd9094a2016-03-01 13:45:42 -080037
Mark Salyzyn6e315682017-03-09 08:09:43 -080038#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 Salyzyndd9094a2016-03-01 13:45:42 -080048
Tom Cherry3d6a8782019-02-08 11:46:19 -080049void __android_log_config_write();
50void __android_log_config_write_close();
Mark Salyzyndd9094a2016-03-01 13:45:42 -080051
52__END_DECLS