diff options
author | Mark Salyzyn | 2016-03-01 15:45:42 -0600 |
---|---|---|
committer | Dan Willemsen | 2016-03-22 15:01:15 -0500 |
commit | 018a96d03f0d452bf078084eedcd5693da42308d (patch) | |
tree | 28a998736c3637944985ccacb20539527e19d3e5 /liblog/config_write.h | |
parent | 80b1b188281b0c89e94cd9c3c3f2b04f007d6b28 (diff) | |
download | platform-system-core-018a96d03f0d452bf078084eedcd5693da42308d.tar.gz platform-system-core-018a96d03f0d452bf078084eedcd5693da42308d.tar.xz platform-system-core-018a96d03f0d452bf078084eedcd5693da42308d.zip |
liblog: split out transports into separate files
Create config_logger, logger and logger_read to house the log
interfaces. Add fake_logger, logd_logger and pmsg_logger to
house the write and read transports. Allows for an easier and
direct path to add new transports to the library.
SideEffects: None, logger benchmark performance unaffected
Bug: 27176738
Bug: 27405083
Change-Id: I01b38637334a5242905c8c89f6ab0a92e2540008
Diffstat (limited to 'liblog/config_write.h')
-rw-r--r-- | liblog/config_write.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/liblog/config_write.h b/liblog/config_write.h new file mode 100644 index 000000000..3a02a4e79 --- /dev/null +++ b/liblog/config_write.h | |||
@@ -0,0 +1,50 @@ | |||
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 | #ifndef _LIBLOG_CONFIG_WRITE_H__ | ||
18 | #define _LIBLOG_CONFIG_WRITE_H__ | ||
19 | |||
20 | #include <cutils/list.h> | ||
21 | |||
22 | #include "log_portability.h" | ||
23 | |||
24 | __BEGIN_DECLS | ||
25 | |||
26 | extern LIBLOG_HIDDEN struct listnode __android_log_transport_write; | ||
27 | extern LIBLOG_HIDDEN struct listnode __android_log_persist_write; | ||
28 | |||
29 | #define write_transport_for_each(transp, transports) \ | ||
30 | for (transp = node_to_item((transports)->next, \ | ||
31 | struct android_log_transport_write, node); \ | ||
32 | (transp != node_to_item(transports, \ | ||
33 | struct android_log_transport_write, node)); \ | ||
34 | transp = node_to_item(transp->node.next, \ | ||
35 | struct android_log_transport_write, node)) \ | ||
36 | |||
37 | #define write_transport_for_each_safe(transp, n, transports) \ | ||
38 | for (transp = node_to_item((transports)->next, \ | ||
39 | struct android_log_transport_write, node), \ | ||
40 | n = transp->node.next; \ | ||
41 | (transp != node_to_item(transports, \ | ||
42 | struct android_log_transport_write, node)); \ | ||
43 | transp = node_to_item(n, struct android_log_transport_write, node), \ | ||
44 | n = transp->node.next) | ||
45 | |||
46 | LIBLOG_HIDDEN void __android_log_config_write(); | ||
47 | |||
48 | __END_DECLS | ||
49 | |||
50 | #endif /* _LIBLOG_CONFIG_WRITE_H__ */ | ||