Mirror of strace – the linux syscall tracer
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.

number_set.h 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright (c) 2016-2018 Dmitry V. Levin <ldv@altlinux.org>
  3. * Copyright (c) 2017-2019 The strace developers.
  4. * All rights reserved.
  5. *
  6. * SPDX-License-Identifier: LGPL-2.1-or-later
  7. */
  8. #ifndef STRACE_NUMBER_SET_H
  9. # define STRACE_NUMBER_SET_H
  10. # include "gcc_compat.h"
  11. struct number_set;
  12. extern bool
  13. number_set_array_is_empty(const struct number_set *, unsigned int idx);
  14. extern bool
  15. is_number_in_set(unsigned int number, const struct number_set *);
  16. extern bool
  17. is_number_in_set_array(unsigned int number, const struct number_set *, unsigned int idx);
  18. extern bool
  19. is_complete_set(const struct number_set *, unsigned int max_numbers);
  20. extern void
  21. add_number_to_set(unsigned int number, struct number_set *);
  22. extern void
  23. add_number_to_set_array(unsigned int number, struct number_set *, unsigned int idx);
  24. extern void
  25. clear_number_set_array(struct number_set *, unsigned int nmemb);
  26. extern void
  27. invert_number_set_array(struct number_set *, unsigned int nmemb);
  28. extern struct number_set *
  29. alloc_number_set_array(unsigned int nmemb) ATTRIBUTE_MALLOC;
  30. extern void
  31. free_number_set_array(struct number_set *, unsigned int nmemb);
  32. enum status_t {
  33. STATUS_SUCCESSFUL,
  34. STATUS_FAILED,
  35. STATUS_UNFINISHED,
  36. STATUS_UNAVAILABLE,
  37. STATUS_DETACHED,
  38. NUMBER_OF_STATUSES
  39. };
  40. extern struct number_set *read_set;
  41. extern struct number_set *write_set;
  42. extern struct number_set *signal_set;
  43. extern struct number_set *status_set;
  44. extern struct number_set *trace_set;
  45. #endif /* !STRACE_NUMBER_SET_H */