urcu:lflist

Last commit made on 2010-03-01
Get this branch:
git clone -b lflist https://git.launchpad.net/urcu

Branch merges

Branch information

Name:
lflist
Repository:
lp:urcu

Recent commits

40fe386... by Mathieu Desnoyers <email address hidden> on 2010-03-01

LFQ: Fix unpaired lock/unlock

Signed-off-by: Mathieu Desnoyers <email address hidden>

fc42575... by Mathieu Desnoyers <email address hidden> on 2010-03-01

Remove urcu defer lfq from makefile (non existent)

Signed-off-by: Mathieu Desnoyers <email address hidden>

5ad7ff6... by Paolo Bonzini <email address hidden> on 2010-03-01

lock-free queue with RCU-based garbage collection

A lock-free queue example using RCU to avoid the need for double-word
compare-and-swap and, at the same time, to implement efficient garbage
collection. I tested it lightly, and I don't think it's fully ready
for inclusion. It does need the previous two patches to avoid deadlocks,
so I did test it somewhat. :-)

See individual files for detailed comments on how it works.

Cc: Paul E. McKenney <email address hidden>

1b27a77... by Paolo Bonzini <email address hidden> on 2010-03-01

centralize definition of BITS_PER_LONG

Use __SIZEOF_LONG__, defined by GCC 4.3 or later, or _LP64, defined
by GCC 3.4 or later.

Signed-off-by: Paolo Bonzini <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

f152776... by Paolo Bonzini <email address hidden> on 2010-03-01

avoid multiple evaluation of STORE_SHARED argument

Signed-off-by: Mathieu Desnoyers <email address hidden>

83676f0... by Paolo Bonzini <email address hidden> on 2010-03-01

support compiling on unknown architectures

The new defaults mean that, for example, ia64 support comes for free.

[edit by Mathieu Desnoyers]

defaults -> generic

Signed-off-by: Paolo Bonzini <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

6f9d9b4... by Paolo Bonzini <email address hidden> on 2010-03-01

add Alpha support

And you already know what needs to be special-cased for Alpha...

[edit by Mathieu Desnoyers]

defaults -> generic

Signed-off-by: Paolo Bonzini <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

f469d83... by Paolo Bonzini <email address hidden> on 2010-03-01

move whether atomic byte/short exists to uatomic_arch_*.h

And add more generic implementations to uatomic_defaults.h.

Signed-off-by: Paolo Bonzini <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

b092652... by Paolo Bonzini <email address hidden> on 2010-03-01

use uatomic_generic.h for common fallback implementations

And now, really remove the code for S390/SPARC, using the fallback
implementation of uatomic_generic.h

Signed-off-by: Paolo Bonzini <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

8760d94... by Paolo Bonzini <email address hidden> on 2010-03-01

add uatomic_generic.h, use it for common definitions

uatomic_generic.h can be included by uatomic_arch_*.h to provide useful
default definitions. uatomic_arch_*.h can define whatever builtins
it wants to override, then uatomic_generic.h will provide what is not
already defined, as follows:

- uatomic_cmpxchg will use __sync_val_compare_and_swap builtins;

- uatomic_add_return will use __sync_fetch_and_add if uatomic_arch_*.h
did not provide a definition of uatomic_cmpxchg. If it did, we assume
__sync builtins are buggy or otherwise undesirable on this platform,
so uatomic_generic.h will implement uatomic_add_return in terms of
uatomic_cmpxchg too.

- uatomic_xchg is like uatomic_add_return. However, since GCC does
not provide an adequate builtin, it needs to use a compare-and-swap
loop using __sync_bool_compare_and_swap if uatomic_cmpxchg is not
provided.

- uatomic_sub_return/uatomic_add/uatomic_sub will be implemented
in terms of uatomic_add_return;

- uatomic_inc/uatomic_dec will be implemented in terms of uatomic_add.

After this patch, uatomic_generic.h is already used for the latter two
categories. The next patch will use uatomic_generic.h whenever there is
no assembly code involved, or otherwise it makes no difference to use
uatomic_generic.h. We keep custom per-arch macros to provide support for
compilers back to early GCC 3.x versions; however future ports may
not have this limitation.

The hunk in tests/test_uatomic.c is only needed for bisectability
and will be removed later.

[edit by Mathieu Desnoyers]

Fixed Makefile.am conflict.

Signed-off-by: Paolo Bonzini <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>