projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change API
[urcu.git]
/
urcu.h
diff --git
a/urcu.h
b/urcu.h
index 9431da547bfcc8245d07969de426ac33c7fe3d2d..b6b5c7b039e359225d947afb91a29a2f25ba6a3c 100644
(file)
--- a/
urcu.h
+++ b/
urcu.h
@@
-77,33
+77,29
@@
static inline int get_urcu_qparity(void)
}
/*
}
/*
- *
returns urcu_parity
.
+ *
urcu_parity should be declared on the caller's stack
.
*/
*/
-static inline
int rcu_read_lock(void
)
+static inline
void rcu_read_lock(int *urcu_parity
)
{
{
-
int
urcu_parity = get_urcu_qparity();
- urcu_active_readers[urcu_parity]++;
+
*
urcu_parity = get_urcu_qparity();
+ urcu_active_readers[
*
urcu_parity]++;
/*
* Increment active readers count before accessing the pointer.
* See force_mb_all_threads().
*/
barrier();
/*
* Increment active readers count before accessing the pointer.
* See force_mb_all_threads().
*/
barrier();
- return urcu_parity;
}
}
-static inline void rcu_read_unlock(int urcu_parity)
+static inline void rcu_read_unlock(int
*
urcu_parity)
{
barrier();
/*
* Finish using rcu before decrementing the pointer.
* See force_mb_all_threads().
*/
{
barrier();
/*
* Finish using rcu before decrementing the pointer.
* See force_mb_all_threads().
*/
- urcu_active_readers[urcu_parity]--;
+ urcu_active_readers[
*
urcu_parity]--;
}
}
-extern void rcu_write_lock(void);
-extern void rcu_write_unlock(void);
-
extern void *urcu_publish_content(void **ptr, void *new);
/*
extern void *urcu_publish_content(void **ptr, void *new);
/*
This page took
0.025712 seconds
and
4
git commands to generate.