• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
17 #pragma once
18 
19 #include <cutils/list.h>
20 
21 #include "log_portability.h"
22 
23 __BEGIN_DECLS
24 
25 extern struct listnode __android_log_transport_read;
26 extern struct listnode __android_log_persist_read;
27 
28 #define read_transport_for_each(transp, transports)                           \
29   for ((transp) = node_to_item((transports)->next,                            \
30                                struct android_log_transport_read, node);      \
31        ((transp) != node_to_item((transports),                                \
32                                  struct android_log_transport_read, node)) && \
33        ((transp) != node_to_item((transp)->node.next,                         \
34                                  struct android_log_transport_read, node));   \
35        (transp) = node_to_item((transp)->node.next,                           \
36                                struct android_log_transport_read, node))
37 
38 #define read_transport_for_each_safe(transp, n, transports)                   \
39   for ((transp) = node_to_item((transports)->next,                            \
40                                struct android_log_transport_read, node),      \
41       (n) = (transp)->node.next;                                              \
42        ((transp) != node_to_item((transports),                                \
43                                  struct android_log_transport_read, node)) && \
44        ((transp) !=                                                           \
45         node_to_item((n), struct android_log_transport_read, node));          \
46        (transp) = node_to_item((n), struct android_log_transport_read, node), \
47       (n) = (transp)->node.next)
48 
49 void __android_log_config_read();
50 void __android_log_config_read_close();
51 
52 __END_DECLS
53