+#define __RANGE_RWLOCK_INITIALIZER(start, last) { \
+ .node = { \
+ .start = (start) \
+ ,.last = (last) \
+ } \
+ }
Hi Davidlohr,
This macro doesn't expand correctly because the field name ".start" is
replaced by the start parameter. Should rather be :
#define __RANGE_RWLOCK_INITIALIZER(__start, __last) { \
.node = { \
.start = (__start) \
,.last = (__last) \
} \
}
By the way, should the other fields set as in __range_rwlock_init() ?
+/*^^^^
+ * lock for writing
+ */
+void range_write_lock(struct range_rwlock_tree *tree, struct range_rwlock *lock);
+int range_write_lock_interruptible(struct range_rwlock_tree *tree,
+ struct range_rwlock *lock);
+int range_write_lock_killable(struct range_rwlock_tree *tree,
+ struct range_rwlock *lock);
+int range_read_trylock(struct range_rwlock_tree *tree, struct range_rwlock *lock);
range_write_trylock(...) isn't it ?