watch.h 841 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1996, 1997, 1998, 2000, 2001 by Ralf Baechle
  7. */
  8. #ifndef _ASM_WATCH_H
  9. #define _ASM_WATCH_H
  10. #include <linux/linkage.h>
  11. /*
  12. * Types of reference for watch_set()
  13. */
  14. enum wref_type {
  15. wr_save = 1,
  16. wr_load = 2
  17. };
  18. extern asmlinkage void __watch_set(unsigned long addr, enum wref_type ref);
  19. extern asmlinkage void __watch_clear(void);
  20. extern asmlinkage void __watch_reenable(void);
  21. #define watch_set(addr, ref) \
  22. if (cpu_has_watch) \
  23. __watch_set(addr, ref)
  24. #define watch_clear() \
  25. if (cpu_has_watch) \
  26. __watch_clear()
  27. #define watch_reenable() \
  28. if (cpu_has_watch) \
  29. __watch_reenable()
  30. #endif /* _ASM_WATCH_H */