Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/list.h
Show All 22 Lines | |||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _LINUX_LIST_H_ | #ifndef _LINUXKPI_LINUX_LIST_H_ | ||||
#define _LINUX_LIST_H_ | #define _LINUXKPI_LINUX_LIST_H_ | ||||
#ifndef _STANDALONE | #ifndef _STANDALONE | ||||
/* | /* | ||||
* Since LIST_HEAD conflicts with the Linux definition we must include any | * Since LIST_HEAD conflicts with the Linux definition we must include any | ||||
* FreeBSD header which requires it here so it is resolved with the correct | * FreeBSD header which requires it here so it is resolved with the correct | ||||
* definition prior to the undef. | * definition prior to the undef. | ||||
*/ | */ | ||||
#include <linux/types.h> | #include <linux/types.h> | ||||
▲ Show 20 Lines • Show All 454 Lines • ▼ Show 20 Lines | |||||
#define hlist_for_each_entry_safe(pos, n, head, member) \ | #define hlist_for_each_entry_safe(pos, n, head, member) \ | ||||
for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member); \ | for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member); \ | ||||
(pos) && ({ n = (pos)->member.next; 1; }); \ | (pos) && ({ n = (pos)->member.next; 1; }); \ | ||||
pos = hlist_entry_safe(n, typeof(*(pos)), member)) | pos = hlist_entry_safe(n, typeof(*(pos)), member)) | ||||
extern void list_sort(void *priv, struct list_head *head, int (*cmp)(void *priv, | extern void list_sort(void *priv, struct list_head *head, int (*cmp)(void *priv, | ||||
struct list_head *a, struct list_head *b)); | struct list_head *a, struct list_head *b)); | ||||
#endif /* _LINUX_LIST_H_ */ | #endif /* _LINUXKPI_LINUX_LIST_H_ */ |