merge from open-source master
This commit is contained in:
commit
cdeb4c8afa
@ -129,8 +129,18 @@ __atomic_inc:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* r0(new) r1(addr) -> r0(old) */
|
/* r0(new) r1(addr) -> r0(old) */
|
||||||
|
/* replaced swp instruction with ldrex/strex for ARMv6 & ARMv7 */
|
||||||
__atomic_swap:
|
__atomic_swap:
|
||||||
|
#if defined (_ARM_HAVE_LDREX_STREX)
|
||||||
|
1: ldrex r2, [r1]
|
||||||
|
strex r3, r0, [r1]
|
||||||
|
teq r3, #0
|
||||||
|
bne 1b
|
||||||
|
mov r0, r2
|
||||||
|
mcr p15, 0, r0, c7, c10, 5 /* or, use dmb */
|
||||||
|
#else
|
||||||
swp r0, r0, [r1]
|
swp r0, r0, [r1]
|
||||||
|
#endif
|
||||||
bx lr
|
bx lr
|
||||||
|
|
||||||
/* __futex_wait(*ftx, val, *timespec) */
|
/* __futex_wait(*ftx, val, *timespec) */
|
||||||
|
@ -149,6 +149,13 @@
|
|||||||
# define __ARM_HAVE_PC_INTERWORK
|
# define __ARM_HAVE_PC_INTERWORK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* define _ARM_HAVE_LDREX_STREX for ARMv6 and ARMv7 architecure to be
|
||||||
|
* used in replacement of depricated swp instruction
|
||||||
|
*/
|
||||||
|
#if __ARM_ARCH__ >= 6
|
||||||
|
# define _ARM_HAVE_LDREX_STREX
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Assembly-only macros */
|
/* Assembly-only macros */
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/endian.h>
|
#include <endian.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include "servent.h"
|
#include "servent.h"
|
||||||
#include "services.h"
|
#include "services.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user