X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-posix%2Finterface.lisp;h=f8eef1fdaadba2f0aba61895e89204fd7c24e8cd;hb=ad4b18f5d843d91cc48c9b6cc936a6c7be5fce27;hp=4669aaffbd4b2176e2e48f0982e59e834ac14c50;hpb=4d0b87793a047baecf2403455ddca1a82f44a41b;p=sbcl.git diff --git a/contrib/sb-posix/interface.lisp b/contrib/sb-posix/interface.lisp index 4669aaf..f8eef1f 100644 --- a/contrib/sb-posix/interface.lisp +++ b/contrib/sb-posix/interface.lisp @@ -442,8 +442,29 @@ not supported." (define-call "munmap" int minusp (start sb-sys:system-area-pointer) (length unsigned)) +#-win32 (define-call "msync" int minusp (addr sb-sys:system-area-pointer) (length unsigned) (flags int))) +#+win32 +(progn + ;; No attempt is made to offer a full mmap-like interface on Windows. + ;; It would be possible to do so (and has been done by AK on his + ;; branch), but the use case is unclear to me. However, the following + ;; definitions are needed to keep existing code in sb-simple-streams + ;; running. --DFL + (defconstant PROT-READ #x02) + (defconstant PROT-WRITE #x04) + (defconstant PROT-EXEC #x10) + (defconstant PROT-NONE 0) + (defconstant MAP-SHARED 0) + (defconstant MAP-PRIVATE 1) + (defconstant MS-ASYNC nil) + (defconstant MS-SYNC nil) + (export ;export on the fly like define-call + (defun msync (address length flags) + (declare (ignore flags)) + (when (zerop (sb-win32:flush-view-of-file address length)) + (sb-win32::win32-error "FlushViewOfFile"))))) ;;; mlockall, munlockall (define-call "mlockall" int minusp (flags int))