Changeset 15095


Ignore:
Timestamp:
Nov 29, 2011, 3:03:05 AM (8 years ago)
Author:
gb
Message:

lib/nfcomp.lisp, level-0/nfasload.lisp: try to make the new scheme
more amenable to cross-compilation (when different FASL versions
may be involved.)

lisp-kernel/thread_manager.c: Android doesn't provide a pthread-level
way of setting thread affinity. We don't currently do this (it was
an attempted workaround for cache coherency problems); if we ever
need to, we can probably just use the underlying syscall.

Location:
trunk/source
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/nfasload.lisp

    r15093 r15095  
    919919  (funcall (faslapi.fasl-read-n-bytes *fasl-api*) s ivector byte-offset n))
    920920
     921(defun bootstrapping-fasl-min-version ()
     922  (logior #xff00 (logand #xff target::fasl-min-version)))
     923
     924(%fhave 'target-fasl-min-version #'bootstrapping-fasl-min-version)
     925
     926(defun bootstrapping-fasl-max-version ()
     927  (logior #xff00 (logand #xff target::fasl-max-version)))
     928
     929(%fhave 'target-fasl-max-version #'bootstrapping-fasl-max-version)
     930
    921931(defun %fasload (string &optional (table *fasl-dispatch-table*))
    922932  ;;(dbg string)
     
    963973                       (let* ((version (%fasl-read-word s)))
    964974                         (declare (fixnum version))
    965                          (if (or (> version (+ #xff00 target::fasl-max-version))
    966                                  (< version (+ #xff00 target::fasl-min-version)))
     975                         (if (or (> version (target-fasl-max-version))
     976                                 (< version (target-fasl-min-version)))
    967977                           (%err-disp (if (>= version #xff00) $xfaslvers $xnotfasl))
    968978                           (progn
  • trunk/source/lib/nfcomp.lisp

    r15093 r15095  
    14861486        (delete-file filename)))))
    14871487
     1488(defun target-symbol-value (name) 
     1489  (let* ((package (arch::target-package-name (backend-target-arch *target-backend*)))
     1490         (sym (find-symbol name package)))
     1491    (unless (and sym (boundp sym))
     1492      (error "~a not defined in target package ~s." name package))
     1493    (logior #xff00 (logand #xff (symbol-value sym)))))
     1494 
    14881495(defun target-fasl-version ()
    1489   (let* ((package (find-package "TARGET"))
    1490          (sym (find-symbol "FASL-VERSION" package)))
    1491     (unless (and sym (boundp sym))
    1492       (error "FASL-VERSION not defined in target package ~s." package))
    1493     (logior #xff00 (logand #xff (symbol-value sym)))))
     1496  (target-symbol-value "FASL-VERSION"))
     1497
     1498;; Redefine the versions of these functions used by the fasloader.
     1499
     1500(defun target-fasl-min-version ()
     1501  (target-symbol-value "FASL-MIN-VERSION"))
     1502
     1503(defun target-fasl-max-version ()
     1504  (target-symbol-value "FASL-MAX-VERSION"))
    14941505
    14951506(defun fasl-dump-block (gnames goffsets forms hash)
  • trunk/source/lisp-kernel/thread_manager.c

    r15093 r15095  
    187187{
    188188#ifdef LINUX
     189#ifndef ANDROID                 /* too useful to be in Android ... */
    189190  pthread_t thread = (pthread_t)(target->osid);
    190191  cpu_set_t mask;
     
    193194  CPU_SET(cpuno,&mask);
    194195  pthread_setaffinity_np(thread,sizeof(mask),&mask);
     196#endif
    195197#endif
    196198}
Note: See TracChangeset for help on using the changeset viewer.