OpenAFS Master Repository branch, master, updated. BP-openafs-stable-1_8_x-104-gc16423e

Gerrit Code Review gerrit@openafs.org
Tue, 15 May 2018 18:39:54 -0400


The following commit has been merged in the master branch:
commit c16423ec4e678e5cb01dc99f4115065f8ef6caf7
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date:   Mon May 14 16:46:26 2018 -0300

    rx: fix atomics on darwin
    
    As described by commit b2a21422129ca1eeeb5ea1a1f7b08b537fd2a9f7, the API
    used for atomic operations in kernel space is not the same as the one
    used in user space. To fix this problem, the commit mentioned above
    introduced macros to correct the name of these functions in kernel space.
    Unfortunately, the return value of the functions used in kernel space is
    not the same as the ones used in user space. Generally speaking, the
    kernel space atomic functions return the original value of the variable
    received as an argument before the operation in question. On the other
    hand, the user space atomic functions return the new value, after the
    operation has been performed. To fix this problem, this commit provides
    a new set of inline functions (only used in kernel space) with the
    expected return values.
    
    Also, in order to get the inline implementations of the OSAtomic
    interfaces in terms of the <stdatomic.h> primitives, commit
    74f837fd943ddfa20d349a83d6286a0183cb4663 defines OSATOMIC_USE_INLINED
    on OS X 10.12. However, the definition of this macro only affects the
    user space legacy interfaces for atomic operations. The kernel space
    interfaces for atomics are not deprecated and OSATOMIC_USE_INLINED does
    not affect these functions. To fix this problem, only define
    OSATOMIC_USE_INLINED in user space (OS X 10.12+).
    
    Change-Id: Ia6cbc76daa7068625dc9f6dff385d0568d6503bd
    Reviewed-on: https://gerrit.openafs.org/13063
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

 src/rx/rx_atomic.h |   46 +++++++++++++++++++++++++++++++++++-----------
 1 files changed, 35 insertions(+), 11 deletions(-)

-- 
OpenAFS Master Repository