Changeset 371bd7d in mainline for uspace/lib/c/arch/ppc32/include
- Timestamp:
- 2010-03-27T09:22:17Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 36a75a2
- Parents:
- cd82bb1 (diff), eaf22d4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/lib/c/arch/ppc32/include
- Files:
-
- 2 added
- 12 moved
-
atomic.h (moved) (moved from uspace/lib/libc/arch/ppc32/include/atomic.h ) (6 diffs)
-
config.h (moved) (moved from uspace/lib/libc/arch/ppc32/include/config.h )
-
ddi.h (moved) (moved from uspace/lib/libc/arch/ppc32/include/ddi.h )
-
faddr.h (moved) (moved from uspace/lib/libc/arch/ppc32/include/faddr.h )
-
fibril.h (moved) (moved from uspace/lib/libc/arch/ppc32/include/fibril.h )
-
inttypes.h (added)
-
istate.h (added)
-
limits.h (moved) (moved from uspace/lib/libc/arch/ppc32/include/limits.h ) (2 diffs)
-
regname.h (moved) (moved from uspace/lib/libc/arch/ppc32/include/regname.h )
-
stackarg.h (moved) (moved from uspace/lib/libc/arch/ppc32/include/stackarg.h )
-
syscall.h (moved) (moved from uspace/lib/libc/arch/ppc32/include/syscall.h )
-
thread.h (moved) (moved from uspace/lib/libc/arch/ppc32/include/thread.h )
-
tls.h (moved) (moved from uspace/lib/libc/arch/ppc32/include/tls.h )
-
types.h (moved) (moved from uspace/lib/libc/arch/ppc32/include/types.h ) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ppc32/include/atomic.h
rcd82bb1 r371bd7d 27 27 */ 28 28 29 /** @addtogroup libcppc32 29 /** @addtogroup libcppc32 30 30 * @{ 31 31 */ … … 36 36 #define LIBC_ppc32_ATOMIC_H_ 37 37 38 #define LIBC_ARCH_ATOMIC_H_ 39 40 #include <atomicdflt.h> 41 38 42 static inline void atomic_inc(atomic_t *val) 39 43 { 40 longtmp;41 44 atomic_count_t tmp; 45 42 46 asm volatile ( 43 47 "1:\n" … … 46 50 "stwcx. %0, 0, %2\n" 47 51 "bne- 1b" 48 : "=&r" (tmp), "=m" (val->count) 49 : "r" (&val->count), "m" (val->count) 50 : "cc"); 52 : "=&r" (tmp), 53 "=m" (val->count) 54 : "r" (&val->count), 55 "m" (val->count) 56 : "cc" 57 ); 51 58 } 52 59 53 60 static inline void atomic_dec(atomic_t *val) 54 61 { 55 longtmp;56 62 atomic_count_t tmp; 63 57 64 asm volatile ( 58 65 "1:\n" 59 66 "lwarx %0, 0, %2\n" 60 67 "addic %0, %0, -1\n" 61 "stwcx. %0, 0, %2\n"68 "stwcx. %0, 0, %2\n" 62 69 "bne- 1b" 63 : "=&r" (tmp), "=m" (val->count) 64 : "r" (&val->count), "m" (val->count) 65 : "cc"); 70 : "=&r" (tmp), 71 "=m" (val->count) 72 : "r" (&val->count), 73 "m" (val->count) 74 : "cc" 75 ); 66 76 } 67 77 68 static inline longatomic_postinc(atomic_t *val)78 static inline atomic_count_t atomic_postinc(atomic_t *val) 69 79 { 70 80 atomic_inc(val); … … 72 82 } 73 83 74 static inline longatomic_postdec(atomic_t *val)84 static inline atomic_count_t atomic_postdec(atomic_t *val) 75 85 { 76 86 atomic_dec(val); … … 78 88 } 79 89 80 static inline longatomic_preinc(atomic_t *val)90 static inline atomic_count_t atomic_preinc(atomic_t *val) 81 91 { 82 92 atomic_inc(val); … … 84 94 } 85 95 86 static inline longatomic_predec(atomic_t *val)96 static inline atomic_count_t atomic_predec(atomic_t *val) 87 97 { 88 98 atomic_dec(val); -
uspace/lib/c/arch/ppc32/include/limits.h
rcd82bb1 r371bd7d 27 27 */ 28 28 29 /** @addtogroup libcppc32 29 /** @addtogroup libcppc32 30 30 * @{ 31 31 */ … … 41 41 #define ULONG_MAX MAX_UINT32 42 42 43 #define SIZE_MIN MIN_UINT32 44 #define SIZE_MAX MAX_UINT32 45 #define SSIZE_MIN MIN_INT32 46 #define SSIZE_MAX MAX_INT32 47 43 48 #endif 44 49 -
uspace/lib/c/arch/ppc32/include/types.h
rcd82bb1 r371bd7d 27 27 */ 28 28 29 /** @addtogroup libcppc32 29 /** @addtogroup libcppc32 30 30 * @{ 31 31 */ … … 35 35 #ifndef LIBC_ppc32_TYPES_H_ 36 36 #define LIBC_ppc32_TYPES_H_ 37 38 #define __32_BITS__ 37 39 38 40 typedef unsigned int sysarg_t; … … 52 54 53 55 typedef uint32_t uintptr_t; 56 typedef uint32_t atomic_count_t; 57 typedef int32_t atomic_signed_t; 54 58 55 59 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
