Skip to content

Commit

Permalink
add README
Browse files Browse the repository at this point in the history
  • Loading branch information
nikodemus committed Oct 29, 2008
1 parent 557cfda commit 3100ec3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -30,6 +30,6 @@ clean:

release: clean
mkdir sb-cpu-affinity-$(VERSION)
cp Makefile LICENSE *.lisp *.c *.asd sb-cpu-affinity-$(VERSION)/
cp Makefile LICENSE README *.lisp *.c *.asd sb-cpu-affinity-$(VERSION)/
tar -czvf sb-cpu-affinity-$(VERSION).tar.gz sb-cpu-affinity-$(VERSION)
rm -rf sb-cpu-affinity-$(VERSION)
25 changes: 25 additions & 0 deletions README
@@ -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))

0 comments on commit 3100ec3

Please sign in to comment.