Skip to content

Commit

Permalink
systeminfo cannot fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Jan 8, 2024
1 parent 3d258ee commit 24c29f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions machine-state.asd
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
:depends-on (:documentation-utils
:cffi
:bordeaux-threads
:trivial-features
(:feature :windows :com-on))
:in-order-to ((asdf:test-op (asdf:test-op :machine-state-test))))

Expand Down
6 changes: 3 additions & 3 deletions windows.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@

(define-implementation machine-cores ()
(cffi:with-foreign-objects ((system-info '(:struct system-info)))
(windows-call "GetSystemInfo"
:pointer system-info
:bool)
(cffi:foreign-funcall "GetSystemInfo"
:pointer system-info
:void)
(system-info-number-of-processors system-info)))

(defmacro with-thread-handle ((handle thread &optional (default 0)) &body body)
Expand Down

0 comments on commit 24c29f9

Please sign in to comment.