projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add hlist_bl_lock/unlock helpers
[cascardo/linux.git]
/
include
/
linux
/
list_bl.h
diff --git
a/include/linux/list_bl.h
b/include/linux/list_bl.h
index
5bad17d
..
31f9d75
100644
(file)
--- a/
include/linux/list_bl.h
+++ b/
include/linux/list_bl.h
@@
-2,6
+2,7
@@
#define _LINUX_LIST_BL_H
#include <linux/list.h>
#define _LINUX_LIST_BL_H
#include <linux/list.h>
+#include <linux/bit_spinlock.h>
/*
* Special version of lists, where head of the list has a lock in the lowest
/*
* Special version of lists, where head of the list has a lock in the lowest
@@
-114,6
+115,16
@@
static inline void hlist_bl_del_init(struct hlist_bl_node *n)
}
}
}
}
+static inline void hlist_bl_lock(struct hlist_bl_head *b)
+{
+ bit_spin_lock(0, (unsigned long *)b);
+}
+
+static inline void hlist_bl_unlock(struct hlist_bl_head *b)
+{
+ __bit_spin_unlock(0, (unsigned long *)b);
+}
+
/**
* hlist_bl_for_each_entry - iterate over list of given type
* @tpos: the type * to use as a loop cursor.
/**
* hlist_bl_for_each_entry - iterate over list of given type
* @tpos: the type * to use as a loop cursor.