event_buffer.h 654 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * @file event_buffer.h
  3. *
  4. * @remark Copyright 2002 OProfile authors
  5. * @remark Read the file COPYING
  6. *
  7. * @author John Levon <levon@movementarian.org>
  8. */
  9. #ifndef EVENT_BUFFER_H
  10. #define EVENT_BUFFER_H
  11. #include <linux/types.h>
  12. #include <asm/mutex.h>
  13. int alloc_event_buffer(void);
  14. void free_event_buffer(void);
  15. /* wake up the process sleeping on the event file */
  16. void wake_up_buffer_waiter(void);
  17. #define INVALID_COOKIE ~0UL
  18. #define NO_COOKIE 0UL
  19. extern const struct file_operations event_buffer_fops;
  20. /* mutex between sync_cpu_buffers() and the
  21. * file reading code.
  22. */
  23. extern struct mutex buffer_mutex;
  24. #endif /* EVENT_BUFFER_H */