Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
SB-CPU-AFFINITY is a simple API to Linux scheduler affinity masks for SBCL. | ||
|
||
See documentation of symbols exported from SB-CPU-AFFINITY package. | ||
|
||
Usage example: | ||
|
||
(with-cpu-affinity-mask (mask) | ||
(print mask)) | ||
|
||
(with-cpu-affinity-mask (mask :save t) | ||
;; Remove all | ||
(clear-cpu-affinity-mask mask) | ||
;; Set CPU 0. | ||
(setf (cpu-affinity-p 0 mask) t)) | ||
|
||
(with-cpu-affinity-mask (mask) | ||
(print mask)) | ||
|
||
(with-cpu-affinity-mask (mask :save t) | ||
;; Only odd CPUs in mask. | ||
(dotimes (cpu (cpu-count)) | ||
(setf (cpu-affinity-p cpu mask) (oddp cpu)))) | ||
|
||
(with-cpu-affinity-mask (mask) | ||
(print mask)) |