--- libatomic-ops-7.6.2.orig/debian/README.Debian +++ libatomic-ops-7.6.2/debian/README.Debian @@ -0,0 +1,35 @@ +libatomic-ops for Debian +------------------------ + +Libatomic-ops implements a large collection of operations, each one +of which is a combination of an (optional) atomic memory operation, +and a memory barrier. It also implements associated feature-test +macros that determine whether a particular operation is available +on the current target hardware (either directly or by synthesis). +Libatomic-ops attempts to replace various existing files with similar +goals, since they usually do not handle differences in memory barrier +styles with sufficient generality. + +This package is only available as a static library; much of the magic +is in the header files anyway. + +Please be aware of the dual nature of the license, from LICENSING.txt + +Two small libraries are built and installed: + +- libatomic_ops.a is a support library, which is not needed on some platforms. + This is intended to be usable, under some mild restrictions, in free or + proprietary code, as are all the header files. See doc/LICENSING.txt. +- libatomic_ops_gpl.a contains some higher level facilities. This code is + currently covered by the GPL. The contents currently correspond to + the headers atomic_ops_stack.h and atomic_ops_malloc.h. + +NB: the Debian package has been enabled to build on any architecture. +However, only i386, ia64 and amd64 have been fully tested due to +limited access to some of the other architectures. Corrections are +welcome. + +The M68K port was contributed by Roman Zippel , +and is not currently part of the upstream source. + + -- Ian Wienand , Mon, 16 Oct 2006 09:47:19 +1000 --- libatomic-ops-7.6.2.orig/debian/README.source +++ libatomic-ops-7.6.2/debian/README.source @@ -0,0 +1,7 @@ +Patches applied are cherry-picked from upstream. + +For patching details see + +/usr/share/doc/quilt/README.source + + -- Ian Wienand , Mon, 25 Jan 2016 21:37:35 +1100 --- libatomic-ops-7.6.2.orig/debian/changelog +++ libatomic-ops-7.6.2/debian/changelog @@ -0,0 +1,363 @@ +libatomic-ops (7.6.2-1) unstable; urgency=medium + + * Update to stable 7.6 branch + * Drop 0001-Basic-support-of-TILE-Gx-and-TILEPro-CPUs.patch + (04a286421802a503b58d804d0d673dd5a28c9e9b) + + -- Ian Wienand Wed, 10 Jan 2018 09:32:42 +1100 + +libatomic-ops (7.4.8-1) unstable; urgency=medium + + * New upstream release + * Remove 0002-Use-LLD-and-SCD-instructions-on-mips64.patch + (upstream 0ff076ab581d83fba6a6f14c3c550c789699678c) + * Remove 0003-Support-n32-ABI-for-mips64.patch (upstream + 9c92c7b0d7f6c41199583497c5b5cf4eb1105a30) + * Update to standards 4.1.1 (no changes) + + -- Ian Wienand Wed, 29 Nov 2017 20:45:24 +1100 + +libatomic-ops (7.4.4-3) unstable; urgency=medium + + * Skip check tests on ppc and armel platforms to allow testing + migration. Not a great solution, but nothing upstream and is done in + Fedora packages too. + + -- Ian Wienand Sat, 26 Nov 2016 09:56:33 +1100 + +libatomic-ops (7.4.4-2) unstable; urgency=medium + + * Restore missing MIPS patches from 7.4 branch (Closes: #773205) + * Re-add from 7.4 branch 0002-Use-LLD-and-SCD-instructions-on-mips64.patch + (0ff076ab581d83fba6a6f14c3c550c789699678c) + * Re-add from 7.4 branch 0003-Support-n32-ABI-for-mips64.patch + (9c92c7b0d7f6c41199583497c5b5cf4eb1105a30) + + -- Ian Wienand Thu, 03 Nov 2016 20:25:29 +1100 + +libatomic-ops (7.4.4-1) unstable; urgency=medium + + * New upstream release + * Remove 0001-Use-LLD-and-SCD-instructions-on-mips64.patch + (54d1da56809b892d2fc521fea0fd41ea8c23e4f2) + * Remove 004-Support-n32-ABI-for-mips64.patch + (d3e884b41ede6d5a83ec480f72a8ed6fb4984e3c) + * Remove 0002-Remove-inclusion-of-acquire_release_volatile.h-on-mi.patch + (0f838defa3e466aff725213638f90e850430f2f9) + * Remove 0003-Minor-fix-of-code-alignment-in-mips-AO_compare_and_s.patch + (22ca163649571c72852f5892c05a4c1c53d50cc5) + * Remove 0005-Fix-GCC-5.x-compatibility-for-AArch64-double-wide-pr.patch + (437c10b73ae4b83306f77c851cf8385172ae3759) + * Enable autoreconf (Closes: #821068) + * Include patch for tilegx (backport + 04a286421802a503b58d804d0d673dd5a28c9e9b) (Closes: #841771) + * Update standards 3.9.8 (no change) + * Update compat to 9 + + -- Ian Wienand Tue, 25 Oct 2016 22:26:35 +1100 + +libatomic-ops (7.4.2-3) unstable; urgency=medium + + * Restore backported patches from 7.4.2-1.1 for mips64/arm64 + + -- Ian Wienand Mon, 25 Jan 2016 21:22:14 +1100 + +libatomic-ops (7.4.2-2) unstable; urgency=medium + + * Closes: 811550 -- implement multi-arch + * Update standards version 3.9.6 (no change) + + -- Ian Wienand Wed, 20 Jan 2016 11:14:12 +1100 + +libatomic-ops (7.4.2-1) unstable; urgency=medium + + * New upstream release + * Update standards version 3.9.5 (no change) + + -- Ian Wienand Sat, 21 Jun 2014 11:21:55 +1000 + +libatomic-ops (7.3~alpha3+git20130717-1) unstable; urgency=low + + * Closes: 717095 -- update to current upstream for arm64 + * Update standards version (no change) + + -- Ian Wienand Wed, 17 Jul 2013 09:06:32 +1000 + +libatomic-ops (7.3~alpha3+git20121114-1) unstable; urgency=low + + * Closes: 680100 -- include workaround for alpha spin-outs; thanks to + Ivan Maidanski for diagnosing. + + -- Ian Wienand Wed, 14 Nov 2012 15:27:35 -0800 + +libatomic-ops (7.3~alpha1+git20120718-1) unstable; urgency=low + + * Closes: 655872 -- Update from upstream git which fixes issues with + older compilers as used on kfreebsd + (613f39d369045e8fc385a439f67a575cddcc6fa1). Thanks Ivan! + + -- Ian Wienand Wed, 18 Jul 2012 07:08:36 -0700 + +libatomic-ops (7.3~alpha1+git20120701-1) unstable; urgency=low + + * Closes: 679680 -- Update from upstream git which contains fix for type + issue on ia64 (3e7162d789df366a57d3e4a59dde4046f91ed135) + + -- Ian Wienand Sun, 01 Jul 2012 22:20:34 -0700 + +libatomic-ops (7.3~alpha1+git20120621-1) unstable; urgency=low + + * Update from upstream git + * Closes: 632604 -- Fixed by upstream 30cea1b as identified by Emanuele + Aina and Gregor Herrmann . Thanks! + + -- Ian Wienand Thu, 21 Jun 2012 09:55:15 -0700 + +libatomic-ops (7.3~alpha1+git20111031-1) unstable; urgency=low + + * Update from upstream git + * Closes: 645302 -- Integrates patch from Thorsten Glaser + + -- Ian Wienand Mon, 31 Oct 2011 23:01:03 -0700 + +libatomic-ops (7.3~alpha1+git20110913-1) unstable; urgency=low + + * New upstream release + + -- Ian Wienand Tue, 13 Sep 2011 21:19:00 -0700 + +libatomic-ops (7.2~alpha5+cvs20101124-1) unstable; urgency=low + + * Closes: 604753 -- Update from upstream CVS, fixes ARM Thumb-2 mode + FTBFS + + -- Ian Wienand Wed, 24 Nov 2010 21:20:40 -0800 + +libatomic-ops (7.2~alpha5+cvs20100919-1) unstable; urgency=low + + * Closes: 597193 -- Update from upstream CVS to fix armel issues + * Update to standards 3.9.1 + + -- Ian Wienand Sun, 19 Sep 2010 21:55:41 -0700 + +libatomic-ops (7.2~alpha5+cvs20100601-1) unstable; urgency=low + + * Update from upstream CVS, to fix AVR build issues with change from + Brad Smith + + -- Ian Wienand Tue, 01 Jun 2010 15:37:41 -0700 + +libatomic-ops (7.2~alpha5+cvs20100523-1) unstable; urgency=low + + * Update from upstream CVS + * Closes: 580211 -- avr support integrated upstream (Thanks Stefano!) + + -- Ian Wienand Fri, 21 May 2010 15:47:12 -0700 + +libatomic-ops (7.2~alpha5+cvs20100204-1) unstable; urgency=low + + * New upstream (with new version scheme based on the GC library) + * Packagaing overhaul - remove unneeded debian/libatomic-ops-dev.files, + debian/libatomic-ops-dev.install, debian/docs, debian/dirs + * Update rules to use DEB_DESTDIR to install into /tmp + * Pick only relevant files with debian/libatomic-ops-dev.install + * Remove patch to ignore upstream doc generation, not needed with above + changes + + -- Ian Wienand Thu, 04 Feb 2010 14:57:58 -0800 + +libatomic-ops (1.2+cvs20091005-1) unstable; urgency=low + + * Update from upstream CVS + * Closes: #547136 -- patch accepted upstream + * Lintian updates : Update standards version, debhelper compat version, + add Section tag for source, misc depends for debhelper + + -- Ian Wienand Mon, 5 Oct 2009 11:08:00 -0700 + +libatomic-ops (1.2+cvs20080819-1) unstable; urgency=low + + * Update from upstream CVS + * Closes: #495211 -- patch taken upstream, thanks Thiemo! + + -- Ian Wienand Tue, 19 Aug 2008 14:25:24 -0700 + +libatomic-ops (1.2+cvs20080815-1) unstable; urgency=low + + * New upstream, taken from CVS repository at + bdwgc.cvs.sourceforge.net:/cvsroot/bdwgc + which upstream has told me is official home of the package. + * Patches now included upstream: 01_s390_include.patch, 02_mips.patch, + 04_m68k.patch, 05_powerpc_asm.patch, 07_pic_cmpxchng.patch, + + -- Ian Wienand Fri, 15 Aug 2008 21:26:06 -0700 + +libatomic-ops (1.2-4) unstable; urgency=low + + * Closes: #463390 -- Add 06_double.patch to fix some issues with double + CAS defs. Patch by Jamey Sharp, thanks Jamey! + * This fixed up AO_compare_double_and_swap_double_full which then + revealed a PIC problem, which then revealed the arguments to cmpxchg8b + were around the wrong way, fixed in 07_pic_cmpxchng.patch + + -- Ian Wienand Fri, 01 Feb 2008 11:09:33 +1100 + +libatomic-ops (1.2-3) unstable; urgency=low + + * Closes: #449152 -- updated MIPS patch from Thiemo Seufer + + -- Ian Wienand Sun, 04 Nov 2007 19:01:31 +1100 + +libatomic-ops (1.2-2) unstable; urgency=low + + * Add patches/05_powerpc_asm.patch to fix invalid ASM in PowerPC, as per + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33171 (Closes: #432654). + Thanks to Sjoerd Simons for isolating the bug, and + Andrew Pinkski for solution. + + -- Ian Wienand Mon, 27 Aug 2007 11:13:13 +1000 + +libatomic-ops (1.2-1) unstable; urgency=low + + * New upstream + * Remove 00_x86_intrin.patch, fixed upstream (with "=q")x + + -- Ian Wienand Fri, 25 May 2007 11:29:30 +1000 + +libatomic-ops (1.1-4) unstable; urgency=low + + * Closes: #322027, #338469 -- add 04_m68k.patch for M68K support, from + Roman Zippel . Add note in README.Debian about + port. + * Change mainatiner address to my @debian.org + + -- Ian Wienand Mon, 16 Oct 2006 09:45:29 +1000 + +libatomic-ops (1.1-3) unstable; urgency=low + + * move the check target under the rules to make cdbs run inbuilt tests + * Closes: #307448 -- assuming the (newly re-enabled) test runs OK we + seem to be building on ARM + + -- Ian Wienand Thu, 8 Dec 2005 13:39:22 +1100 + +libatomic-ops (1.1-2) unstable; urgency=low + + * spell my name right in README.Debian + * patches/03_nodoc.patch : don't install documentation, the packaging + does this directly + * really install manpages + * clean up what docs get installed + * don't auto generate control file, do it in external scripts + + -- Ian Wienand Fri, 25 Nov 2005 16:28:16 +1100 + +libatomic-ops (1.1-1) unstable; urgency=low + + * New upstream release + * Convert to use CDBS with patch system; move extra stuff over upstream + into ./debian/patches + * Closes: #336112, #338442 -- MIPS support debian/patches/02_mips.patch + Thanks Thiemo! + + -- Ian Wienand Mon, 31 Oct 2005 13:40:53 +1100 + +libatomic-ops (1.0-3) unstable; urgency=low + + * Closes: bug#332378 -- fix include headers in + src/atomic_ops/sysdeps/gcc/s390.h + + -- Ian Wienand Thu, 6 Oct 2005 16:14:49 +1000 + +libatomic-ops (1.0-2) unstable; urgency=low + + * Closes: bug#321284 -- we now only have the -dev package with the + static libraries in it, and it replaces the normal version (this + corrects an ahs3 thinko from 1.0-1). + * Add a note to README.Debian about staticness and license + * Add /doc subdir into package documents + * Closes: bug#321291 -- use "Q" constraint in + src/atomic_ops/sysdeps/gcc/x86.h for AO_test_and_set_full, see + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23242 + * Reopening #307448 -- the asm needs to be reconsidered and possibly + rewritten for ARM. + + -- Ian Wienand Fri, 5 Aug 2005 11:13:26 +1000 + +libatomic-ops (1.0-1) unstable; urgency=low + + * Closes: bug#307503 -- FTBS. Update to upstream 1.0 (ianw) + * The 'libatomic-ops' package now contains only a statically linked + library, as upstream wishes (which makes sense, in this case, and + still fits within policy). The 'libatomic-ops-dev' package now + depends on the 'libatomic-ops' as a result to ensure a developer + can still properly link against the package (ahs3). + * Update standards version to 3.6.2 (ahs3) + * Closes: bug#307448 -- variable 'ret' undefined on ARM. I think + this has been solved but I could be wrong and may have to reopen + this bug (ahs3). + + -- Al Stone Mon, 1 Aug 2005 22:25:38 -0600 + +libatomic-ops (0.5.1-4) unstable; urgency=low + + * Add man page + + -- Ian Wienand Fri, 20 May 2005 08:28:14 +1000 + +libatomic-ops (0.5.1-3) unstable; urgency=low + + * Closes: bug#287276: support for amd64 -- thinko, skipped part + of Kurt's patch inadvertently. + + -- Al Stone Mon, 21 Feb 2005 17:15:35 -0700 + +libatomic-ops (0.5.1-2) unstable; urgency=low + + * Closes: bug#287276: support for amd64 added (thanks to Kurt + Roeckx for the patch). + * Closes: bug#244910: all architectures have now been enabled (only + i386, ia64, amd64 are absolutely known to work, however) + + -- Al Stone Sat, 19 Feb 2005 15:47:31 -0700 + +libatomic-ops (0.5.1-1) unstable; urgency=low + + * Merge in Ian's changes for a non-native Debian package -- properly, + this time. + * Remove the auto* build-deps (the point of Ian's changes) + * Closes: bug#270013 -- FTBFS: Permission problem on autogen.sh + * Since we've started branching from upstream a little, change + the versioning to reflect that -- hence, 0.5.1 to start with. + + -- Al Stone Tue, 7 Sep 2004 16:01:18 -0600 + +libatomic-ops (0.5-3) unstable; urgency=low + + * Update to cleanup and not be a debian native package + * Closes: bug#266131: FTBFS: aclocal-1.7: command not found + * Minor changes to debian/rules file (ahs3) + * Cleanup minor typos before upload (ahs3) + * Added 'libtool' to Build-Depends (ahs3) + + -- Ian Wienand Fri, 27 Aug 2004 10:48:39 +1000 + +libatomic-ops (0.5-2) unstable; urgency=low + + * Cleanup of the source tree from Ian Wienand ; + got rid of all the generated files to simplify things. + * Did cleanup of lintian-reported items + + -- Al Stone Tue, 24 Aug 2004 22:50:25 -0600 + +libatomic-ops (0.5-1) unstable; urgency=low + + * Initial Release based on Ian Wienand's work (). + * Inserted myself (Al Stone as maintainer. + * Cleaned up the various files needed in the debian directory. + * Package now creates 'libatomic-ops' and 'libatomic-ops-dev' + * Package now uses libtool + * Closes: bug#231793 -- ITP for libatomic_ops + + -- Al Stone Sat, 13 Mar 2004 14:38:53 -0700 + --- libatomic-ops-7.6.2.orig/debian/compat +++ libatomic-ops-7.6.2/debian/compat @@ -0,0 +1 @@ +9 --- libatomic-ops-7.6.2.orig/debian/control +++ libatomic-ops-7.6.2/debian/control @@ -0,0 +1,32 @@ +Source: libatomic-ops +Priority: optional +Section: libdevel +Maintainer: Ian Wienand +Uploaders: Al Stone +Build-Depends: cdbs (>= 0.4.27), + autotools-dev, + debhelper, + dh-buildinfo, + quilt, + patchutils (>= 0.2.25), + dh-autoreconf, quilt +Standards-Version: 4.1.1 + +Package: libatomic-ops-dev +Section: libdevel +Depends: ${shlibs:Depends}, ${misc:Depends} +Architecture: any +Replaces: libatomic-ops +Description: A library for atomic operations (development files) + Libatomic-ops implements a large collection of operations, each one + of which is a combination of an (optional) atomic memory operation, + and a memory barrier. It also implements associated feature-test + macros that determine whether a particular operation is available + on the current target hardware (either directly or by synthesis). + Libatomic-ops attempts to replace various existing files with similar + goals, since they usually do not handle differences in memory barrier + styles with sufficient generality. + . + This package provides the header files and documentation needed by + developers. + --- libatomic-ops-7.6.2.orig/debian/control.in +++ libatomic-ops-7.6.2/debian/control.in @@ -0,0 +1,26 @@ +Source: libatomic-ops +Priority: optional +Section: libdevel +Maintainer: Ian Wienand +Uploaders: Al Stone +Build-Depends: @cdbs@, quilt +Standards-Version: 4.1.1 + +Package: libatomic-ops-dev +Section: libdevel +Depends: ${shlibs:Depends}, ${misc:Depends} +Architecture: any +Replaces: libatomic-ops +Description: A library for atomic operations (development files) + Libatomic-ops implements a large collection of operations, each one + of which is a combination of an (optional) atomic memory operation, + and a memory barrier. It also implements associated feature-test + macros that determine whether a particular operation is available + on the current target hardware (either directly or by synthesis). + Libatomic-ops attempts to replace various existing files with similar + goals, since they usually do not handle differences in memory barrier + styles with sufficient generality. + . + This package provides the header files and documentation needed by + developers. + --- libatomic-ops-7.6.2.orig/debian/copyright +++ libatomic-ops-7.6.2/debian/copyright @@ -0,0 +1,71 @@ +This package was debianized by Ian Wienand +on Mon, 9 Feb 2004 10:26:54 +1100. + +It was downloaded from: + https://github.com/ivmai/libatomic_ops + (previously + http://www.hpl.hp.com/research/linux/atomic_ops/download.php4) + +Upstream Authors: + Hans Boehm + David Mosberger + +Our intent is to make it easy to use all "library" pieces of the code, in +both free and proprietary software. Hence most code that we expect to be +linked into a client application is covered by an MIT-style license: + +---------------------------------------- + +Copyright (c) 2004, Hewlett-Packard Company + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +-------------------------------- + +A few files in the ao_sysdeps directory were inherited in part from the +Boehm-Demers-Weiser conservative garbage collector, and are covered by +its license, which is similar in spirit: + +-------------------------------- + +Copyright (c) 2004 Hewlett-Packard Company + +THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED +OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + +Permission is hereby granted to use or copy this program +for any purpose, provided the above notices are retained on all copies. +Permission to modify the code and to distribute modified code is granted, +provided the above notices are retained, and a notice that the code was +modified is included with the above copyright notice. + +---------------------------------- + +A few files are covered by the GNU General Public License. (See file +"COPYING"). Currently this applies only to test code and sample +applications. This should have no effect on linking "library" +routines into proprietary applications. + +A copy of the GNU General Public License can be found in: +/usr/share/common-licenses/GPL + +In the future, legal considerations may make it desirable to also cover +some newly added library routines under the GPL. If so, these will be +clearly separated, and not implicitly linked into existing libraries. + --- libatomic-ops-7.6.2.orig/debian/libatomic-malloc.3 +++ libatomic-ops-7.6.2/debian/libatomic-malloc.3 @@ -0,0 +1,89 @@ +.\" Copyright 2005 Ian Wienand, Gelato@UNSW +.\" +.TH "LIBATOMIC-MALLOC" "3" "2 June, 2005" "Ian Wienand" "" +.SH "NAME" +libatomic\-malloc \- Library providing simple almost\-lock\-free malloc implementation +.SH "SYNOPSIS" +.B #include +.sp +.B cc ... \-latomic_ops_gpl +.sp +Note that the AO_malloc implementation is licensed under the GPL, unlike the lower level routines. + +.B void *AO_malloc(size_t sz); +.br +.B void AO_free(void *p); +.br +.B void AO_malloc_enable_mmap(void); +.SH "DESCRIPTION" +A simple almost\-lock\-free malloc implementation. + +This is intended as a safe way to allocate memory from a signal handler, +or to allocate memory in the context of a library that does not know what +thread library it will be used with. In either case locking is impossible. + +Note that the operations are only guaranteed to be 1\-lock\-free, i.e. a +single blocked thread will not prevent progress, but multiple blocked +threads may. To safely use these operations in a signal handler, +the handler should be non\-reentrant, i.e. it should not be interruptable +by another handler using these operations. Furthermore use outside +of signal handlers in a multithreaded application should be protected +by a lock, so that at most one invocation may be interrupted by a signal. +The header will define the macro +.I AO_MALLOC_IS_LOCK_FREE +on platforms +on which malloc is completely lock\-free, and hence these restrictions +do not apply. + +In the presence of threads, but absence of contention, the time performance +of this package should be as good, or slightly better than, most system +malloc implementations. Its space performance +is theoretically optimal (to within a constant factor), but probably +quite poor in practice. In particular, no attempt is made to +coalesce free small memory blocks. Something like Doug Lea's malloc is +likely to use significantly less memory for complex applications. + +Perfomance on platforms without an efficient compare\-and\-swap implementation +will be poor. + +This package was not designed for processor\-scalability in the face of +high allocation rates. If all threads happen to allocate different\-sized +objects, you might get lucky. Otherwise expect contention and false\-sharing +problems. If this is an issue, something like Maged Michael's algorithm +(PLDI 2004) would be technically a far better choice. If you are concerned +only with scalablity, and not signal\-safety, you might also consider +using Hoard instead. We have seen a factor of 3 to 4 slowdown from the +standard glibc malloc implementation with contention, even when the +performance without contention was faster. (To make the implementation +more scalable, one would need to replicate at least the free list headers, +so that concurrent access is possible without cache conflicts.) + +Unfortunately there is no portable async\-signal\-safe way to obtain large +chunks of memory from the OS. Based on reading of the source code, +mmap\-based allocation appears safe under Linux, and probably BSD variants. +It is probably unsafe for operating systems built on Mach, such as +Apple's Darwin. Without use of mmap, the allocator is +limited to a fixed size, statically preallocated heap (2MB by default), +and will fail to allocate objects above a certain size (just under 64K +by default). Use of mmap to circumvent these limitations requires an +explicit call. + +The entire interface to the AO_malloc package currently consists of: + +.TP +.B AO_malloc +Allocate an area of memory + +.TP +.B AO_free +Free a previously malloced memory area + +.TP +AO_malloc_enable_mmap +Enable mmap for large malloc chunks + + +.SH "SEE ALSO" +libatomic\-ops(3), libatomic\-stack(3) +.SH "AUTHOR" +This manual page was written by Ian Wienand , based on comments in the source code. It was written for the Debian project (but may be used by others). --- libatomic-ops-7.6.2.orig/debian/libatomic-ops-dev.docs +++ libatomic-ops-7.6.2/debian/libatomic-ops-dev.docs @@ -0,0 +1,3 @@ +doc/README.txt +doc/README_malloc.txt +doc/README_stack.txt --- libatomic-ops-7.6.2.orig/debian/libatomic-ops-dev.install +++ libatomic-ops-7.6.2/debian/libatomic-ops-dev.install @@ -0,0 +1,2 @@ +usr/include +usr/lib/*/ --- libatomic-ops-7.6.2.orig/debian/libatomic-ops-dev.manpages +++ libatomic-ops-7.6.2/debian/libatomic-ops-dev.manpages @@ -0,0 +1,3 @@ +debian/libatomic-malloc.3 +debian/libatomic-ops.3 +debian/libatomic-stack.3 --- libatomic-ops-7.6.2.orig/debian/libatomic-ops.3 +++ libatomic-ops-7.6.2/debian/libatomic-ops.3 @@ -0,0 +1,115 @@ +.\" Copyright 2005 Ian Wienand, Gelato@UNSW +.\" +.TH "LIBATOMIC-OPS" "3" "May 17, 2005" "Ian Wienand" "" +.SH "NAME" +libatomic\-ops \- Library providing user level atomic operations +.SH "SYNOPSIS" +.B #include +.sp +.B cc ... \-latomic_ops +.sp +Note that all operations have an additional barrier option that can be set explicitly. +.sp +.B void AO_load(AO_t *addr) +.br +.B void AO_store(AO_t *addr, AO_t val) +.sp +.B int AO_test_and_set (AO_t *addr) +.sp +.B AO_t AO_fetch_and_add(AO_t *addr, AO_t incr) +.br +.B AO_t AO_fetch_and_add1(AO_t *addr) +.br +.B AO_t AO_fetch_and_sub1(AO_t *addr) +.sp +.B void AO_or(AO_t *p, AO_t incr) +.br +.B int AO_compare_and_swap(AO_t *addr, AO_t old, AO_t new_val) +.SH "DESCRIPTION" +.B libatomic\-ops +offers a programming interface to a comprehensive range of atomic operations at user level. + +We define various atomic operations on memory in a machine\-specific way. Unfortunately, this is complicated by the fact that these may or may not be combined with various memory barriers. Thus the actual operations we define have the form +.B AO__ +for all plausible combinations of and . + +The valid barrier suffixes are +.TP +.B _release +Earlier operations may not be delayed past it. +.TP +.B _acquire +Later operations may not move ahead of it. +.TP +.B _read +Subsequent reads must follow this operation and preceding reads. +.TP +.B _write +Earlier writes precede both this operation and later writes. +.TP +.B _full +Ordered with respect to both earlier and later memops. +.TP +.B _release_write +Ordered with respect to earlier writes. +.TP +.B _acquire_read +Ordered with repsect to later reads. + +.LP +This of course results in a mild combinatorial explosion. + +The library will find the least expensive way to implement your operations on the +applicable hardware. In many cases that will involve, for example, +a stronger memory barrier, or a combination of hardware primitives. + +Note that atomicity guarantees are valid only if both readers and +writers use AO_ operations to access the shared value, while ordering +constraints are intended to apply all memory operations. +If a location can potentially be accessed simultaneously from +multiple threads, and one of those accesses may be a write access, +then all such accesses to that location should be +through AO_ primitives. However if AO_ operations enforce sufficient +ordering to ensure that a location x cannot be accessed concurrently, or can only +be read concurrently, then x can be accessed via ordinary references and assignments. + +All operations operate on an +.B AO_t +value, which is the natural word size for the architecture. + +.B AO_load +and +.B AO_store +load and store the specified pointer address. + +.B AO_test_and_set +atomically replaces an address with +.B AO_TS_SET +and returns the prior value. An +.B AO_TS_t location can be reset with the +.B AO_CLEAR +macro, which usually uses +.B AO_store_release + +.B AO_fetch_and_add +takes an address and a value to add. + +.B AO_fetch_and_add1 +and +.B AO_fetch_and_sub1 +are provided since they may have faster implemenations on some hardware + +.B AO_or +atomically ors an +.I AO_t +value into a memory location, but does not provide +access to the original + +.B AO_compare_and_swap +takes an address, an old value and a new value and returns an int. +.I non\-zero +indicates the compare and swap succeeded. +.SH "SEE ALSO" +libatomic\-stack(3), libatomic\-malloc(3) +.SH "AUTHOR" +This manual page was written by Ian Wienand , based on comments in the source code. It was written for the Debian project (but may be used by others). --- libatomic-ops-7.6.2.orig/debian/libatomic-stack.3 +++ libatomic-ops-7.6.2/debian/libatomic-stack.3 @@ -0,0 +1,95 @@ +.\" Copyright 2005 Ian Wienand, Gelato@UNSW +.\" +.TH "LIBATOMIC-STACK" "3" "June 2, 2005" "Ian Wienand" "" +.SH "NAME" +libatomic\-stack \- Library providing linked stack abstraction +.SH "SYNOPSIS" +.B #include +.sp +.B cc ... \-latomic_ops_gpl +.sp +Note that the AO_stack implementation is licensed under the GPL, unlike the lower level routines. + +.B void AO_stack_init(AO_stack_t *list); +.br +.B void AO_stack_push_release(AO_stack_t *list, AO_t *new_element); +.br +.B AO_t * AO_stack_pop_acquire(volatile AO_stack_t *list); +.SH "DESCRIPTION" +.B libatomic\-stack +defines a linked stack abstraction. Stacks may be accessed by multiple concurrent threads. +The implementation is 1\-lock\-free, i.e. it will continue to make progress if at most one thread +becomes inactive while operating on the data structure. + +This makes it safe to access these data structures from non\-reentrant +signal handlers, provided at most one non\-signal\-handler thread is +accessing the data structure at once. This latter condition can be +ensured by acquiring an ordinary lock around the non\-hndler accesses +to the data structure. + +We use a fully lock\-free implementation when the underlying hardware +makes that less expensive, i.e. when we have a double\-wide compare\-and\-swap +operation available. (The fully lock\-free implementation uses an AO_t\- +sized version count, and assumes it does not wrap during the time any +given operation is active. This seems reasonably safe on 32\-bit hardware, +and very safe on 64\-bit hardware.) If a fully lock\-free implementation +is used, the macro +.I AO_STACK_IS_LOCK_FREE +will be defined. + +The cleanest way to use these routines is probably to define the stack node +type with an initial +.I AO_t +link field, so that the conversion between the +link\-field pointer and the stack element pointer is just a compile\-time +cast. But other possibilities exist. (This would be cleaner in C++ with +templates.) + +A stack is represented by an AO_stack_t structure. (This is normally +2 or 3 times the size of a pointer.) It may be statically initialized +by setting it to +.I AO_STACK_INITIALIZER +, or dynamically initialized to +an empty stack with +.I AO_stack_init +. There are only three operations for +accessing stacks: + +.TP +.B AO_stack_init +Initalise a stack +.TP +.B AO_stack_push_release +Push new element onto the stack. +.TP +.B AO_stack_pop_acquire +Pop element off the stack. + +.LP +We require that the objects pushed as list elements remain addressable +as long as any push or pop operation are in progress. (It is OK for an object +to be "pop"ped off a stack and "deallocated" with a concurrent "pop" on +the same stack still in progress, but only if "deallocation" leaves the +object addressable. The second "pop" may still read the object, but +the value it reads will not matter.) + +We require that the headers ( +.I AO_stack +objects) remain allocated and +valid as long as any operations on them are still in\-flight. + +We also provide macros +.I AO_REAL_HEAD_PTR +that converts an +.I AO_stack_t +to a pointer to the link field in the next element, and +.I AO_REAL_NEXT_PTR +that converts a link field to a real, dereferencable, pointer to the link field +in the next element. This is intended only for debugging, or to traverse +the list after modification has ceased. There is otherwise no guarantee that +walking a stack using this macro will produce any kind of consistent +picture of the data structure. +.SH "SEE ALSO" +libatomic\-ops(3), libatomic\-malloc(3) +.SH "AUTHOR" +This manual page was written by Ian Wienand , based on comments in the source code. It was written for the Debian project (but may be used by others). --- libatomic-ops-7.6.2.orig/debian/patches/series +++ libatomic-ops-7.6.2/debian/patches/series @@ -0,0 +1,2 @@ + + --- libatomic-ops-7.6.2.orig/debian/rules +++ libatomic-ops-7.6.2/debian/rules @@ -0,0 +1,17 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/dpkg/architecture.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk +include /usr/share/cdbs/1/rules/autoreconf.mk + +ifeq (,$(findstring $(DEB_BUILD_ARCH), powerpc ppc64 ppc64el armel)) + DEB_MAKE_CHECK_TARGET := check +endif + +# use .install to pick out relevant stuff +DEB_DESTDIR = $(CURDIR)/debian/tmp + +# multiarch +DEB_CONFIGURE_EXTRA_FLAGS += --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)