#FIG 3.2 Landscape Center Inches Letter 100.00 Single 0 1200 2 2 4 0 1 0 7 0 0 -1 0.000 0 0 7 0 0 5 12900 9900 12900 300 300 300 300 9900 12900 9900 4 1 0 0 0 18 24 0.0000 4 360 3435 6600 900 Les m\351thodes (suit)\001 4 0 0 0 0 18 20 0.0000 4 270 5115 1200 2100 On suppose l'existance de primitives:\001 4 0 0 0 0 18 20 0.0000 4 270 7830 2400 2700 without-process-preemption (pour l'ex\351cution atomique)\001 4 0 0 0 0 18 20 0.0000 4 270 7035 2400 3045 process-wait (attendre la valeur vrai d'une fonction)\001 4 0 0 0 0 18 20 0.0000 4 270 5685 2400 3390 *current-process* (le processus courant)\001 4 0 0 0 0 14 20 0.0000 4 240 8910 1200 4800 ;; If value of place is old-value, set it to new-value\001 4 0 0 0 0 14 20 0.0000 4 225 7425 1200 5100 ;; Return T if the setf worked, nil otherwise\001 4 0 0 0 0 14 20 0.0000 4 240 7425 1200 5400 (defmacro setf-if (place old-value new-value)\001 4 0 0 0 0 14 20 0.0000 4 240 4950 1200 5700 `(without-process-preemption\001 4 0 0 0 0 14 20 0.0000 4 240 5775 1200 6000 (cond ((eql ,place ,old-value)\001 4 0 0 0 0 14 20 0.0000 4 240 5940 1200 6300 (setf ,place ,new-value)\001 4 0 0 0 0 14 20 0.0000 4 225 2310 1200 6600 t)\001 4 0 0 0 0 14 20 0.0000 4 225 3465 1200 6900 (t nil))))\001 4 0 0 0 0 14 20 0.0000 4 240 8745 1200 7800 (defmethod check-for-mylock ((l simple-lock) process)\001 4 0 0 0 0 14 20 0.0000 4 240 5940 1200 8100 (when (eql (lock-owner l) process)\001 4 0 0 0 0 14 20 0.0000 4 240 9900 1200 8400 (error "Can't seize ~A because you already own it." l)))\001