~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to erts/include/internal/ppc32/spinlock.h

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * %CopyrightBegin%
3
3
 *
4
 
 * Copyright Ericsson AB 2005-2010. All Rights Reserved.
 
4
 * Copyright Ericsson AB 2005-2011. All Rights Reserved.
5
5
 *
6
6
 * The contents of this file are subject to the Erlang Public License,
7
7
 * Version 1.1, (the "License"); you may not use this file except in
23
23
 *
24
24
 * Based on the examples in Appendix E of Motorola's
25
25
 * "Programming Environments Manual For 32-Bit Implementations
26
 
 * of the PowerPC Architecture". Uses eieio instead of sync
27
 
 * in the unlock sequence, as suggested in the manual.
 
26
 * of the PowerPC Architecture".
28
27
 */
29
28
#ifndef ETHREAD_PPC_SPINLOCK_H
30
29
#define ETHREAD_PPC_SPINLOCK_H
31
30
 
 
31
#define ETHR_HAVE_NATIVE_SPINLOCKS 1
 
32
#define ETHR_NATIVE_SPINLOCK_IMPL "ethread"
 
33
 
32
34
/* Unlocked if zero, locked if non-zero. */
33
35
typedef struct {
34
36
    volatile unsigned int lock;
45
47
static ETHR_INLINE void
46
48
ethr_native_spin_unlock(ethr_native_spinlock_t *lock)
47
49
{
48
 
    __asm__ __volatile__("eieio" : : : "memory");
 
50
    ETHR_MEMBAR(ETHR_LoadStore|ETHR_StoreStore);
49
51
    lock->lock = 0;
50
52
}
51
53