[Ecls-list] Threads on MacOSX (and others)

bernard tatin bernard.tatin at tele2.fr
Wed Jan 26 09:02:01 UTC 2005


Juan Jose Garcia Ripoll wrote:
> ------------
> 
> ECL (Embeddable Common-Lisp) 0.9e
> Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
> Copyright (C) 1993 Giuseppe Attardi
> Copyright (C) 2000 Juan J. Garcia-Ripoll
>    ECL is free software, and you are welcome to redistribute it
> under certain conditions; see file 'Copyright' for details.
> Type :h for Help.  Top level.
>  > (mp::process-run-function 'test
>    #'(lambda ()
>        (loop (sleep 3)
>              (princ "Thread awaken... and going to sleep")
>              (terpri)
>              )))
> #<process 081b7820>
> Thread awaken... and going to sleep
> Thread awaken... and going to sleep
> Thread awaken... and going to sleep
> Thread awaken... and going to sleep
> Thread awaken... and going to sleep
> Thread awaken... and going to sleep
> [... more lines ommited ...]
>  > (mp::process-kill *)
> T
> 
[LeMac:tests] narberd% ecl
ECL (Embeddable Common-Lisp) 0.9e
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
         ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.  Top level.
 > *features*
(:NEW :DARWIN :IEEE-FLOATING-POINT :CLOS-STREAMS :CMU-FORMAT :BSD 
:DLOPEN :CLOS
  :THREADS :BOEHM-GC :ECL :COMMON :ANSI-CL :COMMON-LISP :POWERPC7450)
 > (mp::process-run-function 'test
                                       #'(lambda ()
                                           (loop (sleep 3)
                                              (princ "Thread awaken... 
and going to sleep")
                                              (terpri)
                                              )))
#<process 00461700>
 > Bus error
[LeMac:tests] narberd%

that's what I get !

And the very bad thing : all my tests where done in the command line or 
by loading source files. When I try to compile, I get that :
 > (compile-file "simple")
;;; Loading #P"/usr/local/lib/ecl/cmp.fas"

;;; Freeing library /usr/local/lib/ecl/cmp.fas
LOAD: Could not load file #P"/usr/local/lib/ecl/cmp.fas" (Error: "")
Broken at LAMBDA.
 >> :q
Top level.
 > (load "simple")
;;; Loading #P"simple.lisp"
#P"simple.lisp"
 > (ff 15)
1307674368000

The simple.lisp file is :
(defun ff (n)
   (if (< n 1)
       1
       (* n (ff (- n 1)))))


I look at the compilation problem and after I will look at the thread 
problem.

I make no mistake when I say that all the compiler stuff is in src/cmp ?


A bientôt,

Bernard.




More information about the ecl-devel mailing list