aboutsummaryrefslogtreecommitdiff
path: root/libitm/doc/the-libitm-abi/library-design-principles.rst
blob: 7482994f2b145b51368e92957038e77af76c0333 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
..
  Copyright 1988-2022 Free Software Foundation, Inc.
  This is part of the GCC manual.
  For copying conditions, see the copyright.rst file.

Library design principles
*************************

[No changes] Calling conventions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

[No changes] TM library algorithms
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

[No changes] Optimized load and store routines
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

[No changes] Aligned load and store routines
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Data logging functions
^^^^^^^^^^^^^^^^^^^^^^

The memory locations accessed with transactional loads and stores and the
memory locations whose values are logged must not overlap. This required
separation only extends to the scope of the execution of one transaction
including all the executions of all nested transactions.

The compiler must be consistent (within the scope of a single transaction)
about which memory locations are shared and which are not shared with other
threads (i.e., data must be accessed either transactionally or
nontransactionally). Otherwise, non-write-through TM algorithms would not work.

For memory locations on the stack, this requirement extends to only the
lifetime of the stack frame that the memory location belongs to (or the
lifetime of the transaction, whichever is shorter).  Thus, memory that is
reused for several stack frames could be target of both data logging and
transactional accesses; however, this is harmless because these stack frames'
lifetimes will end before the transaction finishes.

[No changes] Scatter/gather calls
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

[No changes] Serial and irrevocable mode
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

[No changes] Transaction descriptor
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Store allocation
^^^^^^^^^^^^^^^^

There is no ``getTransaction`` function.

[No changes] Naming conventions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Function pointer encryption
^^^^^^^^^^^^^^^^^^^^^^^^^^^

Currently, this is not implemented.