ObjFW  Diff

Differences From Artifact [309e66c1ae]:

  • File src/atomic.h — part of check-in [6b15bb229e] at 2013-06-03 15:20:48 on branch trunk — atomic.h: Fix several issues.

    * of_atomic_cmpswap_*: Clobber eax by adding it as an (unused) output,
    so the compiler resets eax (e.g. when used in a loop). (Adding it
    to the input and clobber list is lot legal!)
    * Don't dereference the pointer passed using "m"(*p) twice.
    * Fix some code for ILP64 systems (it seems there is no architecture
    using it, though, as it even contained syntax errors).
    * Use __asm__ __volatile__ just to be sure.

    Thanks to Florian Zeitz for pointing out most of these issues! (user: js, size: 16407) [annotate] [blame] [check-ins using]

To Artifact [b04aa21809]:


1
2
3
4
5
6
7
8
9
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.

|







1
2
3
4
5
6
7
8
9
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.