muyinliu / cl-cpus

A Common Lisp feature to get number of CPUs on Linux/Mac/Windows
ISC License
29 stars 3 forks source link

(cpus:get-number-of-processors) returns 0 in macOS #4

Open auvi opened 6 years ago

auvi commented 6 years ago

Currently on macOS:

* (cpus:get-number-of-processors)

0

I have sent PR #3 . With the fix it works in my mac.

* (cpus:get-number-of-processors)

4
muyinliu commented 6 years ago

I have noticed that weird things happen like this:

sbcl --noinform \
        --eval "(ql:quickload 'cl-cpus)" \
        --eval "(format t \"~S~%\" (cl-cpus::get-number-of-processors))"  \
        --eval "(format t \"~S~%\" (cl-cpus::get-number-of-processors))"
To load "cl-cpus":
  Load 1 ASDF system:
    cl-cpus
; Loading "cl-cpus"
.
8
8
* (cpus:get-number-of-processors)
0
* (cpus:get-number-of-processors)
0
*
implement REPL in Command Line in normal code
SBCL x
ECL x x
CCL