tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
lehigh.h File Reference
#include "pair.h"
Include dependency graph for lehigh.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  comparator
 

Typedefs

typedef struct comparator comparator_t
 

Typedef Documentation

typedef struct comparator comparator_t

Copyright (C) 2011 University of Rochester Department of Computer Science and Lehigh University Department of Computer Science and Engineering

License: Modified BSD Please see the file LICENSE.RSTM for licensing information STAMP does some odd things with function pointers, which makes g++ unhappy and makes it very hard to reason about the correctness of code. The most offensive is that STAMP may coerce a function pointer for a 3-argument comparison function into a 2-argument comparison function.

We avoid this situation by saying that rather than store a function pointer within a collection's root node, we'll store a pointer to a struct, where the struct has two function pointers: one for transactional code, one for nontransactional code, with 3 and 2 parameters, respectively. This adds a level of indirection (though only once per collection traversal, if we are careful), but increases safety and allows better reasoning.