[PATCH] atomic operations for ppc
fgsch at lodoss.net
Mon Mar 19 18:50:10 PDT 2012
On Wed, Mar 14, 2012 at 2:13 AM, Federico Schwindt <fgsch at lodoss.net> wrote:
> On Tue, Mar 13, 2012 at 10:19 PM, Jason Evans <jasone at canonware.com> wrote:
>> On Mar 13, 2012, at 2:52 PM, Ingvar Hagelund wrote:
>>> This patch should, if it is correct, add the functions atomic_add_uint32 and atomic_sub_uint32 that are missing on some platforms, at least RHEL5/ppc. With this patch, jemalloc may be updated to 2.2.x also in the EPEL5 repositories.
>> I'm a bit confused about where the code actually originated. A quick web search finds hits both in APR (Apache license) and Boost.
> I'm checking the licensing with boost and apr.
> I will let you know when I have the confirmation but it looks like it
> first appeared in apr 1.0.0 under Apache License 2.0 so that might be
> a problem.
I've contacted both apr and boost respective developers and they have
confirmed the code comes from apr.
Now, considering that there are a limited number of ways to implement
an atomic operation in assembler, the size of the code and the amount
of almost identical implementations around (i.e ,  or ) it'd
be very difficult (if not impossible) to copyright the code.
If you truly want to be on the safe side removing the comments and
changing the variable names would be enough.
More information about the jemalloc-discuss