Re: [PATCH rdma-core 05/11] libbnxtre: Allow apps to poll for flushed completions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 28, 2017 at 05:13:36PM -0500, Devesh Sharma wrote:
> +#ifndef __BNXT_RE_LIST_H__
> +#define __BNXT_RE_LIST_H__
> +
> +struct bnxt_re_list_node {
> +	uint8_t valid;
> +	struct bnxt_re_list_node *next, *prev;
> +};
> +
> +struct bnxt_re_list_head {
> +	struct bnxt_re_list_node node;
> +	pthread_mutex_t lock;
> +};
> +
> +#define DBLY_LIST_HEAD_INIT(name) {{true, &name.node, &name.node},\
> +				    PTHREAD_MUTEX_INITIALIZER}
> +
> +#define DBLY_LIST_HEAD(name) \
> +	struct bnxt_re_list_head name = DBLY_LIST_HEAD_INIT(name) \
> +
> +#define INIT_DBLY_LIST_NODE(ptr) do {	\
> +	(ptr)->next = (ptr); (ptr)->prev = (ptr); (ptr)->valid = false;	\
> +} while (0)
> +
> +#define INIT_DBLY_LIST_HEAD(ptr) INIT_DBLY_LIST_NODE(ptr.node)
> +
> +static inline void __list_add_node(struct bnxt_re_list_node *new,
> +				   struct bnxt_re_list_node *prev,
> +				   struct bnxt_re_list_node *next)
> +{
> +	next->prev = new;
> +	new->next = next;
> +	new->prev = prev;
> +	prev->next = new;
> +}

Nope on this entire file, use ccan/list.h

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux