Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
209e9c43
Commit
209e9c43
authored
Jan 28, 2008
by
Jesper Nilsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CRIS v32: Adjust arch-v32/atomic.h for new spinlock/rwlock infrastructure
parent
e52c2c72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
include/asm-cris/arch-v32/atomic.h
include/asm-cris/arch-v32/atomic.h
+5
-5
No files found.
include/asm-cris/arch-v32/atomic.h
View file @
209e9c43
#ifndef __ASM_CRIS_ARCH_ATOMIC__
#define __ASM_CRIS_ARCH_ATOMIC__
#include <
asm/system
.h>
#include <
linux/spinlock_types
.h>
extern
void
cris_spin_unlock
(
void
*
l
,
int
val
);
extern
void
cris_spin_lock
(
void
*
l
);
...
...
@@ -18,15 +18,15 @@ extern spinlock_t cris_atomic_locks[];
#define cris_atomic_save(addr, flags) \
local_irq_save(flags); \
cris_spin_lock((void
*)&cris_atomic_locks[HASH_ADDR(addr)].
lock);
cris_spin_lock((void
*)&cris_atomic_locks[HASH_ADDR(addr)].raw_lock.s
lock);
#define cris_atomic_restore(addr, flags) \
{ \
spinlock_t *lock = (void*)&cris_atomic_locks[HASH_ADDR(addr)]; \
__asm__ volatile ("move.d %1,%0" \
: "=m" (lock->
lock) \
: "r" (1) \
: "memory"); \
: "=m" (lock->raw_lock.s
lock) \
: "r" (1) \
: "memory"); \
local_irq_restore(flags); \
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment