Commit 97d2afdb authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Tomasz Zawadzki
Browse files

queue: add SLIST_SWAP



Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Id2216fe758be225d59fb97efa83e50466aae5813
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21289


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
parent a2ec28e4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -258,6 +258,12 @@ struct { \
		swap_tmp->field.le_prev = &LIST_FIRST((head2));		\
} while (0)

#define SLIST_SWAP(head1, head2, type) do {				\
	struct type *swap_tmp = SLIST_FIRST((head1));			\
	SLIST_FIRST((head1)) = SLIST_FIRST((head2));			\
	SLIST_FIRST((head2)) = swap_tmp;				\
} while (0)

/*
 * Tail queue functions.
 */