Changeset 18e0a6c in mainline for arch/ia32/src/atomic.S
- Timestamp:
- 2005-06-09T23:43:45Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 74df77d
- Parents:
- d896525
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/atomic.S
rd896525 r18e0a6c 29 29 .text 30 30 31 .global atomic_inc32 atomic_inc:33 pushl %ebx34 movl 8(%esp),%ebx35 #ifdef __SMP__36 lock incl (%ebx)37 #else38 incl (%ebx)39 #endif40 popl %ebx41 ret42 43 .global atomic_dec44 atomic_dec:45 pushl %ebx46 movl 8(%esp),%ebx47 #ifdef __SMP__48 lock decl (%ebx)49 #else50 decl (%ebx)51 #endif52 popl %ebx53 ret54 55 56 31 #ifdef __SMP__ 57 32 58 59 .global test_and_set60 33 .global spinlock_arch 61 62 test_and_set:63 pushl %ebx64 65 movl 8(%esp),%ebx66 movl $1,%eax67 xchgl %eax,(%ebx) # xchg implicitly turns on the LOCK signal68 69 popl %ebx70 ret71 72 34 73 35 #
Note:
See TracChangeset
for help on using the changeset viewer.