The stmx Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The stmx Reference Manual

This is the stmx Reference Manual, version 2.0.5, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 09:23:17 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

STMX

Summary

STMX is a high-performance implementation of composable Transactional Memory (TM) for Common Lisp. TM is a concurrency control mechanism aimed at making concurrent programming easier to write and understand. Instead of traditional lock-based programming, one programs with atomic memory transactions, which can be composed together to make larger atomic memory transactions.

A memory transaction gets committed if it returns normally, while it gets rolled back if it signals an error (and the error is propagated to the caller).

Finally, memory transactions can safely run in parallel in different threads, are re-executed from the beginning in case of conflicts or if consistent reads cannot be guaranteed, and their effects are not visible from other threads until they commit.

Memory transactions give freedom from deadlocks, are immune to thread-safety bugs and race conditions, provide automatic roll-back on failure, and aim at resolving the tension between granularity and concurrency.

News

Latest news, 16th January 2015

Version 2.0.1 released. It adds support for transactional structs in addition to transactional CLOS objects, and a faster, struct-based implementation of transactional CONS cells and lists, including several list-manipulating functions - see util/tcons.lisp and util/tlist.lisp

Unluckily, the hardware bug that prompted Intel to disable hardware transactional memory (TSX) in August 2014 is still there, and very few new models are available without the bug. So for the moment STMX will be software-only on many CPUs.

Older news

See the file NEWS.md

General documentation

An introduction is available to explain more in detail what STMX is, what it is not, and how it is implemented.

For background information, Composable Memory Transactions is a very good - though a bit technical - explanation of memory transactions and how they are used and combined. For the interested reader, it also goes in deep detail on how to actually implement them.

Supported systems

STMX is currently tested on the following Common Lisp implementations:

Partially supported systems

Unsupported systems

Untested systems

STMX will probably work on several other Common Lisp implementations as long as they support log4cl, closer-mop, bordeaux-threads and trivial-garbage, but the author gives no guarantees.

Installation and loading

Stable version - from Quicklisp

STMX is available from Quicklisp. The simplest way to obtain it is to first install Quicklisp then run these commands from REPL:

CL-USER> (ql:quickload "stmx")
;; lots of output...
CL-USER> (use-package :stmx)

If all goes well, this will automatically download and install the stable branch of STMX and its dependencies:

Latest version - from GitHub

In case you want to use the "latest and greatest" version directly from the author, in order to get the newest features - most notably hardware memory transactions - improvements, bug fixes, and occasionally new bugs, you need to download it into your Quicklisp local-projects folder. Open a shell and run the commands:

$ cd ~/quicklisp/local-projects
$ git clone git://github.com/cosmos72/stmx.git

then proceed as before - load a REPL and run:

CL-USER> (ql:quickload "stmx")
;; lots of output...
CL-USER> (use-package :stmx)

If all goes well, it will automatically load STMX and its dependencies.

Note: unless you know what you are doing, do not try to load different STMX versions one after the other from the same REPL - strange things may happen.

Other versions - from Sourceforge

All the stable versions of STMX, present and past, are also available from Sourceforge, including version 1.9.0.

Troubleshooting

In case you get errors:

Testing that it works

After loading STMX for the first time, it is recommended to run the test suite to check that everything works as expected. From the REPL, run:

CL-USER> (ql:quickload "stmx.test")
;; lots of output...
CL-USER> (fiveam:run! 'stmx.test:suite)
;; even more output...
 Did 7133 checks.
    Pass: 7133 (100%)
    Skip: 0 ( 0%)
    Fail: 0 ( 0%)

Note: (ql:quickload "stmx.test") intentionally works only after (ql:quickload "stmx") has completed successfuly.

The test suite should report zero Skip and zero Fail; the number of Pass may vary. You are welcome to report any failure you get while running the test suite, please include in the report:

See "Contacts, help, discussion" below for the preferred method to send the report.

Basic usage

STMX offers the following Lisp macros and functions, also heavily documented in the sources - remember (describe 'some-symbol) at REPL.

Input/Output during transactions

WARNING: since transactions will be re-executed in case of conflicts with others and can also rollback or retry, all code inside an atomic block may be executed more times than expected, or may be executed when not expected.

Some transactional memory implementations, especially for statically-typed languages, forbid performing input/output during a transaction on the ground that I/O is not transactional: if a transaction sends an irreversible command to the outside world, there is no way to undo it in case the transaction rolls back, retries or conflicts.

STMX does not implement such restrictions, i.e. I/O and any other irreversible action can also be performed inside an atomic block. This means you are free to launch missiles during a transaction, and destroy the world when you shouldn't have. You have been warned.

Despite the risk, there are at least two reasons for such a design choice:

The typical solution for the above risk is: during a transaction, perform I/O only for debugging purposes, for example using a logging library as log4cl (or whatever is appropriate for your program), and queue any I/O operation in a transactional buffer. Then, invoke a separate function that first runs a transaction to atomically consume the buffer and only later, outside any transaction, performs the actual I/O operation.

An alternative solution is: during a transaction, instead of performing I/O pass to AFTER-COMMIT a function that will perform I/O when executed. Note: AFTER-COMMIT is described in Advanced usage below, read it carefully because functions executed by AFTER-COMMIT have several restrictions on what they are allowed to do.

Advanced usage

For those cases where the basic features are not sufficient, or where more control is desired during the execution of transactional code, some advanced features are available:

Hardware transactions

STMX versions 1.9.0 or later can take advantage of hardware transactions on Intel CPUs that support Transactional Synchronization Extensions (TSX) - as of Juy 2013 the only CPUs actually supporting it are:

Quite surprisingly, the overclocker-friendly Intel Core i7 4770K (note the final K) does not support hardware transactions.

To actually use hardware transactions from STMX, there are two more requirements:

Also, hardware transactions only work in compiled code - SBCL sometimes interprets very short functions and simple code executed at REPL instead of compiling them, which may cause hardware transactions to fail.

How to tell if hardware transactions are supported

There are several ways. The easiest are:

How to use hardware transactions

STMX automatically uses hardware transactions if they are supported. There is no need for special commands, just execute the usual (ATOMIC ...) or (RUN-ATOMIC ...) forms.

Hardware transactions have several limitations, and STMX will seamlessly switch to (slower) software transactions in the following cases:

Utilities and examples

See the example and util folder, which contains several examples and utilities built with STMX and should be relatively straightforward to understand. The folder util contains the following classes with related methods and functions, all in the STMX.UTIL package - for more details, use (describe 'some-symbol) at REPL:

Performance

STMX automatically discovers and takes advantage of many optional, non-standard features of the underlying Common Lisp compiler. It also performs graceful degradation, i.e. if the fastest version of a feature is not available it automatically switches to a slower, available alternative.

Depending on the available features, STMX performance can vary up to a factor 100 or more (!).

To reach its peak performance, several requirements need to be satisfied by the hardware and by the Lisp compiler being used. They are listed here in order of importance:

Hardware requirements:

Lisp compiler requirements:

  1. it must have good multi-threading support. Without it, what would you need a concurrency library as STMX for?
  2. it must expose atomic compare-and-swap operations, to implement fast mutexes. A much slower alternative, but still better than nothing, is to expose a function that returns which thread has acquired a bordeaux-threads lock.
  3. it must produce fast, highly optimized code.
  4. it must be 64-bit. 32-bit is much slower because transactional memory version counters are then BIGNUMs instead of FIXNUMs.
  5. it must expose memory barrier operations. This is less important on x86 and x86-64, and more important on unordered architectures (almost all others).

Among the non-commercial Lisp compilers, SBCL is the only one known to STMX author that satisfies all the compiler requirements, and (guess why) the only one where STMX author has implemented support for hardware transactions.

Actually, all the other tested free Lisp compilers (ABCL, CCL, CMUCL, ECL) are at least somewhat lacking in the area "fast, highly optimized code", and none of them offers atomic compare-and-swap or memory barrier operations at all. One - CMUCL - produces relatively fast code, but does not support native threads. STMX is not tested on any commercial Lisp compiler, so performance on them is simply unknown.

For these reasons, STMX will reach the highest known performance on SBCL by a large margin - possibly by a factor from 10 to 100 or more with respect to other tested systems.

For more performance considerations and a lot of raw numbers produced by running micro-benchmarks, see the included files doc/benchmark.md, doc/benchmark-abcl.md, doc/benchmark-ccl64.md and doc/benchmark-cmucl.md.

The short version is: as of March 2015, on a fast consumer PC (Core i7 4770 @ 3.5GHz or better) with 64-bit SBCL 1.1.9 or better, STMX can execute more than 35 millions hardware transactions per second per CPU core, and more than 7 millions software transactions per second per CPU core. The second platform in terms of performance is CCL (x86_64), that reaches 1.1 millions software transactions per second per CPU core using two threads, but STMX performance quickly decreases with more threads (reason still needs to be investigated).

A small example with very short transactions is the dining philosophers, with 5 reads and 5 writes to transactional memory per atomic block, where each CPU core runs approximately 4.5 millions software transactions per second - hyperthreading has very limited effects.

Obviously, performance in other usage scenarios will depend on the complexity of the code inside transactions, on the availability of hardware transactions, on the number of reads and writes to transactional memory, and the rate of conflicts and rollbacks.

Note

These result are not absolute performance considerations of the tested Lisp systems. They are simply the outcome of running micro-benchmarks of a particular library optimized for SBCL (see the hardware transactions, atomic compare-and-swap and memory barriers considerations) on several other Lisp systems. Do not try to construct these results as STMX author's opinions on the mentioned Lisp systems.

Lee-STMX

For a less artificial and hopefully more realistic benchmark, the author has ported Lee-TM, a non-trivial benchmark suite for transactional memory developed in 2007 by the University of Manchester (UK). The result is Lee-STMX - as of July 2013, its status is BETA.

Contacts, help, discussion

As long as the traffic is low enough, GitHub Issues can be used to report test suite failures, bugs, suggestions, general discussion etc.

If the traffic becomes high, more appropriate discussion channels will be set-up.

The author will also try to answer support requests, but gives no guarantees.

Status

As of July 2013, STMX is being written by Massimiliano Ghilardi and is considered by the author to be stable.

STMX is a full rewrite of CL-STM, which has been developed by Hoan Ton-That for the Google Summer of Code 2006.

Donations

STMX is a spare-time project. Donations can help the project by recognizing its usefulness and covering expenses.

You can donate with PayPal or credit card.

Legal

STMX is released under the terms of the Lisp Lesser General Public License, known as the LLGPL.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 stmx

Author

Massimiliano Ghilardi

License

LLGPL

Description

Composable Transactional Memory

Version

2.0.5

Dependencies
Source

stmx.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Next: , Previous: , Up: Modules   [Contents][Index]

3.1 stmx/asm

Parent

stmx (system)

Location

asm/

Components

Next: , Previous: , Up: Modules   [Contents][Index]

3.2 stmx/lang

Dependency

asm (module)

Parent

stmx (system)

Location

lang/

Components

Next: , Previous: , Up: Modules   [Contents][Index]

3.3 stmx/main

Dependency

lang (module)

Parent

stmx (system)

Location

main/

Components

Previous: , Up: Modules   [Contents][Index]

3.4 stmx/util

Dependencies
Parent

stmx (system)

Location

util/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Next: , Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 stmx.asd

Location

stmx.asd

Systems

stmx (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 stmx/asm/package.lisp

Parent

asm (module)

Location

asm/package.lisp

Packages

stmx.asm


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 stmx/asm/compiler.lisp

Dependency

package.lisp (file)

Parent

asm (module)

Location

asm/compiler.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.4 stmx/asm/compiler-late.lisp

Dependency

compiler.lisp (file)

Parent

asm (module)

Location

asm/compiler-late.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.5 stmx/asm/x86-32,64-insts.lisp

Dependency

compiler-late.lisp (file)

Parent

asm (module)

Location

asm/x86-32,64-insts.lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.6 stmx/asm/x86-32,64-vops.lisp

Dependency

x86-32,64-insts.lisp (file)

Parent

asm (module)

Location

asm/x86-32,64-vops.lisp

Exported Definitions

+transaction-started+ (constant)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.7 stmx/asm/cpuid.lisp

Dependency

x86-32,64-vops.lisp (file)

Parent

asm (module)

Location

asm/cpuid.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.8 stmx/asm/transaction.lisp

Dependency

x86-32,64-vops.lisp (file)

Parent

asm (module)

Location

asm/transaction.lisp

Exported Definitions
Internal Definitions

transaction-abort-macro (macro)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.9 stmx/lang/package.lisp

Parent

lang (module)

Location

lang/package.lisp

Packages

stmx.lang


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.10 stmx/lang/macro.lisp

Dependency

package.lisp (file)

Parent

lang (module)

Location

lang/macro.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.11 stmx/lang/features.lisp

Dependency

macro.lisp (file)

Parent

lang (module)

Location

lang/features.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.12 stmx/lang/features-reader.lisp

Dependency

features.lisp (file)

Parent

lang (module)

Location

lang/features-reader.lisp

Exported Definitions

enable-#?-syntax (macro)

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.13 stmx/lang/thread.lisp

Dependency

features-reader.lisp (file)

Parent

lang (module)

Location

lang/thread.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.14 stmx/lang/features-detect.lisp

Dependency

thread.lisp (file)

Parent

lang (module)

Location

lang/features-detect.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.15 stmx/lang/hw-transactions.lisp

Dependency

features-detect.lisp (file)

Parent

lang (module)

Location

lang/hw-transactions.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.16 stmx/lang/atomic-ops.lisp

Dependency

features-detect.lisp (file)

Parent

lang (module)

Location

lang/atomic-ops.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.17 stmx/lang/mutex.lisp

Dependency

atomic-ops.lisp (file)

Parent

lang (module)

Location

lang/mutex.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.18 stmx/lang/atomic-counter.lisp

Dependencies
Parent

lang (module)

Location

lang/atomic-counter.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.19 stmx/lang/cons.lisp

Dependency

thread.lisp (file)

Parent

lang (module)

Location

lang/cons.lisp

Exported Definitions
Internal Definitions

*cons-pool* (special variable)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.20 stmx/lang/fast-vector.lisp

Dependency

macro.lisp (file)

Parent

lang (module)

Location

lang/fast-vector.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.21 stmx/lang/hash-table.lisp

Dependency

cons.lisp (file)

Parent

lang (module)

Location

lang/hash-table.lisp

Exported Definitions
Internal Definitions

incf-hash-counter (macro)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.22 stmx/lang/print.lisp

Dependency

macro.lisp (file)

Parent

lang (module)

Location

lang/print.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.23 stmx/lang/class-precedence-list.lisp

Dependency

macro.lisp (file)

Parent

lang (module)

Location

lang/class-precedence-list.lisp

Exported Definitions

clos-compute-class-precedence-list (function)

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.24 stmx/main/package.lisp

Parent

main (module)

Location

main/package.lisp

Packages

stmx


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.25 stmx/main/version.lisp

Dependency

package.lisp (file)

Parent

main (module)

Location

main/version.lisp

Exported Definitions

*stmx-version* (special variable)

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.26 stmx/main/global-clock.lisp

Dependency

package.lisp (file)

Parent

main (module)

Location

main/global-clock.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.27 stmx/main/tvar-fwd.lisp

Dependency

global-clock.lisp (file)

Parent

main (module)

Location

main/tvar-fwd.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.28 stmx/main/classes.lisp

Dependency

tvar-fwd.lisp (file)

Parent

main (module)

Location

main/classes.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.29 stmx/main/txhash.lisp

Dependency

classes.lisp (file)

Parent

main (module)

Location

main/txhash.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.30 stmx/main/tlog.lisp

Dependency

txhash.lisp (file)

Parent

main (module)

Location

main/tlog.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.31 stmx/main/tvar.lisp

Dependency

tlog.lisp (file)

Parent

main (module)

Location

main/tvar.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.32 stmx/main/optimize-for.lisp

Dependency

tvar.lisp (file)

Parent

main (module)

Location

main/optimize-for.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.33 stmx/main/tvar-slot.lisp

Dependency

optimize-for.lisp (file)

Parent

main (module)

Location

main/tvar-slot.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.34 stmx/main/tstruct.lisp

Dependency

tvar-slot.lisp (file)

Parent

main (module)

Location

main/tstruct.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.35 stmx/main/tclass.lisp

Dependencies
Parent

main (module)

Location

main/tclass.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.36 stmx/main/tslot.lisp

Dependency

tclass.lisp (file)

Parent

main (module)

Location

main/tslot.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.37 stmx/main/hw-atomic.lisp

Dependency

classes.lisp (file)

Parent

main (module)

Location

main/hw-atomic.lisp

Exported Definitions

hw-atomic2 (macro)

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.38 stmx/main/commit.lisp

Dependencies
Parent

main (module)

Location

main/commit.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.39 stmx/main/sw-atomic.lisp

Dependency

commit.lisp (file)

Parent

main (module)

Location

main/sw-atomic.lisp

Exported Definitions

transaction (macro)

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.40 stmx/main/atomic.lisp

Dependencies
Parent

main (module)

Location

main/atomic.lisp

Exported Definitions
Internal Definitions

hw-transaction-test (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.41 stmx/main/orelse.lisp

Dependency

atomic.lisp (file)

Parent

main (module)

Location

main/orelse.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.42 stmx/util/package.lisp

Parent

util (module)

Location

util/package.lisp

Packages

stmx.util


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.43 stmx/util/misc.lisp

Dependency

package.lisp (file)

Parent

util (module)

Location

util/misc.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.44 stmx/util/print.lisp

Dependency

package.lisp (file)

Parent

util (module)

Location

util/print.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.45 stmx/util/container.lisp

Dependency

misc.lisp (file)

Parent

util (module)

Location

util/container.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.46 stmx/util/tcons.lisp

Dependency

misc.lisp (file)

Parent

util (module)

Location

util/tcons.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.47 stmx/util/tcons-list.lisp

Dependency

tcons.lisp (file)

Parent

util (module)

Location

util/tcons-list.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.48 stmx/util/tcons-alist.lisp

Dependency

tcons.lisp (file)

Parent

util (module)

Location

util/tcons-alist.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.49 stmx/util/tcons-set.lisp

Dependency

tcons.lisp (file)

Parent

util (module)

Location

util/tcons-set.lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.50 stmx/util/tcons-tree.lisp

Dependency

tcons.lisp (file)

Parent

util (module)

Location

util/tcons-tree.lisp

Exported Definitions
Internal Definitions

copy-ttree (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.51 stmx/util/tcons-higher.lisp

Dependency

tcons-alist.lisp (file)

Parent

util (module)

Location

util/tcons-higher.lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.52 stmx/util/tvar.lisp

Dependency

container.lisp (file)

Parent

util (module)

Location

util/tvar.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.53 stmx/util/tcell.lisp

Dependency

container.lisp (file)

Parent

util (module)

Location

util/tcell.lisp

Exported Definitions
Internal Definitions

+empty-tcell+ (constant)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.54 stmx/util/tstack.lisp

Dependency

container.lisp (file)

Parent

util (module)

Location

util/tstack.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.55 stmx/util/tfifo.lisp

Dependencies
Parent

util (module)

Location

util/tfifo.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.56 stmx/util/tchannel.lisp

Dependencies
Parent

util (module)

Location

util/tchannel.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.57 stmx/util/bheap.lisp

Dependency

container.lisp (file)

Parent

util (module)

Location

util/bheap.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.58 stmx/util/gmap.lisp

Dependencies
Parent

util (module)

Location

util/gmap.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.59 stmx/util/rbmap.lisp

Dependency

gmap.lisp (file)

Parent

util (module)

Location

util/rbmap.lisp

Exported Definitions

rbmap (class)

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.60 stmx/util/tmap.lisp

Dependency

rbmap.lisp (file)

Parent

util (module)

Location

util/tmap.lisp

Exported Definitions

tmap (class)

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.61 stmx/util/simple-tvector.lisp

Dependency

print.lisp (file)

Parent

util (module)

Location

util/simple-tvector.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.62 stmx/util/ghash-table.lisp

Dependency

print.lisp (file)

Parent

util (module)

Location

util/ghash-table.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.63 stmx/util/thash-table.lisp

Dependencies
Parent

util (module)

Location

util/thash-table.lisp

Exported Definitions

thash-table (class)

Internal Definitions

Previous: , Up: Files   [Contents][Index]

4.2 Other


Previous: , Up: Other files   [Contents][Index]

4.2.1 stmx/stmx.asd

Parent

stmx (system)

Location

stmx.asd


Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 stmx.asm

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.2 stmx.lang

Source

package.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.3 stmx

Source

package.lisp (file)

Use List
Used By List

stmx.util

Exported Definitions
Internal Definitions

Previous: , Up: Packages   [Contents][Index]

5.4 stmx.util

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Constants

Constant: +hw-transaction-started+
Package

stmx.lang

Source

hw-transactions.lisp (file)

Constant: +hw-transaction-supported+
Package

stmx.lang

Source

hw-transactions.lisp (file)

Constant: +impl-package+

Designator for the compiler internal package where we define Intel TSX CPU instructions

Package

stmx.asm

Source

compiler.lisp (file)

Constant: +transaction-started+

Value returned by (transaction-begin) if the transaction is successfully started. It is an implementation-dependent fixnum, different from all possible transactions abort error codes.

Package

stmx.asm

Source

x86-32,64-vops.lisp (file)

Constant: +transaction-user-abort+

Value returned by (transaction-begin) if the transaction was manually aborted by calling (transaction-abort).
It is an implementation-dependent fixnum, different from +transaction-started+ and from all error codes indicating a spontaneous abort.

Package

stmx.asm

Source

transaction.lisp (file)

Constant: +unbound-tvar+

Unbound TVARs actually contain this value. Use with care.

Package

stmx

Source

tvar-fwd.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Special variables

Special Variable: *current-thread*
Package

stmx.lang

Source

thread.lisp (file)

Special Variable: *stmx-version*
Package

stmx

Source

version.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Macros

Macro: after-commit &body BODY

Register BODY to be invoked after the current transaction commits.
If BODY signals an error when executed, the error is propagated
to the caller and further code registered with AFTER-COMMIT is not executed, but the transaction remains committed.

WARNING: Code registered with after-commit has a number or restrictions:

1) if BODY signal an error when executed, the error is propagated to the caller, forms registered later with AFTER-COMMIT are not executed,
but the transaction remains committed.

2) BODY is *not* executed inside a transaction: while it is certainly possible to explicitly run an (atomic) block from it, doing so would probably defeat the purpose of AFTER-COMMIT and it may also cause a significant performance penalty.

Package

stmx

Source

commit.lisp (file)

Macro: aif TEST THEN &optional ELSE
Package

stmx.lang

Source

macro.lisp (file)

Macro: analyze-struct (DEFSTRUCT NAME-AND-OPTIONS &rest SLOT-DESCRIPTIONS)

Analyze the slots of a non-transactional struct, so that transactional structs can subclass it. Use this macro to wrap a DEFSTRUCT as follows:
(ANALYZE-STRUCT (DEFSTRUCT {struct-name | (struct-name [options])} slots-description*)

Note: this macro only analyzes the structure definition, does *not* define the structure. See NON-TRANSACTIONAL-STRUCT for that.

Package

stmx

Source

tstruct.lisp (file)

Macro: atomic &rest BODY

Main entry point for STMX.

Run BODY in a memory transaction. All changes to transactional memory will be visible to other threads only after BODY returns normally (commits). If BODY signals an error, its effects on transactional memory are rolled back and the error is propagated normally.
Also, no work-in-progress transactional memory will ever be visible to other threads.

A memory transaction can also retry: in such case ATOMIC will abort it, wait until some of the value read by the transaction have changed,
then re-run the transaction from the beginning.

Since STMX transactions do not lock memory, it is possible for different transactions to try to update the same memory (almost) simultaneously.
In such case, the conflict is detected when they try to commit or rollback, and only one conflicting transaction is allowed to commit:
all others are immediately re-run again from the beginning.

For this reason, a transaction SHOULD NOT perform any irreversible operation such as INPUT/OUTPUT: the result would be that I/O is executed multiple times, or executed even when it shouldn’t have!
Irreversible operations SHOULD be performed OUTSIDE transactions,
for example by queueing them into transactional memory that another thread will consume and then, OUTSIDE transactions, actually perform them.

For how to create transactional memory, see TRANSACTIONAL or TVAR.
For another way to run transactions, see also TRANSACTION.
For advanced features inside transactions, see RETRY, ORELSE, NONBLOCKING, BEFORE-COMMIT and AFTER-COMMIT.

For pre-defined transactional classes, see the package STMX.UTIL

Package

stmx

Source

atomic.lisp (file)

Macro: atomic-compare-and-swap PLACE OLD NEW
Package

stmx.lang

Source

atomic-ops.lisp (file)

Macro: atomic-decf PLACE &optional DELTA

Atomically decrement PLACE by DELTA. Return _previous_ value of PLACE.

Package

stmx.lang

Source

atomic-ops.lisp (file)

Macro: atomic-incf PLACE &optional DELTA

Atomically increment PLACE by DELTA. Return _previous_ value of PLACE.

Package

stmx.lang

Source

atomic-ops.lisp (file)

Macro: atomic-pop PLACE

Like POP, but atomic. PLACE may be read multiple times before the operation completes – the write does not occur until such time that no other thread modified PLACE between the read and the write.

Works only on places supported by COMPARE-AND-SWAP.

Package

stmx.lang

Source

atomic-ops.lisp (file)

Macro: awhen TEST &body BODY
Package

stmx.lang

Source

macro.lisp (file)

Macro: before-commit &body BODY

Register BODY to be invoked immediately before the current transaction commits. If BODY signals an error when executed, the error is propagated to the caller, further code registered with BEFORE-COMMIT are not executed,
and the transaction rollbacks.

BODY can read and write normally to transactional memory, and in case of conflicts the whole transaction (not only the code registered with before-commit)
is re-executed from the beginning.

WARNING: BODY cannot (retry) - attempts to do so will signal an error. Starting a nested transaction and retrying inside that is acceptable,
as long as the (retry) does not propagate outside BODY.

Package

stmx

Source

commit.lisp (file)

Macro: define-constant-once NAME VALUE &optional DOC

Same as DEFCONSTANT, but evaluate VALUE only once:
re-executing again the same (DEFINE-CONSTANT-ONCE name ...) has no effects.

Package

stmx.lang

Source

features-detect.lisp (file)

Macro: define-global NAME VALUE &optional DOC

Define NAME as a global variable, declaring that it will have the same value in all threads, i.e. it will not be special nor dynamically bound.

This is implemented either with a compiler-specific macro (for example SB-EXT:DEFGLOBAL on SBCL), or as DEFVAR if no better implementation is available.

Package

stmx.lang

Source

features-detect.lisp (file)

Macro: defprint-object (OBJ CLASS &key TYPE IDENTITY) &rest BODY
Package

stmx.lang

Source

print.lisp (file)

Macro: do-fast-vector (ELEMENT) FAST-VECTOR &body BODY
Package

stmx.lang

Source

fast-vector.lisp (file)

Macro: do-ghash (KEY &optional VALUE INDEX) HASH &body BODY

Execute BODY on each KEY/VALUE contained in HASH. Return NIL.

Package

stmx.util

Source

ghash-table.lisp (file)

Macro: do-gmap (KEY &optional VALUE &key FROM-END) M &body BODY

Execute BODY in order on each key/value pair contained in M:
first execute it on the smallest key, then the second smallest... finally execute BODY on the largest key. Return nil.

If :FROM-END is true, BODY will be executed first on the largest key, then on the second largest key... and finally on the smallest key.

Adding or removing keys from M during this call (even from other threads) has undefined consequences. Not even the current key can be removed.

Package

stmx.util

Source

gmap.lisp (file)

Macro: do-hash (KEY &optional VALUE) HASH &body BODY

Execute body on each key/value pair contained in hash table

Package

stmx.lang

Source

hash-table.lisp (file)

Macro: do-simple-tvector (ELEMENT) TVEC &body BODY

Execute BODY on each ELEMENT contained in simple-tvector TVEC.

Creates an implicit block named NIL, so (return ...) can be used to exit early from the loop with an explicit return value.

Package

stmx.util

Source

simple-tvector.lisp (file)

Macro: do-tree (ATOM TREE &optional RESULT) &body BODY

Execute BODY for each atom inside TREE

Package

stmx.lang

Source

macro.lisp (file)

Macro: enable-#?-syntax ()
Package

stmx.lang

Source

features-reader.lisp (file)

Macro: eval-always &body BODY
Package

stmx.lang

Source

macro.lisp (file)

Macro: fast-atomic &rest BODY

Possibly slightly faster variant of ATOMIC.

On systems supporting hardware transactions (as of July 2013, very few systems support them), FAST-ATOMIC and ATOMIC are identical.
On other systems, multiple nested FAST-ATOMIC forms may be slightly faster than multiple nested ATOMIC blocks, at the price of compiling BODY more than once.

Package

stmx

Source

atomic.lisp (file)

Macro: fast-vector-pop-macro FAST-VECTOR &optional DEFAULT

If FAST-VECTOR is not empty, remove its last element and return it and t as multiple values. Otherwise evaluate DEFAULT and return (values DEFAULT NIL).

Package

stmx.lang

Source

fast-vector.lisp (file)

Macro: get-atomic-place PLACE &optional PLACE-MUTEX

Return current value of atomic PLACE.

Package

stmx.lang

Source

atomic-counter.lisp (file)

Macro: get-atomic-place-plus-delta PLACE DELTA &optional PLACE-MUTEX

Return DELTA plus current value of atomic PLACE.

Package

stmx.lang

Source

atomic-counter.lisp (file)

Macro: hw-atomic2 (&key HW-WRITE-VERSION ERR TEST-FOR-RUNNING-TX? UPDATE-STAT) &optional BODY FALLBACK

Run BODY in a hardware memory transaction. All changes to transactional memory will be visible to other threads only after BODY returns normally (commits). If BODY signals an error, its effects on transactional memory are rolled back and the error is propagated normally.
Also, no work-in-progress transactional memory will ever be visible to other threads.

If hardware memory transaction aborts for a conflict, rerun it.
If it fails for some other reason, execute FALLBACK.

Package

stmx

Source

hw-atomic.lisp (file)

Macro: hw-transaction-abort ()

Abort a hardware memory transaction currently in progress. Causes a rollback of *all* transaction effects, execution resumes at (hw-transaction-begin) by returning abort reason.

Package

stmx.lang

Source

hw-transactions.lisp (file)

Macro: hw-transaction-begin ()

Start a hardware memory transaction. Return +hw-transaction-started+ if transaction started successfully, otherwise return abort reason.

Package

stmx.lang

Source

hw-transactions.lisp (file)

Macro: hw-transaction-end ()

Try to commit a hardware memory transaction currently in progress. If commit is successful, return normally. Otherwise execution resumes at (hw-transaction-begin) by returning abort reason.

Package

stmx.lang

Source

hw-transactions.lisp (file)

Macro: hw-transaction-rerun-may-succeed? ERR-CODE

If ERR-CODE is the result returned by (HW-TRANSACTION-BEGIN) of an *aborted* transaction, return T if re-running the same transaction has a possibility to succeed,
i.e. if the abort reason was temporary (as for example a conflict with another thread). Return NIL if re-running the same transaction has no possibility to succeed.

Package

stmx.lang

Source

hw-transactions.lisp (file)

Macro: hw-transaction-running? ()

Return T if a hardware memory transaction is in progress.

Package

stmx.lang

Source

hw-transactions.lisp (file)

Macro: hw-transaction-supported-and-running? ()
Package

stmx.lang

Source

hw-transactions.lisp (file)

Macro: hw-transaction-supported? ()

Return T if the CPU supports hardware memory transactions, and there is a compiler extension to use them, otherwise return NIL.

Package

stmx.lang

Source

hw-transactions.lisp (file)

Macro: if-bind VAR TEST THEN &optional ELSE
Package

stmx.lang

Source

macro.lisp (file)

Macro: incf-atomic-place PLACE &optional DELTA PLACE-MUTEX

Increase atomic PLACE by DELTA and return its new value.

Package

stmx.lang

Source

atomic-counter.lisp (file)

Macro: let1 VAR VALUE &body BODY
Package

stmx.lang

Source

macro.lisp (file)

Macro: log.debug &rest ARGS
Package

stmx.lang

Source

macro.lisp (file)

Macro: log.make-logger &rest ARGS
Package

stmx.lang

Source

macro.lisp (file)

Macro: log.trace &rest ARGS
Package

stmx.lang

Source

macro.lisp (file)

Macro: mem-read-barrier &body BEFORE

Memory read barrier. Execute BEFORE, then put the barrier.

Package

stmx.lang

Source

atomic-ops.lisp (file)

Macro: mem-write-barrier &body BEFORE

Memory write barrier. Execute BEFORE, then put the barrier.

Package

stmx.lang

Source

atomic-ops.lisp (file)

Macro: new CLASS &rest INITARGS &key &allow-other-keys
Package

stmx.lang

Source

macro.lisp (file)

Macro: non-transactional-struct (DEFSTRUCT NAME-AND-OPTIONS &rest SLOT-DESCRIPTIONS)

Use this macro to wrap a normal DEFSTRUCT as follows:
(NON-TRANSACTIONAL-STRUCT (DEFSTRUCT {struct-name | (struct-name [options])} slots-description*)

The effect is the same as DEFSTRUCT, plus its slots will be analyzed
so that transactional structs can subclass it

Package

stmx

Source

tstruct.lisp (file)

Macro: nonblocking &body BODY

Execute all the forms in BODY in a single nested transaction and:
a) in case of transaction conflicts, re-execute BODY
b) if BODY returns normally, commit and return multiple values:
T followed by the values returned by BODY.
b) if BODY signals an error, rollback and raise such error.
d) if BODY attempts to retry, immediately return NIL without waiting/sleeping.

Can only be used inside an ATOMIC block.

Package

stmx

Source

orelse.lisp (file)

Macro: optimize-for-transaction (DEFUN-OR-DEFMETHOD NAME (&rest ARGS) &body BODY)
Package

stmx

Source

optimize-for.lisp (file)

Macro: optimize-for-transaction* (&key INLINE BODY-HWTX BODY-SWTX BODY-NOTX) (DEFUN-OR-DEFMETHOD NAME (&rest ARGS) &body BODY)
Package

stmx

Source

optimize-for.lisp (file)

Macro: orelse &body BODY

Execute each form in BODY from left to right in separate, nested transactions until one succeeds (i.e. commits) or signals an error.

If a form calls (RETRY) or has a temporary failure (temporary failures as for example conflicts are normally invisible because (ATOMIC ...) re-executes them automatically) advance to the next form and run it instead of retrying the current one.

Returns the value of the transaction that succeeded,
or signals the error raised by the transaction that failed.

Can only be used inside an ATOMIC block.

Package

stmx

Source

orelse.lisp (file)

Macro: pop-free-cons^ PLACE

Equivalent to POP, but also assumes the CONS at PLACE is no longer used and can be added to free CONS pool.
Removes and returns the first element in PLACE.

Package

stmx.lang

Source

cons.lisp (file)

Macro: push^ VALUE PLACE

Equivalent to PUSH, but uses CONS pool to speedup allocation. Inserts VALUE as the first element in PLACE.
Return the modified PLACE.

Package

stmx.lang

Source

cons.lisp (file)

Macro: save-thread-initial-bindings &rest SYMS
Package

stmx.lang

Source

thread.lisp (file)

Macro: set-atomic-place PLACE VALUE &optional PLACE-MUTEX

Set and return value of atomic PLACE.

Package

stmx.lang

Source

atomic-counter.lisp (file)

Macro: tpop PLACE

Equivalent to POP, but for TCONS transactional cells. Removes and returns the first element in PLACE.

Package

stmx.util

Source

tcons.lisp (file)

Macro: tpush VALUE PLACE

Equivalent to PUSH, but for TCONS transactional cells. Inserts VALUE as the first element in PLACE. Return the modified PLACE.

Package

stmx.util

Source

tcons.lisp (file)

Macro: transaction (DEFUN-OR-DEFMETHOD FUNC-NAME ARGS &body BODY)

Deprecated. Use ATOMIC instead.

Define FUNC-NAME as a new atomic function or method.
Use this macro to wrap a normal DEFUN or DEFMETHOD as follows: (TRANSACTION (DEFUN function-name (arguments) body))
or
(TRANSACTION (DEFMETHOD function-name (arguments) body))

The effect is the same as DEFUN - or DEFMETHOD - plus:
- the BODY is wrapped inside (atomic ...)

Package

stmx

Source

sw-atomic.lisp (file)

Macro: transactional (DEFCLASS-OR-DEFSTRUCT CLASS-OR-STRUCT-NAME &rest DIRECT-SUPERCLASSES-SLOTS-AND-OPTIONS)

Define CLASS-OR-STRUCT-NAME as a new transactional class or struct.

Use this macro to wrap a normal DEFCLASS as follows: (TRANSACTIONAL (DEFCLASS class-name (superclasses) (slots) [options]))

Or to wrap a normal DEFCLASS as follows:
(TRANSACTIONAL (DEFSTRUCT (class-name (options)) slots))

Package

stmx

Source

tclass.lisp (file)

Macro: transactional-class (DEFCLASS CLASS-NAME DIRECT-SUPERCLASSES DIRECT-SLOTS &rest CLASS-OPTIONS)

Define CLASS-NAME as a new transactional class.
Use this macro to wrap a normal DEFCLASS as follows:
(TRANSACTIONAL (DEFCLASS class-name (superclasses) (slots) [options]))

The effect is the same as DEFCLASS, plus:
- by default, slots are transactional memory (implemented by TVARs)
- it inherits also from TRANSACTIONAL-OBJECT
- the metaclass is TRANSACTIONAL-CLASS
- it internally defines a method INITIALIZE-INSTANCE :before, do NOT redefine it

Package

stmx

Source

tclass.lisp (file)

Macro: transactional-struct (DEFSTRUCT NAME-AND-OPTIONS &rest SLOT-DESCRIPTIONS)

Define NAME as a new transactional struct.
Use this macro to wrap a normal DEFSTRUCT as follows:
(TRANSACTIONAL-STRUCT (DEFSTRUCT {struct-name | (struct-name [options])} slots-description*)

The effect is the same as DEFSTRUCT, plus:
- by default, direct slots are transactional memory (implemented by TVARs)

Package

stmx

Source

tstruct.lisp (file)

Macro: when-bind VAR TEST &body BODY
Package

stmx.lang

Source

macro.lisp (file)

Macro: with-gensym NAME &body BODY
Package

stmx.lang

Source

macro.lisp (file)

Macro: with-gensyms (&rest NAMES) &body BODY
Package

stmx.lang

Source

macro.lisp (file)

Macro: with-lock (LOCK) &body BODY

Faster replacement for BORDEAUX-THREADS:WITH-LOCK-HELD.

Package

stmx.lang

Source

mutex.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.4 Compiler macros

Compiler Macro: tlast LIST &optional N
Package

stmx.util

Source

tcons-list.lisp (file)

Compiler Macro: tlist &rest LIST
Package

stmx.util

Source

tcons.lisp (file)

Compiler Macro: tlist* ARG0 &rest ARGS
Package

stmx.util

Source

tcons.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.5 Functions

Function: $ VAR

Get the value from the transactional variable VAR and return it. Return +unbound-tvar+ if VAR is not bound to a value.

Works both inside and outside transactions.
During transactions, it uses transaction log to record the read and to check for any value stored in the log.

Package

stmx

Source

tvar.lisp (file)

Setf Expander

(setf $) (setf expander)

Setf Expander: (setf $) VAR VALUE
Package

stmx

Source

tvar.lisp (file)

Reader

$ (function)

Writer

set-$ (function)

Function: $-slot VAR

Get the value from the transactional variable VAR and return it. Signal an error if VAR is not bound to a value.

Works both inside and outside transactions.
During transactions, it uses transaction log to record the read and to check for any value stored in the log.

Package

stmx

Source

tvar-slot.lisp (file)

Setf Expander

(setf $-slot) (setf expander)

Setf Expander: (setf $-slot) VAR
Package

stmx

Source

tvar-slot.lisp (file)

Reader

$-slot (function)

Function: add-to-gmap M &rest KEYS-AND-VALUES

N-ary version of SET-GMAP and (SETF (GET-GMAP ...) ...): Given a list of alternating keys and values,
add or replace each of them into M. Return M.

Package

stmx.util

Source

gmap.lisp (file)

Function: all-features &rest LIST

Return T if all features from LIST are present in *FEATURE-LIST* and have non-NIL value.

Package

stmx.lang

Source

features.lisp (file)

Function: assoc-feature F

Return (list F VALUE) if F is present in *FEATURE-LIST*

Package

stmx.lang

Source

features.lisp (file)

Function: bound-$? VAR

Return true if transactional variable VAR is bound to a value. Works both outside and inside transactions.

During transactions, it uses transaction log to record the read and to check for any value stored in the log.

Package

stmx

Source

tvar-slot.lisp (file)

Function: call-after-commit FUNC &optional LOG

Register FUNC function to be invoked after the current transaction commits.

IMPORTANT: See AFTER-COMMIT for what FUNC must not do.

Package

stmx

Source

commit.lisp (file)

Function: call-before-commit FUNC &optional LOG

Register FUNC function to be invoked immediately before the current transaction commits.

IMPORTANT: See BEFORE-COMMIT for what FUNC must not do.

Package

stmx

Source

commit.lisp (file)

Function: clear-ghash HASH

Remove all keys and values from HASH. Return HASH.

Package

stmx.util

Source

ghash-table.lisp (file)

Function: clear-gmap M

Remove all keys and values from M. Return M.

Package

stmx.util

Source

gmap.lisp (file)

Function: clear-hash HASH

Same as (clrhash hash).

Package

stmx.lang

Source

hash-table.lisp (file)

Function: clos-compute-class-precedence-list CLASS-NAME DIRECT-SUPERCLASSES-NAMES
Package

stmx.lang

Source

class-precedence-list.lisp (file)

Function: compile-if FLAG
Package

stmx.asm

Source

compiler.lisp (file)

Function: compile-if-package PACKAGE-NAME
Package

stmx.asm

Source

compiler.lisp (file)

Function: compile-if-symbol PACKAGE-NAME SYMBOL-NAME
Package

stmx.asm

Source

compiler.lisp (file)

Function: concat-symbols &rest THINGS

Print the things to a string, the convert the string into a symbol interned in current package. Return the symbol

Package

stmx.lang

Source

macro.lisp (file)

Function: cons^ &optional A B

Get a CONS from free cons pool, otherwise allocate it. Return the CONS.

Package

stmx.lang

Source

cons.lisp (file)

Function: copy-gmap M

Create and return a copy of binary tree M. Keys and values in M are shallow copied.

Package

stmx.util

Source

gmap.lisp (file)

Function: copy-gmap-into MCOPY M

Fill MCOPY with a copy of gmap M and return MCOPY. Copies all keys and values from M into MCOPY
and removes any other key/value already present in MCOPY.

Package

stmx.util

Source

gmap.lisp (file)

Function: copy-hash-table DST SRC

Copy all key/value pairs from hash-table SRC into hash-table DST. Other keys (and their values) present in DST but not in SRC are not modified. Return DST.

Package

stmx.lang

Source

hash-table.lisp (file)

Function: copy-talist TALIST

Return a new association list which is EQUAL to TALIST.

Package

stmx.util

Source

tcons-alist.lisp (file)

Function: cpuid EAX &optional ECX
Package

stmx.asm

Source

cpuid.lisp (file)

Function: default-feature F &optional VALUE

Add feature F and its VALUE into *FEATURE-LIST*, unless F is already present. Return (values T VALUE) if F was actually inserted in *FEATURE-LIST*, otherwise return NIL and the value already present in *FEATURE-LIST*.

Package

stmx.lang

Source

features.lisp (file)

Function: default-features &rest ALIST

Set the value of each feature in ALIST, unless the feature is already present in *FEATURE-LIST*. Each element in ALIST must be either
a pair (FEATURE VALUE) or a simple atom FEATURE.
In the latter case, the FEATURE value will default to T.

Package

stmx.lang

Source

features.lisp (file)

Function: ensure-thread-initial-binding SYM FORM
Package

stmx.lang

Source

thread.lisp (file)

Function: ensure-thread-initial-bindings &rest SYMS-AND-FORMS
Package

stmx.lang

Source

thread.lisp (file)

Function: fast-vector-capacity FAST-VECTOR

Return current capacity of FAST-VECTOR.

Package

stmx.lang

Source

fast-vector.lisp (file)

Function: fast-vector-clear FAST-VECTOR

Remove all elements from FAST-VECTOR. Return FAST-VECTOR.

Package

stmx.lang

Source

fast-vector.lisp (file)

Function: fast-vector-length FAST-VECTOR

Return current length of FAST-VECTOR.

Package

stmx.lang

Source

fast-vector.lisp (file)

Function: fast-vector-pop FAST-VECTOR &optional DEFAULT

If FAST-VECTOR is not empty, remove its last element and return it and t as multiple values. Otherwise return (values DEFAULT NIL).

Package

stmx.lang

Source

fast-vector.lisp (file)

Function: fast-vector-push NEW-ELEMENT FAST-VECTOR

If FAST-VECTOR is not full, append NEW-ELEMENT to FAST-VECTOR and return the index of the pushed element.
Otherwise return NIL.

Package

stmx.lang

Source

fast-vector.lisp (file)

Function: fast-vector-push-extend NEW-ELEMENT FAST-VECTOR

If FAST-VECTOR is full, resize it. Then append NEW-ELEMENT to FAST-VECTOR and return the index of the pushed element.

Package

stmx.lang

Source

fast-vector.lisp (file)

Function: find-symbol* SYMBOL-NAME &optional PACKAGE-NAME

Find and return the symbol named SYMBOL-NAME in PACKAGE

Package

stmx.asm

Source

compiler.lisp (file)

Function: fixnum/= X Y

Optimized version of (/= x y) for FIXNUM arguments

Package

stmx.util

Source

misc.lisp (file)

Function: fixnum< X Y

Optimized version of (< x y) for FIXNUM arguments

Package

stmx.util

Source

misc.lisp (file)

Function: fixnum= X Y

Optimized version of (= x y) for FIXNUM arguments

Package

stmx.util

Source

misc.lisp (file)

Function: fixnum> X Y

Optimized version of (> x y) for FIXNUM arguments

Package

stmx.util

Source

misc.lisp (file)

Function: free-cons^ CELL

Add a CONS cell to free cons pool.

Package

stmx.lang

Source

cons.lisp (file)

Function: free-list^ LIST

Add a list of CONS cells to free cons pool.

Package

stmx.lang

Source

cons.lisp (file)

Function: get-atomic-counter COUNTER

Return current value of atomic COUNTER.

Package

stmx.lang

Source

atomic-counter.lisp (file)

Function: get-atomic-counter-plus-delta COUNTER DELTA

Return DELTA plus current value of atomic COUNTER.

Package

stmx.lang

Source

atomic-counter.lisp (file)

Function: get-feature F &optional DEFAULT

Return value of F in *FEATURE-LIST* and T, or (values DEFAULT NIL) if not present or has NIL value.

Package

stmx.lang

Source

features.lisp (file)

Function: get-ghash HASH KEY &optional DEFAULT

If KEY is associated to VALUE in HASH, return (values VALUE t) Otherwise return (values DEFAULT nil).

Package

stmx.util

Source

ghash-table.lisp (file)

Setf Expander

(setf get-ghash) (setf expander)

Setf Expander: (setf get-ghash) HASH KEY VALUE
Package

stmx.util

Source

ghash-table.lisp (file)

Reader

get-ghash (function)

Writer

set-ghash (function)

Function: get-gmap M KEY &optional DEFAULT

Find KEY in binary tree M and return its value and T as multiple values. If M does not contain KEY, return (values DEFAULT NIL).

Package

stmx.util

Source

gmap.lisp (file)

Writer

(setf get-gmap) (function)

Function: (setf get-gmap) VALUE M KEY

Add KEY to binary tree M if not present, and associate VALUE to KEY in M. Return VALUE.

Package

stmx.util

Source

gmap.lisp (file)

Reader

get-gmap (function)

Function: get-hash HASH KEY

Same as (gethash key hash), only with reversed arguments.

Package

stmx.lang

Source

hash-table.lisp (file)

Writer

(setf get-hash) (function)

Function: (setf get-hash) VALUE HASH KEY

Same as (setf (gethash key hash) value), only with reversed key and hash arguments.

Package

stmx.lang

Source

hash-table.lisp (file)

Reader

get-hash (function)

Function: ghash-keys SRC &optional TO-LIST

Return a list containing the keys in ghash-table SRC.
If TO-LIST is not nil, it will be appended to the returned list. TO-LIST contents is not destructively modified.

Package

stmx.util

Source

ghash-table.lisp (file)

Function: ghash-pairs SRC &optional TO-ALIST

Return an alist containing a (key . value) pair for each entry in ghash-table SRC.
If TO-ALIST is not nil, it will be appended to the returned alist. TO-ALIST contents is not destructively modified.

Package

stmx.util

Source

ghash-table.lisp (file)

Function: ghash-table-count HASH

Return the number of KEY/VALUE entries in ghash-table HASH.

Package

stmx.util

Source

ghash-table.lisp (file)

Function: ghash-table-empty? HASH

Return T if GHASH-TABLE is empty, i.e. if it contains no entries.

Package

stmx.util

Source

ghash-table.lisp (file)

Function: ghash-table-hash HASH

Return the symbol used by ghash-table HASH to hash keys.

Package

stmx.util

Source

ghash-table.lisp (file)

Function: ghash-table-test HASH

Return the symbol used by ghash-table HASH to compare keys.

Package

stmx.util

Source

ghash-table.lisp (file)

Function: ghash-values SRC &optional TO-LIST

Return a list containing the values in ghash-table SRC.
If TO-LIST is not nil, it will be appended to the returned list. TO-LIST contents is not destructively modified.

Package

stmx.util

Source

ghash-table.lisp (file)

Function: gmap-count M

Return number of elements in binary tree M.

Package

stmx.util

Source

gmap.lisp (file)

Function: gmap-empty? M

Return t if binary tree M is empty, otherwise return nil.

Package

stmx.util

Source

gmap.lisp (file)

Function: gmap-keys M &optional TO-LIST

Return an ordered list of all keys contained in M.

Package

stmx.util

Source

gmap.lisp (file)

Function: gmap-pairs M &optional TO-ALIST

Return an ordered list of pairs (key . value) containing all entries in M.

Package

stmx.util

Source

gmap.lisp (file)

Function: gmap-pred M

Return the predicate symbol used by binary tree M to sort keys.

Package

stmx.util

Source

gmap.lisp (file)

Function: gmap-values M &optional TO-LIST

Return a list of all values contained in M.
The values are returned in the order given by their keys: first the value associated to the smallest key, and so on.

Package

stmx.util

Source

gmap.lisp (file)

Function: hash-table-keys SRC &optional TO-LIST

Return a list containing the keys in hash-table SRC.
If TO-LIST is not nil, it will be appended to the returned list. TO-LIST contents is not destructively modified.

Package

stmx.lang

Source

hash-table.lisp (file)

Function: hash-table-pairs SRC &optional TO-ALIST

Return an alist containing a (key . value) pair for each entry in hash-table SRC.
If TO-ALIST is not nil, it will be appended to the returned alist. TO-ALIST contents is not destructively modified.

Package

stmx.lang

Source

hash-table.lisp (file)

Function: hash-table-values SRC &optional TO-LIST

Return a list containing the values in hash-table SRC.
If TO-LIST is not nil, it will be appended to the returned list. TO-LIST contents is not destructively modified.

Package

stmx.lang

Source

hash-table.lisp (file)

Function: incf-atomic-counter COUNTER &optional DELTA

Increase atomic COUNTER by DELTA and return its new value.

Package

stmx.lang

Source

atomic-counter.lisp (file)

Function: lock-elision-supported-p ()

Test for HLE, i.e. hardware lock elision.
HLE is supported if (cpuid 7) returns ebx with bit 4 set.
If a processor does not support HLE, it will ignore the
new assembler instruction prefixes XACQUIRE and XRELEASE.

As of June 2013, the only x86-64 CPUs supporting HLE are:
* Intel Core i5 4570
* Intel Core i5 4670
* Intel Core i7 4770
Beware: at the time of writing all the known K models, as for example Intel Core i7 4770K, do **NOT** support HLE.

Package

stmx.asm

Source

cpuid.lisp (file)

Function: make-atomic-counter ()

Create and return a new ATOMIC-COUNTER.

Package

stmx.lang

Source

atomic-counter.lisp (file)

Function: make-fast-vector INITIAL-CAPACITY &key ELEMENT-TYPE INITIAL-ELEMENT

Create and return an initially empty FAST-VECTOR with specified maximum length.

Note: initial-element MUST be compatible with type element-type,
i.e. (typep initial-element element-type) must return true.

Package

stmx.lang

Source

fast-vector.lisp (file)

Function: make-mutex ()

Create and return a MUTEX.

Package

stmx.lang

Source

mutex.lisp (file)

Function: make-tlist SIZE &key INITIAL-ELEMENT

Constructs a tlist with SIZE elements each set to INITIAL-ELEMENT

Package

stmx.util

Source

tcons.lisp (file)

Function: map-gmap M FUNC

Invoke FUNC in order on each key/value pair contained in M:
first invoke it on the smallest key, then the second smallest... finally invoke FUNC on the largest key. Return nil.

FUNC must be a function accepting two arguments: key and value.

Adding or removing keys from M during this call (even from other threads) has undefined consequences. Not even the current key can be removed.

Package

stmx.util

Source

gmap.lisp (file)

Function: max-gmap M

Return the largest key in M, its value, and t as multiple values, or (values nil nil nil) if M is empty

Package

stmx.util

Source

gmap.lisp (file)

Function: merge-hash-tables DST SRC

Copy hash-table SRC into hash-table DST.

Return t if SRC and DST are compatible,
i.e. if they contain eq values for the keys common to both, otherwise return nil.
(in the latter case, the merge will not be completed).

Package

stmx.lang

Source

hash-table.lisp (file)

Function: min-gmap M

Return the smallest key in M, its value, and t as multiple values, or (values nil nil nil) if M is empty.

Package

stmx.util

Source

gmap.lisp (file)

Function: mutex-is-free? MUTEX

Return T if MUTEX is free. Return NIL if MUTEX
is currently locked by current thread or some other thread.

Package

stmx.lang

Source

mutex.lisp (file)

Function: mutex-is-own-or-free? MUTEX

Return T if MUTEX is free or locked by current thread. Return NIL if MUTEX is currently locked by some other thread.

Package

stmx.lang

Source

mutex.lisp (file)

Function: mutex-is-own? MUTEX

Return T if MUTEX is locked by current thread.

Package

stmx.lang

Source

mutex.lisp (file)

Function: mutex-owner INSTANCE
Function: (setf mutex-owner) VALUE INSTANCE
Package

stmx.lang

Source

mutex.lisp (file)

Function: release-mutex MUTEX

Release MUTEX. Return NIL. Consequences are undefined if MUTEX is locked by another thread or is already unlocked.

Package

stmx.lang

Source

mutex.lisp (file)

Function: rem-ghash HASH KEY

Remove KEY from HASH.
Return T if KEY was present in HASH, otherwise return NIL.

Package

stmx.util

Source

ghash-table.lisp (file)

Function: rem-gmap M KEY

Find and remove KEY and its associated value from binary tree M. Return t if KEY was removed, nil if not found.

Package

stmx.util

Source

gmap.lisp (file)

Function: rem-hash HASH KEY

Same as (remhash key hash), only with reversed arguments.

Package

stmx.lang

Source

hash-table.lisp (file)

Function: remove-from-gmap M &rest KEYS

N-ary version of REM-GMAP:
remove a list of keys from M. Return M.

Package

stmx.util

Source

gmap.lisp (file)

Function: retry ()

Abort the current transaction and re-run it again from the beginning.

Before re-executing, the transaction will wait on all variables that it read until at least one of them changes.

Package

stmx

Source

classes.lisp (file)

Function: run-atomic TX

Function equivalent of the ATOMIC macro.

Run the function TX inside a memory transaction.
If the transaction is invalid (conflicts) re-run TX immediately, ignoring any error it may signal.

Otherwise, commit if TX returns normally, or rollback if it signals an error.

Finally, if TX called (retry), re-run it after at least some of the transactional memory it read has changed.

Package

stmx

Source

atomic.lisp (file)

Function: run-orelse &rest FUNCS

Function variant of ‘orelse’. Execute the functions in FUNCS list
one by one from left to right in separate, nested transactions until one succeeds (i.e. commits) or signals an error.

If a nested transaction is invalid or wants to retry, run the next one.

Returns the value of the transaction that succeeded,
or signals the error raised by the transaction that failed.

Can only be used inside an ATOMIC block.

Package

stmx

Source

orelse.lisp (file)

Function: set-atomic-counter COUNTER VALUE

Set and return value of atomic COUNTER.

Package

stmx.lang

Source

atomic-counter.lisp (file)

Function: set-feature F &optional VALUE

Set feature F to VALUE, even if F is already present in *FEATURE-LIST*. Return VALUE.

Package

stmx.lang

Source

features.lisp (file)

Function: set-features &rest PLIST

Set the value of each feature in PLIST, even if the feature is already present in *FEATURE-LIST*. Each element in PLIST must be either
a pair (FEATURE VALUE) or a simple atom FEATURE.
In the latter case, the FEATURE value will default to T.

Package

stmx.lang

Source

features.lisp (file)

Function: set-ghash HASH KEY VALUE

Add KEY to HASH, associating it to VALUE. Return VALUE.

Package

stmx.util

Source

ghash-table.lisp (file)

Setf Expander

(setf get-ghash) (setf expander)

Function: set-gmap M KEY VALUE

Add KEY to binary tree M if not present, and associate KEY to VALUE in M. Return VALUE.

Package

stmx.util

Source

gmap.lisp (file)

Function: set-hash HASH KEY VALUE

Shortcut for (setf (gethash key hash) value)

Package

stmx.lang

Source

hash-table.lisp (file)

Function: simple-tvector LENGTH &key ELEMENT-TYPE INITIAL-ELEMENT INITIAL-CONTENTS

Create and return a new SIMPLE-TVECTOR.

Package

stmx.util

Source

simple-tvector.lisp (file)

Function: simple-tvector-length TVEC

Return the length of simple-tvector TVEC.

Package

stmx.util

Source

simple-tvector.lisp (file)

Function: start-multithreading ()
Package

stmx.lang

Source

thread.lisp (file)

Function: start-thread FUNCTION &key NAME INITIAL-BINDINGS
Package

stmx.lang

Source

thread.lisp (file)

Function: stringify &rest THINGS

Print the things to a string and return it

Package

stmx.lang

Source

macro.lisp (file)

Function: sxhash-equalp X

Variant of SXHASH designed for EQUALP tests, i.e.
(equalp x y) implies (= (sxhash-equalp x) (sxhash-equalp y)).
A common use is for ghash-tables and thash-tables that use :test ’equalp

Package

stmx.util

Source

misc.lisp (file)

Function: symbol-name* SYMBOL-NAME
Package

stmx.asm

Source

compiler.lisp (file)

Function: tacons KEY DATUM TALIST

Construct a new talist by adding the pair (KEY . DATUM) to TALIST.

Package

stmx.util

Source

tcons-alist.lisp (file)

Function: tassoc ITEM TALIST &key KEY TEST TEST-NOT

Return the tcons in TALIST whose tcar is equal (by a given test or EQL) to the ITEM.

Package

stmx.util

Source

tcons-alist.lisp (file)

Function: tatom OBJECT

Return NIL if OBJECT is a TCONS, and T otherwise.

Package

stmx.util

Source

tcons.lisp (file)

Function: tcaaaar TLIST

Return the CAR of the CAAAR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcaaaar) (function)

Function: (setf tcaaaar) VALUE TLIST

Set the CAR of the CAAAR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcaaaar (function)

Function: tcaaadr TLIST

Return the CAR of the CAADR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcaaadr) (function)

Function: (setf tcaaadr) VALUE TLIST

Set the CAR of the CAADR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcaaadr (function)

Function: tcaaar TLIST

Return the CAR of the CAAR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcaaar) (function)

Function: (setf tcaaar) VALUE TLIST

Set the CAR of the CAAR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcaaar (function)

Function: tcaadar TLIST

Return the CAR of the CADAR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcaadar) (function)

Function: (setf tcaadar) VALUE TLIST

Set the CAR of the CADAR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcaadar (function)

Function: tcaaddr TLIST

Return the CAR of the CADDR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcaaddr) (function)

Function: (setf tcaaddr) VALUE TLIST

Set the CAR of the CADDR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcaaddr (function)

Function: tcaadr TLIST

Return the CAR of the CADR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcaadr) (function)

Function: (setf tcaadr) VALUE TLIST

Set the CAR of the CADR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcaadr (function)

Function: tcaar TLIST

Return the CAR of the CAR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcaar) (function)

Function: (setf tcaar) VALUE TLIST

Set the CAR of the CAR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcaar (function)

Function: tcadaar TLIST

Return the CAR of the CDAAR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcadaar) (function)

Function: (setf tcadaar) VALUE TLIST

Set the CAR of the CDAAR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcadaar (function)

Function: tcadadr TLIST

Return the CAR of the CDADR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcadadr) (function)

Function: (setf tcadadr) VALUE TLIST

Set the CAR of the CDADR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcadadr (function)

Function: tcadar TLIST

Return the CAR of the CDAR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcadar) (function)

Function: (setf tcadar) VALUE TLIST

Set the CAR of the CDAR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcadar (function)

Function: tcaddar TLIST

Return the CAR of the CDDAR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcaddar) (function)

Function: (setf tcaddar) VALUE TLIST

Set the CAR of the CDDAR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcaddar (function)

Function: tcaddr TLIST

Return the CAR of the CDDR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcaddr) (function)

Function: (setf tcaddr) VALUE TLIST

Set the CAR of the CDDR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcaddr (function)

Function: tcadr TLIST

Return the CAR of the CDR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcadr) (function)

Function: (setf tcadr) VALUE TLIST

Set the CAR of the CDR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcadr (function)

Function: tcar LIST

Return the 1st object in a TLIST.

Package

stmx.util

Source

tcons.lisp (file)

Setf Expander

(setf tcar) (setf expander)

Setf Expander: (setf tcar) CONS

Set VALUE as the first element in a TCONS or non-null TLIST. This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons.lisp (file)

Reader

tcar (function)

Function: tcdaaar TLIST

Return the CDR of the CAAAR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcdaaar) (function)

Function: (setf tcdaaar) VALUE TLIST

Set the CDR of the CAAAR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcdaaar (function)

Function: tcdaadr TLIST

Return the CDR of the CAADR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcdaadr) (function)

Function: (setf tcdaadr) VALUE TLIST

Set the CDR of the CAADR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcdaadr (function)

Function: tcdaar TLIST

Return the CDR of the CAAR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcdaar) (function)

Function: (setf tcdaar) VALUE TLIST

Set the CDR of the CAAR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcdaar (function)

Function: tcdadar TLIST

Return the CDR of the CADAR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcdadar) (function)

Function: (setf tcdadar) VALUE TLIST

Set the CDR of the CADAR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcdadar (function)

Function: tcdaddr TLIST

Return the CDR of the CADDR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcdaddr) (function)

Function: (setf tcdaddr) VALUE TLIST

Set the CDR of the CADDR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcdaddr (function)

Function: tcdadr TLIST

Return the CDR of the CADR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcdadr) (function)

Function: (setf tcdadr) VALUE TLIST

Set the CDR of the CADR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcdadr (function)

Function: tcdar TLIST

Return the CDR of the CAR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcdar) (function)

Function: (setf tcdar) VALUE TLIST

Set the CDR of the CAR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcdar (function)

Function: tcddaar TLIST

Return the CDR of the CDAAR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcddaar) (function)

Function: (setf tcddaar) VALUE TLIST

Set the CDR of the CDAAR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcddaar (function)

Function: tcddadr TLIST

Return the CDR of the CDADR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcddadr) (function)

Function: (setf tcddadr) VALUE TLIST

Set the CDR of the CDADR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcddadr (function)

Function: tcddar TLIST

Return the CDR of the CDAR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcddar) (function)

Function: (setf tcddar) VALUE TLIST

Set the CDR of the CDAR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcddar (function)

Function: tcdddar TLIST

Return the CDR of the CDDAR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcdddar) (function)

Function: (setf tcdddar) VALUE TLIST

Set the CDR of the CDDAR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcdddar (function)

Function: tcdddr TLIST

Return the CDR of the CDDR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcdddr) (function)

Function: (setf tcdddr) VALUE TLIST

Set the CDR of the CDDR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcdddr (function)

Function: tcddr TLIST

Return the CDR of the CDR of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tcddr) (function)

Function: (setf tcddr) VALUE TLIST

Set the CDR of the CDR of a TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tcddr (function)

Function: tcdr LIST

Return all but the first object in a TLIST.

Package

stmx.util

Source

tcons.lisp (file)

Setf Expander

(setf tcdr) (setf expander)

Setf Expander: (setf tcdr) CONS

Set VALUE as the rest element in a TCONS or non-null TLIST.
This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons.lisp (file)

Reader

tcdr (function)

Function: tcell &optional VALUE

Create and return a new TCELL.

Package

stmx.util

Source

tcell.lisp (file)

Function: tcons FIRST REST

Create and return a new TCONS.

Package

stmx.util

Source

tcons.lisp (file)

Function: tconsp OBJECT
Package

stmx.util

Source

tcons.lisp (file)

Function: teighth TLIST

Return the 8th object in a TLIST or NIL if there is no 8th object.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf teighth) (function)

Function: (setf teighth) VALUE TLIST

Set the 8th object in a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

teighth (function)

Function: tendp OBJECT

This is the recommended way to test for the end of a proper TLIST. It returns true if OBJECT is NIL, false if OBJECT is a TCONS, and an error for any other type of OBJECT.

Package

stmx.util

Source

tcons-list.lisp (file)

Function: tfifo ()
Package

stmx.util

Source

tfifo.lisp (file)

Function: tfifth TLIST

Return the 5th object in a TLIST or NIL if there is no 5th object.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tfifth) (function)

Function: (setf tfifth) VALUE TLIST

Set the 5th object in a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tfifth (function)

Function: tfirst TLIST

Return the first element in a TCONS or TLIST.

Package

stmx.util

Source

tcons.lisp (file)

Setf Expander

(setf tfirst) (setf expander)

Setf Expander: (setf tfirst) CONS

Set VALUE as the first element in a TCONS or non-null TLIST.

This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons.lisp (file)

Reader

tfirst (function)

Function: tfourth TLIST

Return the 4th object in a TLIST or NIL if there is no 4th object.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tfourth) (function)

Function: (setf tfourth) VALUE TLIST

Set the 4th object in a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tfourth (function)

Function: tlast LIST &optional N

Return the last N conses (not the last element!) of a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Function: tlist &rest LIST

Create and return a new TLIST, whose cells are TCONS.

Package

stmx.util

Source

tcons.lisp (file)

Function: tlist* ARG0 &rest ARGS

Return a TLIST of the arguments with last TCONS a dotted pair.

Package

stmx.util

Source

tcons.lisp (file)

Function: tlist-length TLIST

Return the length of the given TLIST, or NIL if the TLIST is circular.

Package

stmx.util

Source

tcons-list.lisp (file)

Function: tninth TLIST

Return the 9th object in a TLIST or NIL if there is no 9th object.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tninth) (function)

Function: (setf tninth) VALUE TLIST

Set the 9th object in a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tninth (function)

Function: tnth N TLIST

Return the Nth object in a TLIST where the TCAR is the zero-th element.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tnth) (function)

Function: (setf tnth) NEWVAL N TLIST

Set the Nth element of TLIST to NEWVAL.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tnth (function)

Function: tnthcdr N TLIST

Performs the TCDR function N times on a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Function: tpairlis KEYS DATA &optional TALIST

Construct an association list from KEYS and DATA (adding to TALIST).

Package

stmx.util

Source

tcons-alist.lisp (file)

Function: transaction-abort ()

Voluntarily abort a hardware memory transaction
with an error-code equal to +transaction-user-abort+.

If a transaction is in progress, TRANSACTION-ABORT does not return normally: execution is resumed at the instruction immediately after the outermost TRANSACTION-BEGIN.

If called without an active transaction, TRANSACTION-ABORT returns normally with an implementation-dependent value.

Package

stmx.asm

Source

transaction.lisp (file)

Function: transaction-begin ()

Start a hardware memory transaction.
Return +transaction-started+ if transaction started successfully, otherwise return code of the error that caused the transaction to abort.

Invoking TRANSACTION-BEGIN while there is already a running hardware memory transaction has implementation-dependent effects.

Package

stmx.asm

Source

transaction.lisp (file)

Function: transaction-end ()

Commit a hardware memory transaction.
Return normally (with an implementation-dependent value) if commit is successful, otherwise abort the transaction.

In case the transaction is aborted, all effects of code between TRANSACTION-BEGIN and TRANSACTION-END are rolled back (undone):
execution resumes at the instruction immediately after TRANSACTION-BEGIN,
in such a way that TRANSACTION-BEGIN will appear to have returned
a non-zero error code (that describes the abort reason).

Invoking TRANSACTION-END without a running hardware memory transaction
has undefined consequences.

Package

stmx.asm

Source

transaction.lisp (file)

Function: transaction-rerun-may-succeed-p ERR-CODE

If ERR-CODE is the result returned by (TRANSACTION-BEGIN) of an *aborted* transaction, return T if re-running the same transaction has a possibility to succeed,
i.e. if the abort reason was temporary (as for example a conflict with another thread). Return NIL if re-running the same transaction has no possibility to succeed.

Package

stmx.asm

Source

transaction.lisp (file)

Function: transaction-running-p ()

Return T if a hardware memory transaction is currently in progress, otherwise return NIL.

Package

stmx.asm

Source

transaction.lisp (file)

Function: transaction-supported-p ()

Test for RTM, i.e. hardware memory transactions.
RTM is supported if (cpuid 7) returns ebx with bit 11 set.
If a processor does not support HLE, trying to execute
the new assembler instructions XBEGIN, XEND, XABORT and XTEST will generate faults.

As of June 2013, the only x86-64 CPUs supporting RTM are:
* Intel Core i5 4570
* Intel Core i5 4670
* Intel Core i7 4770
Beware: at the time of writing all the known K models, as for example Intel Core i7 4770K, do **NOT** support RTM.

Package

stmx.asm

Source

cpuid.lisp (file)

Function: transaction? ()

Return true if inside a software or hardware transaction.

Package

stmx

Source

classes.lisp (file)

Function: trassoc ITEM TALIST &key KEY TEST TEST-NOT

Return the cons in TALIST whose tcdr is equal (by a given test or EQL) to the ITEM.

Package

stmx.util

Source

tcons-alist.lisp (file)

Function: trest TLIST

Return the rest element in a TCONS or TLIST.

Package

stmx.util

Source

tcons.lisp (file)

Setf Expander

(setf trest) (setf expander)

Setf Expander: (setf trest) CONS

Set VALUE as the rest element in a TCONS or non-null TLIST.

This function should always be executed inside an STMX atomic block.

Package

stmx.util

Source

tcons.lisp (file)

Reader

trest (function)

Function: try-acquire-mutex MUTEX

Try to acquire MUTEX. Return T if successful, or NIL if MUTEX was already locked.

Package

stmx.lang

Source

mutex.lisp (file)

Function: tsecond TLIST

Return the 2nd object in a TLIST or NIL if there is no 2nd object.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tsecond) (function)

Function: (setf tsecond) VALUE TLIST

Set the 2nd object in a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tsecond (function)

Function: tseventh TLIST

Return the 7th object in a TLIST or NIL if there is no 7th object.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tseventh) (function)

Function: (setf tseventh) VALUE TLIST

Set the 7th object in a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tseventh (function)

Function: tsixth TLIST

Return the 6th object in a TLIST or NIL if there is no 6th object.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tsixth) (function)

Function: (setf tsixth) VALUE TLIST

Set the 6th object in a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tsixth (function)

Function: tstack ()

Create and return a new TSTACK.

Package

stmx.util

Source

tstack.lisp (file)

Function: tsvref TVEC INDEX

Return the INDEX-th element of simple-tvector TVEC. Works both inside and outside transactions

Package

stmx.util

Source

simple-tvector.lisp (file)

Setf Expander

(setf tsvref) (setf expander)

Setf Expander: (setf tsvref) TVEC INDEX VALUE
Package

stmx.util

Source

simple-tvector.lisp (file)

Reader

tsvref (function)

Writer

set-tsvref (function)

Function: ttenth TLIST

Return the 10th object in a TLIST or NIL if there is no 10th object.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf ttenth) (function)

Function: (setf ttenth) VALUE TLIST

Set the 10th object in a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

ttenth (function)

Function: tthird TLIST

Return the 3rd object in a TLIST or NIL if there is no 3rd object.

Package

stmx.util

Source

tcons-list.lisp (file)

Writer

(setf tthird) (function)

Function: (setf tthird) VALUE TLIST

Set the 3rd object in a TLIST.

Package

stmx.util

Source

tcons-list.lisp (file)

Reader

tthird (function)

Function: ttree-equal X Y &key TEST TEST-NOT

Return T if X and Y are isomorphic TLIST trees with identical leaves.

Package

stmx.util

Source

tcons-tree.lisp (file)

Function: ttree-equal-test X Y TEST
Package

stmx.util

Source

tcons-tree.lisp (file)

Function: ttree-equal-test-not X Y TEST-NOT
Package

stmx.util

Source

tcons-tree.lisp (file)

Function: tvar &optional VALUE
Package

stmx

Source

tvar.lisp (file)

Function: unbind-$ VAR

Unbind the value inside transactional variable VAR.
Works both outside and inside transactions.

During transactions, it uses transaction log to record the ’unbound’ value.

Package

stmx

Source

tvar-slot.lisp (file)

Function: wait4-thread TH
Package

stmx.lang

Source

thread.lisp (file)

Function: ~ OBJ
Function: (setf ~) VALUE OBJ
Package

stmx.lang

Source

print.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.6 Generic functions

Generic Function: empty! PLACE

Remove all values contained in PLACE. Return PLACE.

Package

stmx.util

Source

container.lisp (file)

Methods
Method: empty! (Q bheap)

Remove all values from bheap Q. Return Q.

Source

bheap.lisp (file)

Method: empty! (P tport)
Source

tchannel.lisp (file)

Method: empty! (F tfifo)
Source

tfifo.lisp (file)

Method: empty! (S tstack)
Source

tstack.lisp (file)

Method: empty! (CELL tcell)

Remove value from CELL. Return CELL.

Source

tcell.lisp (file)

Method: empty! (VAR tvar)

Remove value from tvar.

Source

tvar.lisp (file)

Generic Function: empty? PLACE

Return nil if PLACE contains at least one value, otherwise return t.

Package

stmx.util

Source

container.lisp (file)

Methods
Method: empty? (Q bheap)

Return t if bheap Q is empty.

Source

bheap.lisp (file)

Method: empty? (P tport)
Source

tchannel.lisp (file)

Method: empty? (C tchannel)

Tchannels are write-only: it is never possible to read values from them, so assume they are always empty and return t.

Source

tchannel.lisp (file)

Method: empty? (F tfifo)
Source

tfifo.lisp (file)

Method: empty? (S tstack)
Source

tstack.lisp (file)

Method: empty? (CELL tcell)
Source

tcell.lisp (file)

Method: empty? (VAR tvar)
Source

tvar.lisp (file)

Generic Function: full? PLACE

Return t if PLACE cannot contain more values, otherwise return nil.

Package

stmx.util

Source

container.lisp (file)

Methods
Method: full? (Q bheap)

A bheap is never full, so this method always returns nil.

Source

bheap.lisp (file)

Method: full? (P tport)

Tports are read-only: it is never possible to store values in them, so assume they are always full and return t.

Source

tchannel.lisp (file)

Method: full? (C tchannel)

Tchannels can contain unlimited values: they are never full, so always return nil.

Source

tchannel.lisp (file)

Method: full? (F tfifo)

A tfifo is never full, so this method always returns nil.

Source

tfifo.lisp (file)

Method: full? (S tstack)

A tstack is never full, so this method always returns nil.

Source

tstack.lisp (file)

Method: full? PLACE

Default implementation: assumes that PLACE can contain only one value.

Generic Function: id-of OBJ
Generic Function: (setf id-of) VALUE OBJ
Package

stmx.lang

Source

print.lisp (file)

Methods
Method: id-of (LOG tlog)
Source

classes.lisp (file)

Method: id-of (VAR tvar)
Source

tvar-fwd.lisp (file)

Method: id-of OBJ
Method: (setf id-of) VALUE OBJ
Generic Function: peek PLACE &optional DEFAULT

Return one value stored in PLACE without removing it, and t as multiple values. If PLACE contains no values, return (values DEFAULT nil).

Package

stmx.util

Source

container.lisp (file)

Methods
Method: peek (Q bheap) &optional DEFAULT

Return the first value in bheap Q without removing it, and t as multiple values. Return (values DEFAULT nil) if Q contains no values.

Source

bheap.lisp (file)

Method: peek (P tport) &optional DEFAULT

Return the first value in tport P without removing it, and t as multiple values. Return (values DEFAULT nil) if P contains no value.

Source

tchannel.lisp (file)

Method: peek (F tfifo) &optional DEFAULT

Return the first value in tfifo F without removing it, and t as multiple values. Return (values DEFAULT nil) if F contains no value.

Source

tfifo.lisp (file)

Method: peek (S tstack) &optional DEFAULT

Return the first value in tstack S without removing it, and t as multiple values. Return (values DEFAULT nil) if S contains no values.

Source

tstack.lisp (file)

Method: peek (CELL tcell) &optional DEFAULT
Source

tcell.lisp (file)

Method: peek (VAR tvar) &optional DEFAULT
Source

tvar.lisp (file)

Generic Function: put PLACE VALUE

Wait until PLACE can contain more values, then store VALUE in it and return VALUE.

Package

stmx.util

Source

container.lisp (file)

Methods
Method: put (Q bheap) VALUE

Store VALUE in bheap Q. Return VALUE.

Source

bheap.lisp (file)

Method: put (C tchannel) VALUE

Append VALUE as last element in tchannel C and return VALUE.
Since tchannel can contain unlimited values, this method never blocks.

Source

tchannel.lisp (file)

Method: put (F tfifo) VALUE

Append VALUE as last element in tfifo F and return VALUE.
Since tfifo can contain unlimited values, this method never blocks.

Source

tfifo.lisp (file)

Method: put (S tstack) VALUE

Insert VALUE as first element in tstack S and return VALUE. Since tstack can contain unlimited values, this method never blocks.

Source

tstack.lisp (file)

Method: put (CELL tcell) VALUE
Source

tcell.lisp (file)

Method: put (VAR tvar) VALUE
Source

tvar.lisp (file)

Generic Function: take PLACE

Wait until PLACE contains at least one value, then remove and return one value.

Package

stmx.util

Source

container.lisp (file)

Methods
Method: take (P tport)

Wait until tport P contains at least one value, then remove and return the first value.

Source

tchannel.lisp (file)

Method: take (F tfifo)

Wait until tfifo F contains at least one value, then remove and return the first value.

Source

tfifo.lisp (file)

Method: take (S tstack)

Wait until tstack S contains at least one value, then remove and return the first value.

Source

tstack.lisp (file)

Method: take (CELL tcell)
Source

tcell.lisp (file)

Method: take (VAR tvar)
Source

tvar.lisp (file)

Generic Function: try-put PLACE VALUE

If PLACE can contain more values, store VALUE it and return t and VALUE as multiple values. Otherwise return (values nil nil)

Package

stmx.util

Source

container.lisp (file)

Methods
Method: try-put (Q bheap) VALUE

Store VALUE in bheap Q. Return t and VALUE This method never fails.

Source

bheap.lisp (file)

Method: try-put (C tchannel) VALUE

Append VALUE to tchannel C and return (values t VALUE).
Since tchannel can contain unlimited values, this method never fails.

Source

tchannel.lisp (file)

Method: try-put (F tfifo) VALUE

Append VALUE as last element in tfifo F and return (values t VALUE). Since tfifo can contain unlimited values, this method never fails.

Source

tfifo.lisp (file)

Method: try-put (S tstack) VALUE

Append VALUE to tstack S and return (values t VALUE).
Since fifo can contain unlimited values, this method never fails.

Source

tstack.lisp (file)

Method: try-put (CELL tcell) VALUE

hand-made, nonblocking version of (put place) for tcells. less general but approx. 3 times faster (on SBCL 1.0.57.0.debian, Linux amd64) than the unspecialized (try-put place) which calls (atomic (nonblocking (put place value)))

Source

tcell.lisp (file)

Method: try-put (VAR tvar) VALUE

hand-made, nonblocking version of (put place) for TVARs.
Less general but approx. 3 times faster (on SBCL 1.0.57.0.debian, Linux amd64) than the unspecialized (try-put place) which calls (atomic (nonblocking (put place value)))

Source

tvar.lisp (file)

Method: try-put PLACE VALUE

this method shows a general technique to convert a blocking, atomic operation into a nonblocking, atomic one: simply wrap it in (atomic (nonblocking ...))

Generic Function: try-take PLACE

If PLACE contains at least one value, remove one value and return t and it as multiple values. Otherwise return (values nil nil)

Package

stmx.util

Source

container.lisp (file)

Methods
Method: try-take (Q bheap)

If bheap S contains at least one value, remove the first value and return t and the first value as multiple values. Otherwise return (values nil nil)

Source

bheap.lisp (file)

Method: try-take (P tport)

If tport P contains at least one value, remove the first value and return t and the first value as multiple values. Otherwise return (values nil nil)

Source

tchannel.lisp (file)

Method: try-take (F tfifo)

If tfifo F contains at least one value, remove the first value and return t and the first value as multiple values. Otherwise return (values nil nil)

Source

tfifo.lisp (file)

Method: try-take (S tstack)

If tstack S contains at least one value, remove the first value and return t and the first value as multiple values. Otherwise return (values nil nil)

Source

tstack.lisp (file)

Method: try-take (CELL tcell)

hand-made, nonblocking version of (take place) for cells. less general but approx. 3 times faster (on SBCL 1.0.57.0.debian, Linux amd64) than the unspecialized (try-take place) which calls (atomic (nonblocking (take place)))

Source

tcell.lisp (file)

Method: try-take (VAR tvar)

hand-made, nonblocking version of (take place) for TVARs. Less general but approx. 3 times faster (on SBCL 1.0.57.0.debian, Linux amd64) than the unspecialized (try-take place) which calls (atomic (nonblocking (take place)))

Source

tvar.lisp (file)

Method: try-take PLACE

this method shows a general technique to convert a blocking, atomic operation into a nonblocking, atomic one: simply wrap it in (atomic (nonblocking ...))


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.7 Structures

Structure: atomic-counter ()
Package

stmx.lang

Source

atomic-counter.lisp (file)

Direct superclasses

structure-object (structure)

Direct subclasses

gv156 (structure)

Direct slots
Slot: version
Type

stmx.lang:atomic-counter-slot-type

Initform

0

Readers

atomic-counter-version (function)

Writers

(setf atomic-counter-version) (function)

Structure: fast-vector ()
Package

stmx.lang

Source

fast-vector.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: len
Type

fixnum

Initform

0

Readers

fast-vector-len (function)

Writers

(setf fast-vector-len) (function)

Slot: vec
Type

simple-vector

Initform

stmx.lang::+empty-vector+

Readers

fast-vector-vec (function)

Writers

(setf fast-vector-vec) (function)

Slot: initial-element
Initform

0

Readers

fast-vector-initial-element (function)

Writers

(setf fast-vector-initial-element) (function)

Structure: mutex ()
Package

stmx.lang

Source

mutex.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: mutex-owner
Type

stmx.lang::atomic-t

Readers

mutex-owner (function)

Writers

(setf mutex-owner) (function)

Structure: tcons ()

Transactional cell holding two values. It is the STM equivalent of CONS cells.
To use TCONS cells, prepend T to the name of most list-manipulating functions. Examples: (CONS a b) -> (TCONS a b)
(LIST ...) -> (TLIST ...)
(FIRST c) -> (TFIRST c)
(REST c) -> (TREST c) and so on

Package

stmx.util

Source

tcons.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

print-object (method)

Direct slots
Slot: first
Type

(stmx:transactional t)

Initform

(stmx::tstruct-slot-initialize (quote stmx.util:tcons) (quote first) (quote nil))

Readers

%stmx-impl/tstruct/tcons-first (function)

Writers

(setf %stmx-impl/tstruct/tcons-first) (function)

Slot: rest
Type

(stmx:transactional t)

Initform

(stmx::tstruct-slot-initialize (quote stmx.util:tcons) (quote rest) (quote nil))

Readers

%stmx-impl/tstruct/tcons-rest (function)

Writers

(setf %stmx-impl/tstruct/tcons-rest) (function)

Structure: tvar ()

a transactional variable (tvar) is the smallest unit of transactional memory. it contains a single value that can be read or written during a transaction using ($-slot var) and (setf ($-slot var) value).

tvars are seldom used directly, since transactional objects (tobjs) wrap them with a more convenient interface: you can read and write normally the slots of a transactional object (with slot-value, accessors ...), and behind
the scenes the slots will be stored in transactional memory implemented by tvars.

Package

stmx

Source

tvar-fwd.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: version
Type

stmx::version-type

Initform

stmx::+invalid-version+

Readers

tvar-version (function)

Writers

(setf tvar-version) (function)

Slot: value
Initform

stmx:+unbound-tvar+

Readers

tvar-value (function)

Writers

(setf tvar-value) (function)

Slot: id
Type

fixnum

Initform

stmx::+invalid-version+

Readers

tvar-id (function)

Writers

(setf tvar-id) (function)

Slot: waiting-for
Type

(or null hash-table)

Readers

tvar-waiting-for (function)

Writers

(setf tvar-waiting-for) (function)

Slot: waiting-lock
Initform

(bordeaux-threads:make-lock "tvar-waiting")

Readers

tvar-waiting-lock (function)

Writers

(setf tvar-waiting-lock) (function)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.8 Classes

Class: ghash-table ()

Generic hash-table. Allows custom :test argument at creation - default is ’eql. If :test is not one of ’eq ’eql or ’equal, also requires explicit :hash argument at creation.

Not so useful by itself (standard CL:HASH-TABLE is usually faster),
it is the base for transactional hash-table implementation THASH-TABLE.

Package

stmx.util

Source

ghash-table.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

thash-table (class)

Direct methods
Direct slots
Slot: vec
Type

(or stmx.util::ghash-vector stmx:tvar)

Slot: test-fun
Type

stmx.util::ghash-test-fun

Slot: hash-fun
Type

stmx.util::ghash-hash-fun

Slot: aref-fun
Type

stmx.util::ghash-aref-fun

Initform

(function svref)

Slot: set-aref-fun
Type

stmx.util::ghash-set-aref-fun

Initform

(function stmx.util::set-svref)

Slot: count
Type

(or null fixnum stmx:tvar)

Initform

0

Slot: test-sym
Type

symbol

Initargs

:test

Initform

(quote eql)

Slot: hash-sym
Type

symbol

Initargs

:hash

Class: gmap ()

Generic binary tree

Package

stmx.util

Source

gmap.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

rbmap (class)

Direct methods
Direct slots
Slot: root
Type

(or null stmx.util::gmap-node stmx:tvar)

Slot: pred-func
Type

function

Readers

pred-function-of (generic function)

Slot: count
Type

(or null fixnum stmx:tvar)

Initform

0

Readers

count-of (generic function)

Slot: pred-sym
Type

symbol

Initargs

:pred

Readers

pred-of (generic function)

Class: rbmap ()

Red-black tree implementation of sorted binary map

Package

stmx.util

Source

rbmap.lisp (file)

Direct superclasses

gmap (class)

Direct subclasses

tmap (class)

Direct methods
Class: tcell ()
Package

stmx.util

Source

tcell.lisp (file)

Direct superclasses

transactional-object (class)

Direct methods
Direct slots
Slot: value
Initargs

:value

Initform

stmx.util::+empty-tcell+

Class: tchannel ()

Transactional multicast channel supporting unlimited reading ports.
Values written into the tchannel are available to all reading ports in the same order.

References to values written into the tchannel are kept only as long as
one or more ports still need to read them.

Package

stmx.util

Source

tchannel.lisp (file)

Direct superclasses

transactional-object (class)

Direct methods
Direct slots
Slot: back
Type

(or stmx.util:tcons stmx:tvar)

Initform

(stmx.util:tcons nil nil)

Readers

back-of (generic function)

Writers

(setf back-of) (generic function)

Class: tfifo ()
Package

stmx.util

Source

tfifo.lisp (file)

Direct superclasses

transactional-object (class)

Direct methods
Direct slots
Slot: front
Type

(or stmx.util:tcons stmx:tvar)

Readers

front-of (generic function)

Writers

(setf front-of) (generic function)

Slot: back
Type

(or stmx.util:tcons stmx:tvar)

Readers

back-of (generic function)

Writers

(setf back-of) (generic function)

Class: thash-table ()

Transactional hash table.

Package

stmx.util

Source

thash-table.lisp (file)

Direct superclasses
Direct methods
Direct slots
Slot: vec
Slot: count
Class: tmap ()

Transactional sorted map, implemented with red-black tree

Package

stmx.util

Source

tmap.lisp (file)

Direct superclasses
Direct methods
Direct slots
Slot: root
Type

(or (or null stmx.util::tnode) stmx:tvar)

Slot: count
Slot: foo
Class: tport ()

Transactional reading port for a multicast tchannel.
Values written into the tchannel are available to all reading ports in the same order.

Package

stmx.util

Source

tchannel.lisp (file)

Direct superclasses

transactional-object (class)

Direct methods
Direct slots
Slot: front
Type

(or cons stmx:tvar)

Readers

front-of (generic function)

Writers

(setf front-of) (generic function)

Slot: channel
Type

stmx.util:tchannel

Initargs

:channel

Initform

(error "missing :channel argument instantiating ~a or a subclass" (quote stmx.util:tport))

Readers

channel-of (generic function)

Class: transactional-class ()

The metaclass for transactional classes.

Classes defined with this metaclass have extra slot options, see the class TRANSACTIONAL-DIRECT-SLOT for details.

Package

stmx

Source

tclass.lisp (file)

Direct superclasses

standard-class (class)

Direct methods
  • slot-makunbound-using-class (method)
  • slot-boundp-using-class (method)
  • slot-value-using-class (method)
  • slot-value-using-class (method)
  • compute-effective-slot-definition (method)
  • effective-slot-definition-class (method)
  • direct-slot-definition-class (method)
  • validate-superclass (method)
Class: transactional-object ()

Superclass of all transactional objects.

Package

stmx

Source

tclass.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods

update-instance-for-redefined-class (method)

Class: tstack ()
Package

stmx.util

Source

tstack.lisp (file)

Direct superclasses

transactional-object (class)

Direct methods
Direct slots
Slot: top
Type

(or list stmx:tvar)

Initargs

stmx.util::top

Readers

top-of (generic function)

Writers

(setf top-of) (generic function)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.9 Types

Type: atomic-counter-num ()
Package

stmx.lang

Source

atomic-counter.lisp (file)

Type: atomic-counter-slot-type ()
Package

stmx.lang

Source

atomic-counter.lisp (file)

Type: atomic-num ()

ATOMIC-NUM must be a type suitable for ATOMIC-INCF and ATOMIC-DECF. STMX also assumes it is the same or wider than fixnum.

Package

stmx.lang

Source

atomic-ops.lisp (file)

Type: simple-tvector &optional LENGTH

SIMPLE-TVECTOR is a transactional, one dimensional array. It is currently a deftype, not a class or struct: methods cannot be specialized on it.

Package

stmx.util

Source

simple-tvector.lisp (file)

Type: tlist ()
Package

stmx.util

Source

tcons.lisp (file)

Type: transactional TYPE

Transactional memory containing TYPE

Package

stmx

Source

tvar-fwd.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Constants

Constant: +black+
Package

stmx.util

Source

rbmap.lisp (file)

Constant: +defknown-has-overwrite-fndb-silently+
Package

stmx.asm

Source

compiler.lisp (file)

Constant: +empty-tcell+

Empty TCELL objects actually contain this symbol in their VALUE slot. Use with care.

Package

stmx.util

Source

tcell.lisp (file)

Constant: +ghash-default-capacity+

Default initial capacity of a GHASH-TABLE.

Package

stmx.util

Source

ghash-table.lisp (file)

Constant: +ghash-max-capacity+

Maximum capacity of a GHASH-TABLE.
Equal to MOST-POSITIVE-FIXNUM rounded down to nearest power of 2.

Package

stmx.util

Source

ghash-table.lisp (file)

Constant: +ghash-threshold-capacity+
Package

stmx.util

Source

ghash-table.lisp (file)

Constant: +global-clock-delta+

+global-clock+ VERSION is incremented by 2 each time: the lowest bit is reserved as "locked" flag in TVARs versioning - used if TVAR-LOCK feature is equal to :BIT.

Package

stmx

Source

global-clock.lisp (file)

Constant: +global-clock-nohw-delta+

+global-clock+ NOHW-COUNTER incremented by 2 each time: the lowest bit is reserved as "prevent HW transactions"

Package

stmx

Source

global-clock.lisp (file)

Constant: +gv+
Package

stmx

Source

global-clock.lisp (file)

Constant: +gv-max-stat+
Package

stmx

Source

global-clock.lisp (file)

Constant: +hw-atomic-max-attempts+
Package

stmx

Source

hw-atomic.lisp (file)

Constant: +invalid-version+
Package

stmx

Source

tvar-fwd.lisp (file)

Constant: +red+
Package

stmx.util

Source

rbmap.lisp (file)

Constant: +txhash-default-capacity+
Package

stmx

Source

classes.lisp (file)

Constant: +txhash-threshold-capacity+
Package

stmx

Source

txhash.lisp (file)

Constant: k<
Package

stmx.util

Source

misc.lisp (file)

Constant: k=
Package

stmx.util

Source

misc.lisp (file)

Constant: k>
Package

stmx.util

Source

misc.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Special variables

Special Variable: *cons-pool*
Package

stmx.lang

Source

cons.lisp (file)

Special Variable: *empty-vector*
Package

stmx.util

Source

bheap.lisp (file)

Special Variable: *feature-list*
Package

stmx.lang

Source

features.lisp (file)

Special Variable: *hide-tvars*

A boolean controlling the behaviour of the function (slot-value)
and of slot accessors for TOBJs slots:
- if false, (slot-value) and accessors will get or set the actual TVAR stored inside the slot.
- if true, (slot-value) and accessors will get or set the value stored inside the slot’s TVAR.

This flag is almost always true; it is temporarily set to false during some MOP calls (slot-value-using-class ...) that implement access to TOBJs slots.

Package

stmx

Source

classes.lisp (file)

Special Variable: *hw-tlog-write-version*
Package

stmx

Source

classes.lisp (file)

Special Variable: *lv*
Package

stmx

Source

global-clock.lisp (file)

Special Variable: *optimized-funs*
Package

stmx

Source

optimize-for.lisp (file)

Special Variable: *print-ids*
Package

stmx.lang

Source

print.lisp (file)

Special Variable: *record-to-tlogs*

A flag indicating if transactions are being recorded to TLOGs or not.

Recording is normally enabled during transactions,
while it is normally disabled in these cases:
- outside transactions
- when initializing TOBJs slots
- during some MOP calls (slot-value-using-class etc.) that implement access to TOBJs slots.

Package

stmx

Source

classes.lisp (file)

Special Variable: *recursive-call-compute-effective-slot-definition*
Package

stmx

Source

tclass.lisp (file)

Special Variable: *recursive-call-list-classes-containing-direct-slots*
Package

stmx

Source

tclass.lisp (file)

Special Variable: *tlog*

The current transaction log.

Package

stmx

Source

classes.lisp (file)

Special Variable: *tlog-pool*
Package

stmx

Source

tlog.lisp (file)

Special Variable: *tvar-id*
Package

stmx

Source

tvar-fwd.lisp (file)

Special Variable: +dummy-tvar+
Package

stmx

Source

txhash.lisp (file)

Special Variable: +empty-vector+
Package

stmx.lang

Source

fast-vector.lisp (file)

Special Variable: +it+
Package

stmx.lang

Source

macro.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Macros

Macro: %copy-tlist-consing LIST-OR-TLIST &key CAR CDR CONSP
Package

stmx.util

Source

tcons-list.lisp (file)

Macro: %copy-tlist-setf-tvar LIST-OR-TLIST &key CAR CDR CONSP
Package

stmx.util

Source

tcons-list.lisp (file)

Macro: %gv-expand NAME &rest ARGS
Package

stmx

Source

global-clock.lisp (file)

Macro: %gv-nohw-flag ()
Package

stmx

Source

global-clock.lisp (file)

Macro: %gvx-expand GVX NAME &rest ARGS
Package

stmx

Source

global-clock.lisp (file)

Macro: %hw-atomic2 (&key HW-WRITE-VERSION ERR TEST-FOR-RUNNING-TX? UPDATE-STAT) BODY FALLBACK

Run BODY in a hardware memory transaction.
If the transaction aborts, retry it as long as it has chances to succeed. If it has no chances to succeed, execute FALLBACK.
Warning: if a transaction is already running, execute BODY inside it

Package

stmx

Source

hw-atomic.lisp (file)

Macro: %sxhash-equalp X
Package

stmx.util

Source

misc.lisp (file)

Macro: %t-assoc ITEM TALIST KEY TEST TEST-NOT TCAR
Package

stmx.util

Source

tcons-alist.lisp (file)

Macro: %tappend-consing LISTS &key DO-OUTER-LIST DO-INNER-LIST
Package

stmx.util

Source

tcons-list.lisp (file)

Macro: %tappend-setf-tvar LISTS &key DO-OUTER-LIST DO-INNER-LIST
Package

stmx.util

Source

tcons-list.lisp (file)

Macro: %tassoc ITEM TALIST KEY TEST TEST-NOT
Package

stmx.util

Source

tcons-alist.lisp (file)

Macro: %tlist-get TLIST OP &rest NEXT-OPS
Package

stmx.util

Source

tcons-list.lisp (file)

Macro: %tlist-set VALUE TCONS OP &rest NEXT-OPS
Package

stmx.util

Source

tcons-list.lisp (file)

Macro: %trassoc ITEM TALIST KEY TEST TEST-NOT
Package

stmx.util

Source

tcons-alist.lisp (file)

Macro: _ OBJ SLOT
Package

stmx.util

Source

misc.lisp (file)

Macro: atomic-push OBJ PLACE

Like PUSH, but atomic. PLACE may be read multiple times before the operation completes – the write does not occur until such time that no other thread modified PLACE between the read and the write.

Works only on places supported by COMPARE-AND-SWAP.

Package

stmx.lang

Source

atomic-ops.lisp (file)

Macro: compile-cerror CONT-STRING FORMAT &rest ARGS
Package

stmx

Source

classes.lisp (file)

Macro: compile-error FORMAT &rest ARGS
Package

stmx

Source

classes.lisp (file)

Macro: compile-log-warn &rest ARGS
Package

stmx.lang

Source

thread.lisp (file)

Macro: current-tlog ()

Return the current software transaction log

Package

stmx

Source

classes.lisp (file)

Macro: define-method-initialize-instance CLASS-NAME DIRECT-SLOT-FORMS
Package

stmx

Source

tclass.lisp (file)

Macro: define-tstruct-slot-accessor READER WRITER ACCESSOR-IMPL &key TYPE STRUCT-TYPE READ-ONLY TX INSTANCE VALUE
Package

stmx

Source

tstruct.lisp (file)

Macro: defknown &rest ARGS
Package

stmx.asm

Source

compiler.lisp (file)

Macro: do-class-transactional-direct-slots (SLOT CLASS) &body BODY

Execute BODY on every transactional direct slot (not inherited) of CLASS.

Package

stmx

Source

tclass.lisp (file)

Macro: do-class-transactional-effective-slots (SLOT CLASS) &body BODY

Execute BODY on every transactional slot (direct or inherited) of CLASS.

Package

stmx

Source

tclass.lisp (file)

Macro: do-filter-txfifo (KEY &optional VALUE) FIFO &body BODY

Execute BODY on each KEY/VALUE contained in FIFO. Return NIL.

Package

stmx

Source

txhash.lisp (file)

Macro: do-filter-txfifo-entries (PAIR) FIFO &body BODY

Execute BODY on each TXPAIR contained in FIFO. Return NIL.

Package

stmx

Source

txhash.lisp (file)

Macro: do-ghash-pairs (PAIR &optional INDEX) HASH &body BODY

Execute BODY on each GHASH-PAIR pair contained in HASH. Return NIL.

Package

stmx.util

Source

ghash-table.lisp (file)

Macro: do-gmap* (&key KEY VALUE INDEX FROM-END) M &body BODY

Execute BODY in order on each key/value pair contained in M:
first execute it on the smallest key, then the second smallest... finally execute BODY on the largest key. Return nil.

If :FROM-END is true, BODY will be executed first on the largest key, then on the second largest key... and finally on the smallest key.

Adding or removing keys from M during this call (even from other threads) has undefined consequences. Not even the current key can be removed.

Package

stmx.util

Source

gmap.lisp (file)

Macro: do-loop-tstruct-defs (STRUCT-DEF-VAR STRUCT-DEF) &body BODY

Execute BODY inside a loop, iterating on tstruct-def STRUCT-DEF and all its superclasses

Package

stmx

Source

tstruct.lisp (file)

Macro: do-tlist (VAR TLIST &optional RESULT) &body BODY

Analogous to DOLIST, iterates on transactional list TLIST.
On each iteration, sets VAR to the element and executes BODY inside a tagbody. Returns RESULT. Note: when RESULT is executed, VAR is set to NIL.

An implicit block named NIL surrounds DO-TLIST, so RETURN can be used
to terminate immediately the iterations and return zero or more values.

Package

stmx.util

Source

tcons.lisp (file)

Macro: do-tstruct-defs (STRUCT-DEF-VAR STRUCT-DEF) &body BODY

Execute BODY on tstruct-def STRUCT-DEF and all its superclasses

Package

stmx

Source

tstruct.lisp (file)

Macro: do-txfifo (KEY &optional VALUE) FIFO &body BODY

Execute BODY on each KEY/VALUE contained in FIFO. Return NIL.

Package

stmx

Source

txhash.lisp (file)

Macro: do-txfifo-entries (PAIR) FIFO &body BODY

Execute BODY on each TXPAIR contained in FIFO. Return NIL.

Package

stmx

Source

txhash.lisp (file)

Macro: do-txhash (KEY &optional VALUE) HASH &body BODY

Execute BODY on each KEY/VALUE contained in HASH. Return NIL.

Package

stmx

Source

txhash.lisp (file)

Macro: do-txhash-entries (PAIR) HASH &body BODY

Execute BODY on each TXPAIR pair contained in HASH. Return NIL.

Package

stmx

Source

txhash.lisp (file)

Macro: fast-sw-atomic &rest BODY
Package

stmx

Source

sw-atomic.lisp (file)

Macro: global-clock/decf-nohw-counter ()

Decrement by one the number of software-only transaction commits currently running.

This function must be called at the end of each software-only transaction commit, (retry), or any other operation incompatible with hardware transactions, in order to let the latter run, since their current implementations are mutually incompatible.

Package

stmx

Source

global-clock.lisp (file)

Macro: global-clock/features ()

Return the features of the GLOBAL-CLOCK algorithm, i.e. a list containing zero or more of :SUITABLE-FOR-HW-TRANSACTIONS and :SPURIOUS-FAILURES-IN-SINGLE-THREAD. The list of possible features will be expanded as more GLOBAL-CLOCK algorithms are implemented.

Package

stmx

Source

global-clock.lisp (file)

Macro: global-clock/get-nohw-counter ()

Return the number of operations currently running that are incompatible with hardware transactions. Example of operations that AT THE MOMENT are incompatible with hardware transactions include:
1) software-only transaction commits
2) (retry)

This function must be called at the beginning of each hardware transaction
in order to detect if an incompatible operation is started during the hardware transaction, and abort the transaction in such case.

Package

stmx

Source

global-clock.lisp (file)

Macro: global-clock/hw/after-abort ()

Return the value to use as new transaction "read version",

This function must be called after a hardware transaction failed/aborted and before rerunning it.

Package

stmx

Source

global-clock.lisp (file)

Macro: global-clock/hw/start-read ()

Return the value to use as hardware transaction "read version".

This function must be invoked once upon starting a hardware transaction for the first time. In case the transaction just aborted and is being re-executed, invoke instead (GLOBAL-CLOCK/HW/AFTER-ABORT).

Package

stmx

Source

global-clock.lisp (file)

Macro: global-clock/hw/start-write READ-VERSION

Return the value to use as hardware transaction "write version",
given the transaction current READ-VERSION that was assigned at transaction start.

During hardware transactions - and also during hardware-based commits of software transactions - this function must be called once before writing the first TVAR.

Package

stmx

Source

global-clock.lisp (file)

Macro: global-clock/hw/stat-aborted ()
Package

stmx

Source

global-clock.lisp (file)

Macro: global-clock/hw/stat-committed ()
Package

stmx

Source

global-clock.lisp (file)

Macro: global-clock/hw/write WRITE-VERSION

Return the value to use as TVAR "write version", given the hardware transaction current WRITE-VERSION that was assigned by GLOBAL-CLOCK/HW/START-WRITE before the transaction started writing to TVARs.

This function must be called for **each** TVAR being written during hardware-assisted commit phase of software transactions
and during pure hardware transactions.

Package

stmx

Source

global-clock.lisp (file)

Macro: global-clock/incf-nohw-counter ()

Increment by one the number of operations currently running that are incompatible with hardware transactions.

This function must be called at the beginning of each software-only transaction commit, (retry), or any other operation incompatible with hardware transactions, in order to abort the latter, since their current implementations are mutually incompatible.

Package

stmx

Source

global-clock.lisp (file)

Macro: global-clock/sw/after-abort ()

Return the value to use as new transaction "read version",

This function must be called after a software transaction failed/aborted and before rerunning it.

Package

stmx

Source

global-clock.lisp (file)

Macro: global-clock/sw/start-read ()

Return the value to use as software transaction "read version".

This function must be invoked once upon starting a software transaction for the first time. In case the transaction just aborted and is being re-executed, invoke instead (GLOBAL-CLOCK/SW/AFTER-ABORT).

Package

stmx

Source

global-clock.lisp (file)

Macro: global-clock/sw/start-write READ-VERSION

Return the value to use as softarw transaction "write version", given the software transaction current READ-VERSION that was assigned at transaction start.

During software-only commits, this function must be called once before committing the first TVAR write.

Package

stmx

Source

global-clock.lisp (file)

Macro: global-clock/sw/stat-aborted ()
Package

stmx

Source

global-clock.lisp (file)

Macro: global-clock/sw/stat-committed ()
Package

stmx

Source

global-clock.lisp (file)

Macro: global-clock/sw/write WRITE-VERSION

Return the value to use as TVAR "write version", given the software transaction current WRITE-VERSION that was assigned by GLOBAL-CLOCK/SW/START-WRITE before the transaction started writing to TVARs.

Fhis function must be called for **each** TVAR being written
during software-only commit phase of software transactions.

Package

stmx

Source

global-clock.lisp (file)

Macro: global-clock/valid-read? TVAR-VERSION READ-VERSION

Return T if TVAR-VERSION is compatible with transaction "read version". If this function returns NIL, the transaction must be aborted.

During software transactions, this function must be invoked after every TVAR read and before returning the TVAR value to the application code. During hardware transactions, this function is not used.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/after-abort ()

This is GV1 implementation of GLOBAL-CLOCK/AFTER-ABORT. Return the current +gv+ value.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/decf-nohw-counter ()

This is GV1 implementation of GV1/DECF-NOHW-COUNTER. It does nothing and returns zero.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/features ()

This is GV1 implementation of GLOBAL-CLOCK/FEATURES.

Return nil, i.e. not ’(:suitable-for-hw-transactions) because (GV1/START-WRITE ...) increments the global clock, which causes conflicts and aborts when multiple hardware transactions are running simultaneously.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/get-nohw-counter ()

This is GV1 implementation of GV1/GET-NOHW-COUNTER. It does nothing and returns zero.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/hw/after-abort ()

This is GV1 implementation of GLOBAL-CLOCK/HW/AFTER-ABORT. Calls GV1/AFTER-ABORT.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/hw/start-read ()

This is GV1 implementation of GLOBAL-CLOCK/HW/START-READ. Calls GV1/START-READ.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/hw/start-write WRITE-VERSION

This is GV1 implementation of GLOBAL-CLOCK/HW/START-WRITE. Calls GV1/START-WRITE.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/hw/stat-aborted ()

This is GV1 implementation of GLOBAL-CLOCK/HW/STAT-ABORTED. Calls GV1/STAT-ABORTED.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/hw/stat-committed ()

This is GV1 implementation of GLOBAL-CLOCK/HW/STAT-COMMITTED. Calls GV1/STAT-COMMITTED.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/hw/write WRITE-VERSION

This is GV1 implementation of GLOBAL-CLOCK/HW/WRITE. Calls GV1/WRITE.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/incf-nohw-counter ()

This is GV1 implementation of GV1/INCF-NOHW-COUNTER. It does nothing and returns zero.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/start-read ()

This is GV1 implementation of GLOBAL-CLOCK/START-READ. Return the current +gv+ value.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/start-write READ-VERSION

This is GV1 implementation of GLOBAL-CLOCK/START-WRITE. Atomically increment +gv+ and return its new value.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/stat-aborted ()

This is GV1 implementation of GV1/STAT-ABORTED. It does nothing and returns zero.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/stat-committed ()

This is GV1 implementation of GV1/STAT-COMMITTED. It does nothing and returns zero.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/sw/after-abort ()

This is GV1 implementation of GLOBAL-CLOCK/SW/AFTER-ABORT. Calls GV1/AFTER-ABORT.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/sw/start-read ()

This is GV1 implementation of GLOBAL-CLOCK/SW/START-READ. Calls GV1/START-READ.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/sw/start-write WRITE-VERSION

This is GV1 implementation of GLOBAL-CLOCK/SW/START-WRITE. Calls GV1/START-WRITE.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/sw/stat-aborted ()

This is GV1 implementation of GLOBAL-CLOCK/SW/STAT-ABORTED. Calls GV1/STAT-ABORTED.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/sw/stat-committed ()

This is GV1 implementation of GLOBAL-CLOCK/SW/STAT-COMMITTED. Calls GV1/STAT-COMMITTED.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/sw/write WRITE-VERSION

This is GV1 implementation of GLOBAL-CLOCK/SW/WRITE. Calls GV1/WRITE.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/valid-read? TVAR-VERSION READ-VERSION

This is GV1 implementation of GLOBAL-CLOCK/VALID-READ? Return (<= tvar-version read-version)

Package

stmx

Source

global-clock.lisp (file)

Macro: gv1/write WRITE-VERSION

This is GV1 implementation of GLOBAL-CLOCK/WRITE. Return WRITE-VERSION.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/after-abort ()

This is GV5 implementation of GLOBAL-CLOCK/AFTER-ABORT. Increment +gv+ and return its new value.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/decf-nohw-counter &optional DELTA

This is GV5 implementation of GLOBAL-CLOCK/DECF-NOHW-COUNTER. Decrement by DELTA the slot NOHW-COUNTER of +gv+ and return its new value.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/features ()

This is GV5 implementation of GLOBAL-CLOCK/FEATURES.

Return ’(:SUITABLE-FOR-HW-TRANSACTIONS :SPURIOUS-FAILURES-IN-SINGLE-THREAD) because the global clock is incremented only by GV5/AFTER-ABORT, which avoids incrementing it in GV5/START-WRITE (it would cause hardware transactions
to conflict with each other and abort) but also causes a 50% abort rate (!) even in a single, isolated thread reading and writing its own transactional memory.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/get-nohw-counter ()

This is GV5 implementation of GLOBAL-CLOCK/GET-NOHW-COUNTER.
Return the number of software-only transaction commits currently running.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/hw/after-abort ()

This is GV5 implementation of GLOBAL-CLOCK/HW/AFTER-ABORT. Calls GV5/AFTER-ABORT.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/hw/start-read ()

This is GV5 implementation of GLOBAL-CLOCK/HW/START-READ. Calls GV5/START-READ.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/hw/start-write WRITE-VERSION

This is GV5 implementation of GLOBAL-CLOCK/HW/START-WRITE. Calls GV5/START-WRITE.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/hw/stat-aborted ()

This is GV5 implementation of GLOBAL-CLOCK/HW/STAT-ABORTED. Calls GV5/STAT-ABORTED.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/hw/stat-committed ()

This is GV5 implementation of GLOBAL-CLOCK/HW/STAT-COMMITTED. Calls GV5/STAT-COMMITTED.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/hw/write WRITE-VERSION

This is GV5 implementation of GLOBAL-CLOCK/HW/WRITE. Calls GV5/WRITE.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/incf-nohw-counter &optional DELTA

This is GV5 implementation of GLOBAL-CLOCK/INCF-NOHW-COUNTER. Increment by DELTA the slot NOHW-COUNTER of +gv+ and return its new value.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/start-read ()

This is GV5 implementation of GLOBAL-CLOCK/START-READ. Return the current +gv+ value.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/start-write READ-VERSION

This is GV5 implementation of GLOBAL-CLOCK/START-WRITE. Return (1+ +gv+) without incrementing it.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/stat-aborted ()

This is GV5 implementation of GV5/STAT-ABORTED. It does nothing and returns zero.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/stat-committed ()

This is GV5 implementation of GV5/STAT-COMMITTED. It does nothing and returns zero.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/sw/after-abort ()

This is GV5 implementation of GLOBAL-CLOCK/SW/AFTER-ABORT. Calls GV5/AFTER-ABORT.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/sw/start-read ()

This is GV5 implementation of GLOBAL-CLOCK/SW/START-READ. Calls GV5/START-READ.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/sw/start-write WRITE-VERSION

This is GV5 implementation of GLOBAL-CLOCK/SW/START-WRITE. Calls GV5/START-WRITE.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/sw/stat-aborted ()

This is GV5 implementation of GLOBAL-CLOCK/SW/STAT-ABORTED. Calls GV5/STAT-ABORTED.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/sw/stat-committed ()

This is GV5 implementation of GLOBAL-CLOCK/SW/STAT-COMMITTED. Calls GV5/STAT-COMMITTED.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/sw/write WRITE-VERSION

This is GV5 implementation of GLOBAL-CLOCK/SW/WRITE. Calls GV5/WRITE.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/valid-read? TVAR-VERSION READ-VERSION

This is GV5 implementation of GLOBAL-CLOCK/VALID-READ? Return (<= tvar-version read-version)

Package

stmx

Source

global-clock.lisp (file)

Macro: gv5/write WRITE-VERSION

This is GV5 implementation of GLOBAL-CLOCK/{HW,SW}/WRITE. Return WRITE-VERSION.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/%is-gv5-mode? ()

Return T if GV6 is currently in GV5 mode, i.e. it allows HW transactions. Return NIL if GV6 is currently in GV1 mode, i.e. it forbids HW transactions.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/%update-lv-stat WHICH &optional DELTA
Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/decf-nohw-counter &optional DELTA

This is GV6 implementation of GLOBAL-CLOCK/DECF-NOHW-COUNTER. Calls (GV5/DECF-NOHW-COUNTER).

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/features ()

This is GV6 implementation of GLOBAL-CLOCK/FEATURES.

Return ’(:SUITABLE-FOR-HW-TRANSACTIONS :SPURIOUS-FAILURES-IN-SINGLE-THREAD) just like GV5 because the global clock is based on GV5: it is usually not incremented by GV6/START-WRITE, to prevent hardware transactions from conflicting with each other.
This can cause very high abort rates of software transactions, so
GV6 adaptively switches to GV1 algorithm in the following cases:
a) software-only commits are in progress
b) abort rate is very high
in order to try to reduce the abort rates.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/get-nohw-counter ()

This is GV6 implementation of GLOBAL-CLOCK/GET-NOHW-COUNTER. Return LOGIOR of two quantities:
1. (GV5/GET-NOHW-COUNTER)
2. the global-clock slot NOHW-FLAG

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/hw/after-abort ()

This is GV6 implementation of GLOBAL-CLOCK/HW/AFTER-ABORT.
Calls (GV5/AFTER-ABORT), since GV1 mode forbids hardware transactions.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/hw/start-read ()

This is GV6 implementation of GLOBAL-CLOCK/HW/START-READ.
Calls (GV5/HW/START-READ), since GV1 mode forbids hardware transactions.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/hw/start-write READ-VERSION

This is GV6 implementation of GLOBAL-CLOCK/HW/START-WRITE.
Calls (GV5/HW/START-WRITE), since GV1 mode forbids hardware transactions.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/hw/stat-aborted ()

This is GV5 implementation of GLOBAL-CLOCK/HW/STAT-ABORTED.
It increases local-clock slot ABORTS and may decide to switch between GV1 and GV5 modes.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/hw/stat-committed ()

This is GV6 implementation of GLOBAL-CLOCK/HW/STAT-COMMITTED.
It increases local-clock slot COMMITS and may decide to switch between GV1 and GV5 modes.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/hw/write WRITE-VERSION

This is GV6 implementation of GLOBAL-CLOCK/SW/WRITE.
Calls (GV5/HW/START-WRITE), since GV1 mode forbids hardware transactions.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/incf-nohw-counter &optional DELTA

This is GV6 implementation of GLOBAL-CLOCK/INCF-NOHW-COUNTER. Calls (GV5/INCF-NOHW-COUNTER).

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/stat-aborted ()

This is GV6 implementation of GV6/STAT-ABORTED. It does nothing and returns zero.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/stat-committed ()

This is GV6 implementation of GV6/STAT-COMMITTED. It does nothing and returns zero.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/sw/after-abort ()

This is GV6 implementation of GLOBAL-CLOCK/SW/AFTER-ABORT.
Calls either (GV5/AFTER-ABORT) or (GV1/AFTER-ABORT), depending on the current mode.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/sw/start-read ()

This is GV6 implementation of GLOBAL-CLOCK/SW/START-READ.
Calls either (GV5/SW/START-READ) or (GV1/SW/START-READ), depending on the current mode.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/sw/start-write READ-VERSION

This is GV6 implementation of GLOBAL-CLOCK/SW/START-WRITE.
Calls either (GV5/START-WRITE) or (GV1/START-WRITE), depending on the current mode.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/sw/stat-aborted ()

This is GV5 implementation of GLOBAL-CLOCK/SW/STAT-ABORTED.
It increases local-clock slot ABORTS and may decide to switch between GV1 and GV5 modes.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/sw/stat-committed ()

This is GV6 implementation of GLOBAL-CLOCK/SW/STAT-COMMITTED.
It increases local-clock slot COMMITS and may decide to switch between GV1 and GV5 modes.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/sw/write WRITE-VERSION

This is GV6 implementation of GLOBAL-CLOCK/HW/WRITE.
Calls either (GV5/SW/WRITE) or (GV1/WRITE), depending on the current mode.

Package

stmx

Source

global-clock.lisp (file)

Macro: gv6/valid-read? TVAR-VERSION READ-VERSION

This is GV6 implementation of GLOBAL-CLOCK/VALID-READ? Return (<= tvar-version read-version)

Package

stmx

Source

global-clock.lisp (file)

Macro: gvx-add-missing GVX
Package

stmx

Source

global-clock.lisp (file)

Macro: hw-tlog-write-version ()

Return the WRITE-VERSION for the current hardware transaction

Package

stmx

Source

classes.lisp (file)

Macro: incf-hash-counter WHICH
Package

stmx.lang

Source

hash-table.lisp (file)

Macro: log.debug-gmap &rest ARGS &key &allow-other-keys
Package

stmx.util

Source

gmap.lisp (file)

Macro: maybe-yield-before-rerun ()
Package

stmx

Source

classes.lisp (file)

Macro: options-for-defun (&key INLINE BLOCK-NAME DEFSETF-NAME) (DEFUN NAME ARGS &body BODY)
Package

stmx

Source

optimize-for.lisp (file)

Macro: slot-raw-tvar CLASS INSTANCE SLOT

Return the raw tvar stored in a transactional slot.

Package

stmx

Source

tslot.lisp (file)

Macro: sw-atomic &rest BODY

Run BODY in a software memory transaction. All changes to transactional memory will be visible to other threads only after BODY returns normally (commits). If BODY signals an error, its effects on transactional memory are rolled back and the error is propagated normally.
Also, no work-in-progress transactional memory will ever be visible to other threads.

Package

stmx

Source

sw-atomic.lisp (file)

Macro: transaction-abort-macro &optional ERR-CODE

Immediately abort a hardware memory transaction with a user-specified ERR-CODE, which must be a constant between 0 and 255 (default: 1).
Note: the value returned by (transaction-begin) will also contain "somewhere" the bits of ERR-CODE, but will have a different value.
See Intel x86-64 CPU instruction reference manual, section TSX, for details.

If a transaction is in progress, TRANSACTION-ABORT-MACRO does not return normally: execution is resumed at the instruction immediately after the outermost TRANSACTION-BEGIN.

If called without a running transaction, TRANSACTION-ABORT-MACRO returns normally with an implementation-dependent value.

Package

stmx.asm

Source

transaction.lisp (file)

Macro: tvar-id/next ()
Package

stmx

Source

tvar-fwd.lisp (file)

Macro: tvar-unwrap-slot-macro OBJECT SLOT-NAME
Package

stmx

Source

tclass.lisp (file)

Macro: tvar-wrap-slot-macro OBJECT SLOT-NAME
Package

stmx

Source

tclass.lisp (file)

Macro: use-$-hwtx? ()

Return T if $-hwtx and (setf $-hwtx) should be used, otherwise return NIL.

Package

stmx

Source

tvar.lisp (file)

Macro: use-$-swtx? ()

Return T if $-swtx and (setf $-swtx) should be used, otherwise return NIL.

Package

stmx

Source

tvar.lisp (file)

Macro: validate-tlog-pool ()
Package

stmx

Source

tlog.lisp (file)

Macro: with-declares (DECLARES &optional VAR-BODY) FUNC-BODY &body BODY
Package

stmx

Source

optimize-for.lisp (file)

Macro: with-docstrings (DOCSTRINGS &optional VAR-BODY) FUNC-BODY &body BODY
Package

stmx

Source

optimize-for.lisp (file)

Macro: with-docstrings-declares (DOCSTRINGS DECLARES &optional VAR-BODY) FUNC-BODY &body BODY
Package

stmx

Source

optimize-for.lisp (file)

Macro: with-hwtx &body BODY
Package

stmx

Source

optimize-for.lisp (file)

Macro: with-notx &body BODY
Package

stmx

Source

optimize-for.lisp (file)

Macro: with-recording &body BODY

Enable recording of reads and writes to TLOGs while executing BODY.

Package

stmx

Source

classes.lisp (file)

Macro: with-recording-to-tlog LOG &body BODY

Use LOG as the current transaction log and enable recording of transactions to TLOGs while executing BODY.

Package

stmx

Source

classes.lisp (file)

Macro: with-ro-slots (&rest SLOTS) INSTANCE &body BODY
Package

stmx.util

Source

misc.lisp (file)

Macro: with-rw-slots (&rest SLOTS) INSTANCE &body BODY
Package

stmx.util

Source

misc.lisp (file)

Macro: with-swtx &body BODY
Package

stmx

Source

optimize-for.lisp (file)

Macro: with-tlog LOG &body BODY

Use LOG as the current software transaction log while executing BODY.

Package

stmx

Source

classes.lisp (file)

Macro: with-tx (KIND) &body BODY
Package

stmx

Source

optimize-for.lisp (file)

Macro: without-recording-with-show-tvars &body BODY

Disable recording of transactions to TLOGs and disable hiding TVARs inside TOBJs slots while executing BODY.

Package

stmx

Source

classes.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.4 Functions

Function: $-notx VAR

Get the value from the transactional variable VAR and return it. Return +unbound-tvar+ if VAR is not bound to a value.
Works ONLY outside memory transactions.

Package

stmx

Source

tvar.lisp (file)

Setf Expander

(setf $-notx) (setf expander)

Setf Expander: (setf $-notx) VAR VALUE
Package

stmx

Source

tvar.lisp (file)

Reader

$-notx (function)

Writer

set-$-notx (function)

Function: $-swtx VAR &optional LOG

Get the value from the transactional variable VAR and return it. Return +unbound-tvar+ if VAR is not bound to a value.
Works ONLY inside software memory transactions.

Package

stmx

Source

tvar.lisp (file)

Setf Expander

(setf $-swtx) (setf expander)

Setf Expander: (setf $-swtx) VAR &optional LOG
Package

stmx

Source

tvar.lisp (file)

Reader

$-swtx (function)

Function: %coerce-to-fun THING
Package

stmx.util

Source

tcons-alist.lisp (file)

Function: %enable-#?-syntax ()
Package

stmx.lang

Source

features-reader.lisp (file)

Function: %gv-expand0-f NAME
Package

stmx

Source

global-clock.lisp (file)

Function: %gvx-expand0-f PREFIX SUFFIX
Package

stmx

Source

global-clock.lisp (file)

Function: %impl/names-to-symbol PACKAGE &rest NAMES
Package

stmx

Source

tstruct.lisp (file)

Function: %make-atomic-counter &key (VERSION VERSION)
Package

stmx.lang

Source

atomic-counter.lisp (file)

Function: %make-fast-vector &key (LEN LEN) (VEC VEC) (INITIAL-ELEMENT INITIAL-ELEMENT)
Package

stmx.lang

Source

fast-vector.lisp (file)

Function: %make-mutex &key (MUTEX-OWNER MUTEX-OWNER)
Package

stmx.lang

Source

mutex.lisp (file)

Function: %make-txfifo &key (FRONT FRONT) (BACK BACK)
Package

stmx

Source

classes.lisp (file)

Function: %make-txhash-table &key (VEC VEC) (COUNT COUNT) (POOL POOL)
Package

stmx

Source

classes.lisp (file)

Function: %rbmap-rebalance-after-insert M STACK

Rebalance red-black tree after adding a child to (first stack).
Return (values node stack) for some rebalanced node and its path from root. If stack is nil, returned node is the new root to set.

Package

stmx.util

Source

rbmap.lisp (file)

Function: %rbmap-remove-at M STACK

Remove (first stack) from red-black tree M and return (values some-node that-node-stack) from rebalanced tree. Some-node will be nil only if the tree is empty after removal.

Package

stmx.util

Source

rbmap.lisp (file)

Function: %rbmap-remove-black-node-at M NODE STACK

Remove from red-black tree M black leaf NODE, whose path is STACK. Return some node in rebalanced tree and its stack as multiple values

Package

stmx.util

Source

rbmap.lisp (file)

Function: %run-sw-atomic TX

Function equivalent of the SW-ATOMIC macro.

Run the function TX inside a transaction.
If the transaction is invalid (conflicts) re-run TX immediately, ignoring any error it may signal.

Otherwise, commit if TX returns normally, or rollback if it signals an error.

Finally, if TX called (retry), re-run it after at least some of the transactional memory it read has changed.

Package

stmx

Source

sw-atomic.lisp (file)

Function: %stmx-impl/notx-set/$-slot VALUE VAR
Package

stmx

Source

tvar-slot.lisp (file)

Function: %stmx-impl/notx-set/tcar VALUE CONS
Package

stmx.util

Source

tcons.lisp (file)

Function: %stmx-impl/notx-set/tcdr VALUE CONS
Package

stmx.util

Source

tcons.lisp (file)

Function: %stmx-impl/notx-set/tcons-first VALUE INSTANCE
Package

stmx.util

Source

tcons.lisp (file)

Function: %stmx-impl/notx-set/tcons-rest VALUE INSTANCE
Package

stmx.util

Source

tcons.lisp (file)

Function: %stmx-impl/notx-set/tfirst VALUE CONS
Package

stmx.util

Source

tcons.lisp (file)

Function: %stmx-impl/notx-set/trest VALUE CONS
Package

stmx.util

Source

tcons.lisp (file)

Function: %stmx-impl/notx/$-slot VAR
Package

stmx

Source

tvar-slot.lisp (file)

Setf Expander

(setf %stmx-impl/notx/$-slot) (setf expander)

Setf Expander: (setf %stmx-impl/notx/$-slot) VAR
Package

stmx

Source

tvar-slot.lisp (file)

Reader

%stmx-impl/notx/$-slot (function)

Function: %stmx-impl/notx/bound-$? VAR
Package

stmx

Source

tvar-slot.lisp (file)

Function: %stmx-impl/notx/peek-$ VAR DEFAULT
Package

stmx

Source

tvar-slot.lisp (file)

Function: %stmx-impl/notx/set-tsvref TVEC INDEX VALUE
Package

stmx.util

Source

simple-tvector.lisp (file)

Function: %stmx-impl/notx/tcar LIST
Package

stmx.util

Source

tcons.lisp (file)

Setf Expander

(setf %stmx-impl/notx/tcar) (setf expander)

Setf Expander: (setf %stmx-impl/notx/tcar) CONS
Package

stmx.util

Source

tcons.lisp (file)

Reader

%stmx-impl/notx/tcar (function)

Function: %stmx-impl/notx/tcdr LIST
Package

stmx.util

Source

tcons.lisp (file)

Setf Expander

(setf %stmx-impl/notx/tcdr) (setf expander)

Setf Expander: (setf %stmx-impl/notx/tcdr) CONS
Package

stmx.util

Source

tcons.lisp (file)

Reader

%stmx-impl/notx/tcdr (function)

Function: %stmx-impl/notx/tcons-first INSTANCE
Package

stmx.util

Source

tcons.lisp (file)

Setf Expander

(setf %stmx-impl/notx/tcons-first) (setf expander)

Setf Expander: (setf %stmx-impl/notx/tcons-first) INSTANCE
Package

stmx.util

Source

tcons.lisp (file)

Reader

%stmx-impl/notx/tcons-first (function)

Function: %stmx-impl/notx/tcons-rest INSTANCE
Package

stmx.util

Source

tcons.lisp (file)

Setf Expander

(setf %stmx-impl/notx/tcons-rest) (setf expander)

Setf Expander: (setf %stmx-impl/notx/tcons-rest) INSTANCE
Package

stmx.util

Source

tcons.lisp (file)

Reader

%stmx-impl/notx/tcons-rest (function)

Function: %stmx-impl/notx/tfirst TLIST
Package

stmx.util

Source

tcons.lisp (file)

Setf Expander

(setf %stmx-impl/notx/tfirst) (setf expander)

Setf Expander: (setf %stmx-impl/notx/tfirst) CONS
Package

stmx.util

Source