Commit 40095952 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] provide uniproc write_trylock()

Patch from Oleg Drokin <green@namesys.com>, Nikita Danilov <Nikita@Namesys.COM>

There is no uniprocessor definition of _raw_write_trylock(), so
write_trylock() doesn't work on UP.
parent 23a37cf9
...@@ -179,6 +179,7 @@ typedef struct { ...@@ -179,6 +179,7 @@ typedef struct {
#define _raw_read_unlock(lock) do { (void)(lock); } while(0) #define _raw_read_unlock(lock) do { (void)(lock); } while(0)
#define _raw_write_lock(lock) do { (void)(lock); } while(0) #define _raw_write_lock(lock) do { (void)(lock); } while(0)
#define _raw_write_unlock(lock) do { (void)(lock); } while(0) #define _raw_write_unlock(lock) do { (void)(lock); } while(0)
#define _raw_write_trylock(lock) ({ (void)(lock); (1); })
#endif /* !SMP */ #endif /* !SMP */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment