aboutsummaryrefslogtreecommitdiffstats
path: root/tools/memshr/bidir-hash.c
Commit message (Collapse)AuthorAgeFilesLines
* tools: memshr: arm64 supportIan Campbell2013-04-111-12/+36
| | | | | | | | | | | | | | | | | | | | I'm not mad keen on propagating these sorts of asm atomic operations throughout our code base. Other options would be: - use libatomic-ops, http://www.hpl.hp.com/research/linux/atomic_ops/, although this doesn't seem to be as widespread as I would like (not in RHEL5 for example) - use a pthread lock. This is probably the simplest/best option but I wasn't able to figure out the locking hierarchy of this code So I've copped out and just copied the appropriate inlines here. I also nuked some stray ia64 support and fixed a coment in the arm32 version while I was here. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* arm: compile memshrStefano Stabellini2012-05-301-0/+31
| | | | | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <Ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* memshr: Must be built on ia64 as well as x86, as blktap depends on it.Keir Fraser2009-12-281-12/+22
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* memshr: Build fixesKeir Fraser2009-12-281-5/+21
| | | | | | | | * Build memshr/xenpaging on x86/Linux only * Remove dependency on GCC 4.1+ __sync_*() intrinsics. Signed-off-by: Keir Fraser <keir.fraser@citrix.com> Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
* Make Citrix copyright strinsg consistent.Keir Fraser2009-12-181-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Generic bi-directional map, and related initialisation functions. At the momentKeir Fraser2009-12-171-0/+1275
a single map is used to store mappings between sharing handles and disk blocks. This is used to share pages which store data read of the same blocks on (virtual) disk. Note that the map is stored in a shared memory region, as it needs to be accessed by multiple tapdisk processes. This complicates memory allocation (malloc cannot be used), prevents poniters to be stored directly (as the shared memory region might and is mapped at different base address) and finally pthread locks need to be multi-process aware. Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>