PageRenderTime 3792ms CodeModel.GetById 25ms RepoModel.GetById 9ms app.codeStats 0ms

/src/runtime/os-default.h

http://github.com/akovalenko/sbcl-win32-threads
C Header | 82 lines | 58 code | 19 blank | 5 comment | 0 complexity | a6d618b5f24573de4f787425279099b8 MD5 | raw file
  1. #ifndef SBCL_INCLUDED_OS_DEFAULT_H
  2. #define SBCL_INCLUDED_OS_DEFAULT_H
  3. #ifndef HAVE_os_vm_mmap_unit_size
  4. #define os_vm_mmap_unit_size os_vm_page_size
  5. #endif
  6. #ifndef HAVE_os_open_core
  7. #define os_open_core(filename,mode) open(filename,mode)
  8. #endif
  9. #ifndef HAVE_os_fopen_runtime
  10. #define os_fopen_runtime(filename,mode) fopen(filename,mode)
  11. #endif
  12. #ifndef HAVE_os_invalidate_free
  13. #define os_invalidate_free os_invalidate
  14. #endif
  15. #ifndef HAVE_os_validate_recommit
  16. #define os_validate_recommit(addr,len) do{}while(0)
  17. #endif
  18. #ifndef HAVE_os_allocate_lazily
  19. #define os_allocate_lazily(len) os_validate(NULL,len)
  20. #endif
  21. #ifndef HAVE_os_dlsym_default
  22. #define os_dlsym_default(name) dlsym(RTLD_DEFAULT,(name))
  23. #endif
  24. #ifndef HAVE_os_number_of_processors
  25. /* To be used for things like spinning-vs-yielding-vs-sleeping. The
  26. default value of 0, provided here, means "unknown" (OS-specific
  27. implementation may set the real os_number_of_processors to 0 in run
  28. time as well, to designate the same thing: unknown, couldn't
  29. query it, doesn't make sense). */
  30. #define os_number_of_processors 0
  31. #endif
  32. #ifndef PUSH_ERRNO
  33. #define PUSH_ERRNO \
  34. { \
  35. int sbcl__lastErrno = errno; \
  36. #define POP_ERRNO \
  37. errno = sbcl__lastErrno; \
  38. }
  39. #endif
  40. #ifndef THREAD_ALIEN_RESERVE
  41. #define THREAD_ALIEN_RESERVE (0)
  42. #endif
  43. #ifndef PSEUDO_ATOMIC_SET_HIGHLEVEL
  44. #define PSEUDO_ATOMIC_SET_HIGHLEVEL do {} while(0)
  45. #endif
  46. #ifndef PSEUDO_ATOMIC_FLUSH_LOWLEVEL
  47. #define PSEUDO_ATOMIC_FLUSH_LOWLEVEL do {} while(0)
  48. #endif
  49. #ifndef AMD64_SYSV_ABI
  50. #define AMD64_SYSV_ABI
  51. #endif
  52. #ifndef odxprint
  53. #define odxprint(tag,...) do {} while(0)
  54. #endif
  55. #ifndef fast_aligned_fill_words
  56. static inline void fast_aligned_fill_words(void*addr, size_t len, lispobj pattern)
  57. {
  58. lispobj* ptr = addr;
  59. while(len--)
  60. *(ptr++) = pattern;
  61. }
  62. #endif
  63. #endif /* SBCL_INCLUDED_OS_DEFAULT_H */