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.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 bool
  21. is_complete_set_array(const struct number_set *, const unsigned int *,
  22. const unsigned int nmemb);
  23. extern void
  24. add_number_to_set(unsigned int number, struct number_set *);
  25. extern void
  26. add_number_to_set_array(unsigned int number, struct number_set *, unsigned int idx);
  27. extern void
  28. clear_number_set_array(struct number_set *, unsigned int nmemb);
  29. extern void
  30. invert_number_set_array(struct number_set *, unsigned int nmemb);
  31. extern struct number_set *
  32. alloc_number_set_array(unsigned int nmemb) ATTRIBUTE_MALLOC;
  33. extern void
  34. free_number_set_array(struct number_set *, unsigned int nmemb);
  35. enum status_t {
  36. STATUS_SUCCESSFUL,
  37. STATUS_FAILED,
  38. STATUS_UNFINISHED,
  39. STATUS_UNAVAILABLE,
  40. STATUS_DETACHED,
  41. NUMBER_OF_STATUSES
  42. };
  43. extern struct number_set *read_set;
  44. extern struct number_set *write_set;
  45. extern struct number_set *signal_set;
  46. extern struct number_set *status_set;
  47. extern struct number_set *trace_set;
  48. #endif /* !STRACE_NUMBER_SET_H */