config_read.h 2.3 KB

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