1;;; patch.ss 2;;; Copyright 1984-2017 Cisco Systems, Inc. 3;;; 4;;; Licensed under the Apache License, Version 2.0 (the "License"); 5;;; you may not use this file except in compliance with the License. 6;;; You may obtain a copy of the License at 7;;; 8;;; http://www.apache.org/licenses/LICENSE-2.0 9;;; 10;;; Unless required by applicable law or agreed to in writing, software 11;;; distributed under the License is distributed on an "AS IS" BASIS, 12;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13;;; See the License for the specific language governing permissions and 14;;; limitations under the License. 15 16(printf "loading ~s cross compiler~%" (constant machine-type-name)) 17 18; (current-expand (lambda args (apply sc-expand args))) 19; (current-eval (lambda args (apply interpret args))) 20 21(when-feature pthreads 22 (meta-cond 23 [(not (threaded?)) 24 ; we must be cross-compiling from nonthreaded to threaded version 25 ; handle thread parameter creation 26 (define-syntax with-mutex 27 (syntax-rules () 28 [(_ mexp e0 e1 ...) (begin e0 e1 ...)])) 29 (set! make-thread-parameter make-parameter) 30 (set! mutex-acquire (lambda (m) (void))) 31 (set! mutex-release (lambda (m) (void))) 32 (set! $tc-mutex (void))])) 33 34