Changeset 14645
- Timestamp:
- Feb 7, 2011, 3:28:51 PM (14 years ago)
- Location:
- trunk/source
- Files:
-
- 2 edited
-
level-0/l0-cfm-support.lisp (modified) (2 diffs)
-
level-1/linux-files.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/level-0/l0-cfm-support.lisp
r14575 r14645 115 115 (maphash #'(lambda (k fv) 116 116 (declare (ignore k)) 117 (when (eq (fv.container fv) lib) 118 (setf (fv.addr fv) nil))) 117 (when (fv.addr fv) 118 (when (or (null lib) (eq (fv.container fv) lib)) 119 (setf (fv.addr fv) nil)))) 119 120 fvs)))) 120 121 … … 433 434 (maphash #'(lambda (k eep) 434 435 (declare (ignore k)) 435 (when (eq (eep.container eep) lib) 436 (setf (eep.address eep) nil) 437 (incf count))) 436 (when (eep.address eep) 437 (when (or (null lib) (eq (eep.container eep) lib)) 438 (setf (eep.address eep) nil) 439 (incf count)))) 438 440 (eeps)) 439 441 (not (zerop count)))) -
trunk/source/level-1/linux-files.lisp
r14582 r14645 976 976 ) 977 977 978 978 (defun %probe-shared-library (shlib) 979 #-(or windows-target freebsd-target) 980 (with-cstrs ((name (shlib.pathname shlib))) 981 (not (%null-ptr-p (#_dlopen name (logior #$RTLD_NOW #$RTLD_NOLOAD))))) 982 ;; FreeBSD may support #$RTLD_NOLOAD in 8.0, and that support may 983 ;; have been backported to 7.2. Until then ... 984 #+freebsd-target 985 (rlet ((info #>Dl_info)) 986 (not (eql 0 (#_dladdr (shlib.base shlib) info)))) 987 #+windows-target 988 (with-filename-cstrs ((name (shlib.pathname shlib))) 989 (not (%null-ptr-p (#_FindModuleW name))))) 990 979 991 980 992 ;;; Kind of has something to do with files, and doesn't work in level-0. 981 #+(or linux-target freebsd-target solaris-target)982 993 (defun close-shared-library (lib &key (completely t)) 983 994 "If completely is T, set the reference count of library to 0. Otherwise, … … 991 1002 (handle (shlib.handle lib))) 992 1003 (when handle 993 (let* ((found nil) 994 (base (shlib.base lib))) 1004 (let* ((found nil)) 995 1005 (do* () 996 ((progn 997 (#_dlclose handle) 998 (or (not (setq found (shlib-containing-address base))) 1006 ((progn 1007 #-windows-target (#_dlclose handle) 1008 #+windows-target (#_FreeLibrary handle) 1009 (or (not (setq found 1010 (%probe-shared-library lib))) 999 1011 (not completely))))) 1000 1012 (when (not found) 1001 1013 (setf (shlib.pathname lib) nil 1002 (shlib.base lib) nil1003 (shlib.handle lib) nil1004 (shlib.map lib) nil)1005 (unload-foreign-variables lib)1006 (unload-library-entrypoints lib))))))1014 (shlib.base lib) nil 1015 (shlib.handle lib) nil 1016 (shlib.map lib) nil) 1017 (unload-foreign-variables nil) 1018 (unload-library-entrypoints nil)))))) 1007 1019 1008 1020 #+darwin-target
Note:
See TracChangeset
for help on using the changeset viewer.
