This is the cl-freelock Reference Manual, version 0.1.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Fri May 15 11:48:31 2026 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-freelocklock-free concurrency primitives, written in pure Common Lisp.
MIT
0.1.1
package.lisp (file).
src/atomics.lisp (file).
src/queue.lisp (file).
src/bounded-queue.lisp (file).
src/spsc-queue.lisp (file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-freelock/cl-freelock.asdcl-freelock/package.lispcl-freelock/src/atomics.lispcl-freelock/src/queue.lispcl-freelock/src/bounded-queue.lispcl-freelock/src/spsc-queue.lispcl-freelock/src/atomics.lisppackage.lisp (file).
cl-freelock (system).
atomic-incf (macro).
atomic-ref (structure).
atomic-ref-value (reader).
(setf atomic-ref-value) (writer).
cas (macro).
make-atomic-ref (function).
memory-barrier (function).
*sbcl-barrier-dummy* (special variable).
atomic-ref-p (function).
copy-atomic-ref (function).
thread-yield (function).
cl-freelock/src/queue.lispsrc/atomics.lisp (file).
cl-freelock (system).
initialize-instance (method).
make-queue (function).
queue (class).
queue-empty-p (function).
queue-pop (function).
queue-push (function).
copy-queue-node (function).
make-queue-node (function).
queue-head (reader method).
queue-node (structure).
queue-node-next (reader).
queue-node-p (function).
queue-node-value (reader).
queue-tail (reader method).
cl-freelock/src/bounded-queue.lispsrc/queue.lisp (file).
cl-freelock (system).
bounded-queue (class).
bounded-queue-capacity (reader method).
bounded-queue-empty-p (function).
bounded-queue-full-p (function).
bounded-queue-pop (function).
bounded-queue-pop-batch (function).
bounded-queue-push (function).
bounded-queue-push-batch (function).
initialize-instance (method).
make-bounded-queue (function).
bounded-queue-buffer (reader method).
bounded-queue-head (reader method).
bounded-queue-mask (reader method).
bounded-queue-sequences (reader method).
bounded-queue-tail (reader method).
cl-freelock/src/spsc-queue.lispsrc/bounded-queue.lisp (file).
cl-freelock (system).
initialize-instance (method).
make-spsc-queue (function).
spsc-pop (function).
spsc-push (function).
spsc-queue (class).
spsc-queue-buffer (reader method).
spsc-queue-capacity (reader method).
spsc-queue-head (reader method).
(setf spsc-queue-head) (writer method).
spsc-queue-mask (reader method).
spsc-queue-tail (reader method).
(setf spsc-queue-tail) (writer method).
Packages are listed by definition order.
cl-freelockfl
common-lisp.
atomic-incf (macro).
atomic-ref (structure).
atomic-ref-value (reader).
(setf atomic-ref-value) (writer).
bounded-queue (class).
bounded-queue-capacity (generic reader).
bounded-queue-empty-p (function).
bounded-queue-full-p (function).
bounded-queue-pop (function).
bounded-queue-pop-batch (function).
bounded-queue-push (function).
bounded-queue-push-batch (function).
cas (macro).
make-atomic-ref (function).
make-bounded-queue (function).
make-queue (function).
make-spsc-queue (function).
memory-barrier (function).
queue (class).
queue-empty-p (function).
queue-pop (function).
queue-push (function).
spsc-pop (function).
spsc-push (function).
spsc-queue (class).
*sbcl-barrier-dummy* (special variable).
atomic-ref-p (function).
bounded-queue-buffer (generic reader).
bounded-queue-head (generic reader).
bounded-queue-mask (generic reader).
bounded-queue-sequences (generic reader).
bounded-queue-tail (generic reader).
copy-atomic-ref (function).
copy-queue-node (function).
make-queue-node (function).
queue-head (generic reader).
queue-node (structure).
queue-node-next (reader).
queue-node-p (function).
queue-node-value (reader).
queue-tail (generic reader).
spsc-queue-buffer (generic reader).
spsc-queue-capacity (generic reader).
spsc-queue-head (generic reader).
(setf spsc-queue-head) (generic writer).
spsc-queue-mask (generic reader).
spsc-queue-tail (generic reader).
(setf spsc-queue-tail) (generic writer).
thread-yield (function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Atomically increments the value of the atomic-ref by DELTA. Returns the new value. Implemented via a CAS loop for portability.
A portable Compare-and-Swap macro.
Atomically stores NEW in PLACE if the current value of PLACE is EQ to OLD.
Returns the old value of PLACE. The comparison is done by EQ.
Returns T if the queue appears to be empty, and NIL otherwise.
Returns T if the queue appears to be full, NIL otherwise.
Pops an object from the queue. Returns (values object t) or (values nil nil). This operation is lock-free and non-blocking.
Pops up to COUNT objects from the queue. Returns two values:
1. A (possibly empty) list of objects.
2. T if any objects were popped, NIL otherwise.
Pushes an object onto the bounded queue. Returns T on success, NIL if full. This operation is lock-free and non-blocking.
Pushes a sequence of objects onto the queue. Returns T on success, NIL if there is not enough space for the entire sequence.
Creates a new lock-free, bounded queue. Capacity MUST be a power of two.
Creates a new lock-free, unbounded queue.
Creates a new lock-free, SPSC bounded queue. Capacity ABSOLUTELY MUST be a power of two.
Full memory barrier. All memory operations before
the barrier are completed before any memory operations after it.
Returns T if the queue appears to be empty, NIL otherwise.
NOTE: In a concurrent environment, the state can change immediately after this call.
Pops an object from the queue. Returns two values: the object and T on success, or (NIL, NIL) if the queue is empty. This operation is lock-free.
Pushes an object onto the queue. This operation is lock-free and non-blocking.
Pops an object from the SPSC queue. Must only be called by the consumer thread. Returns (values object t) or (values nil nil) if the queue is empty.
Pushes an object onto the SPSC queue. Must only be called by the producer thread. Returns T on success, and NIL if the queue is full.
bounded-queue)) ¶automatically generated reader method
spsc-queue) &key) ¶bounded-queue) &key) ¶structure-object.
(error "value is required")
(simple-array t (*))
:buffer
This slot is read-only.
(simple-array t (*))
:sequences
This slot is read-only.
(unsigned-byte 32)
:capacity
This slot is read-only.
(unsigned-byte 32)
This slot is read-only.
(cl-freelock:make-atomic-ref 0)
This slot is read-only.
(cl-freelock:make-atomic-ref 0)
This slot is read-only.
(simple-array t (*))
:buffer
This slot is read-only.
(unsigned-byte 32)
:capacity
This slot is read-only.
(unsigned-byte 32)
This slot is read-only.
fixnum
0
fixnum
0
A portable function to yield the current thread’s timeslice to the OS.
bounded-queue)) ¶automatically generated reader method
bounded-queue)) ¶automatically generated reader method
head.
bounded-queue)) ¶automatically generated reader method
mask.
bounded-queue)) ¶automatically generated reader method
bounded-queue)) ¶automatically generated reader method
tail.
spsc-queue)) ¶automatically generated reader method
spsc-queue)) ¶automatically generated reader method
spsc-queue)) ¶automatically generated reader method
head.
spsc-queue)) ¶automatically generated writer method
head.
spsc-queue)) ¶automatically generated reader method
mask.
spsc-queue)) ¶automatically generated reader method
tail.
spsc-queue)) ¶automatically generated writer method
tail.
| Jump to: | (
A B C F G I M Q S T |
|---|
| Jump to: | (
A B C F G I M Q S T |
|---|
| Jump to: | *
B C H M N P S T V |
|---|
| Jump to: | *
B C H M N P S T V |
|---|
| Jump to: | A B C F P Q S |
|---|
| Jump to: | A B C F P Q S |
|---|