spl.c 366 B

123456789101112131415161718192021222324252627282930
  1. #include <u.h>
  2. #include <libc.h>
  3. #include <ureg.h>
  4. /* these are declared in this file as we do not want them externally visible.
  5. * inline assembly is not allowed in harvey.
  6. */
  7. int64_t _splhi(void);
  8. int64_t _spllo(void);
  9. int splhi(void)
  10. {
  11. return _splhi();
  12. }
  13. int spllo(void)
  14. {
  15. return _spllo();
  16. }
  17. void splx(int s)
  18. {
  19. if (s)
  20. _splhi();
  21. else
  22. _spllo();
  23. }