mar_evt.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * Copyright (c) 2004-2005 Mark Haverkamp
  3. * Copyright (c) 2004-2005 Open Source Development Lab
  4. *
  5. * All rights reserved.
  6. *
  7. * This software licensed under BSD license, the text of which follows:
  8. *
  9. * Redistribution and use in source and binary forms, with or without
  10. * modification, are permitted provided that the following conditions are met:
  11. *
  12. * - Redistributions of source code must retain the above copyright notice,
  13. * this list of conditions and the following disclaimer.
  14. * - Redistributions in binary form must reproduce the above copyright notice,
  15. * this list of conditions and the following disclaimer in the documentation
  16. * and/or other materials provided with the distribution.
  17. * - Neither the name of the Open Source Developement Lab nor the names of its
  18. * contributors may be used to endorse or promote products derived from this
  19. * software without specific prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  22. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  25. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  26. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  27. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  28. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  29. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  30. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  31. * THE POSSIBILITY OF SUCH DAMAGE.
  32. */
  33. #ifndef MAR_EVT_H_DEFINED
  34. #define MAR_EVT_H_DEFINED
  35. #include "mar_gen.h"
  36. typedef mar_uint64_t mar_evtchannelhandle_t;
  37. typedef mar_uint64_t mar_evtsubscriptionid_t;
  38. typedef mar_uint8_t mar_evteventpriority_t;
  39. typedef mar_uint64_t mar_evteventid_t;
  40. typedef mar_uint8_t mar_evtchannelopenflags_t;
  41. typedef struct {
  42. mar_size_t allocated_size __attribute__((aligned(8)));
  43. mar_size_t pattern_size __attribute__((aligned(8)));
  44. mar_uint8_t *pattern __attribute__((aligned(8)));
  45. } mar_evt_event_pattern_t;
  46. typedef struct {
  47. mar_size_t allocated_number __attribute__((aligned(8)));
  48. mar_size_t patterns_number __attribute__((aligned(8)));
  49. mar_evt_event_pattern_t *patterns __attribute__((aligned(8)));
  50. } mar_evt_event_pattern_array_t;
  51. typedef enum {
  52. MAR_EVT_PREFIX_FILTER = 1,
  53. MAR_EVT_SUFFIX_FILTER = 2,
  54. MAR_EVT_EXACT_FILTER = 3,
  55. MAR_EVT_PASS_ALL_FILTER = 4
  56. } mar_evt_event_filter_type_t;
  57. typedef struct {
  58. mar_evt_event_filter_type_t filter_type __attribute__((aligned(8)));
  59. mar_evt_event_pattern_t filter __attribute__((aligned(8)));
  60. } mar_evt_event_filter_t;
  61. typedef struct {
  62. mar_size_t filters_number __attribute__((aligned(8)));
  63. mar_evt_event_filter_t *filters __attribute__((aligned(8)));
  64. } mar_evt_event_filter_array_t;
  65. #endif /* MAR_EVT_H_DEFINED */