THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Git Source Code Mirror - This is a publish-only repository and all pull requests are ignored. Please follow Documentation/SubmittingPatches procedure for any of your improvements.
git
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
857B

  1. #ifndef TR2_DST_H
  2. #define TR2_DST_H
  3. struct strbuf;
  4. #include "trace2/tr2_sysenv.h"
  5. struct tr2_dst {
  6. enum tr2_sysenv_variable sysenv_var;
  7. int fd;
  8. unsigned int initialized : 1;
  9. unsigned int need_close : 1;
  10. unsigned int too_many_files : 1;
  11. };
  12. /*
  13. * Disable TRACE2 on the destination. In TRACE2 a destination (DST)
  14. * wraps a file descriptor; it is associated with a TARGET which
  15. * defines the formatting.
  16. */
  17. void tr2_dst_trace_disable(struct tr2_dst *dst);
  18. /*
  19. * Return the file descriptor for the DST.
  20. * If 0, the dst is closed or disabled.
  21. */
  22. int tr2_dst_get_trace_fd(struct tr2_dst *dst);
  23. /*
  24. * Return true if the DST is opened for writing.
  25. */
  26. int tr2_dst_trace_want(struct tr2_dst *dst);
  27. /*
  28. * Write a single line/message to the trace file.
  29. */
  30. void tr2_dst_write_line(struct tr2_dst *dst, struct strbuf *buf_line);
  31. #endif /* TR2_DST_H */