mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-10 05:08:42 +00:00
a95141111c
The original algorithm was suffering from an ABA race condition: A: fp = page_stack B: completely allocates the same page and writes into it some data A: unsuspecting, loads (invalid) next = fp->next B: finishes working with the page and returns it back to page_stack A: compare-exchange page_stack: fp => next succeeds and writes garbage to page_stack Fixed this by using an implicit spinlock in hot page allocator.
12 lines
307 B
Makefile
12 lines
307 B
Makefile
src := alloc.c io.c io-loop.c krt.c log.c main.c random.c domain.c
|
|
obj := $(src-o-files)
|
|
$(all-daemon)
|
|
$(cf-local)
|
|
$(conf-y-targets): $(s)krt.Y
|
|
|
|
src := $(filter-out main.c, $(src))
|
|
|
|
tests_src := alloc_test.c
|
|
tests_targets := $(tests_targets) $(tests-target-files)
|
|
tests_objs := $(tests_objs) $(src-o-files)
|