qcacmn: Add qdf wrapper for hash_for_each_safe
Add qdf wrapper API for hash_for_each_safe which iterates over a hashtable safe against removal of hash entry Change-Id: I89d8b6520a4bee583d44a771b4359ed287d0c2fa CRs-Fixed: 2528484
This commit is contained in:

committed by
nshrivas

parent
4ad877f928
commit
20bc724ca1
@@ -96,6 +96,18 @@
|
|||||||
#define qdf_ht_for_each(table, i, cursor, entry_field) \
|
#define qdf_ht_for_each(table, i, cursor, entry_field) \
|
||||||
__qdf_ht_for_each(table, i, cursor, entry_field)
|
__qdf_ht_for_each(table, i, cursor, entry_field)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_ht_for_each_safe() - iterate all entries in @table safe against removal
|
||||||
|
* of hash entry.
|
||||||
|
* @table: a non-pointer qdf_ht instance to iterate
|
||||||
|
* @i: int type cursor populated with the bucket index
|
||||||
|
* @tmp: a &struct used for temporary storage
|
||||||
|
* @cursor: container struct pointer populated with each iteration
|
||||||
|
* @entry_field: name of the entry field in the entry container struct
|
||||||
|
*/
|
||||||
|
#define qdf_ht_for_each_safe(table, i, tmp, cursor, entry_field) \
|
||||||
|
__qdf_ht_for_each_safe(table, i, tmp, cursor, entry_field)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_ht_for_each_in_bucket() - iterate entries in the bucket for @key
|
* qdf_ht_for_each_in_bucket() - iterate entries in the bucket for @key
|
||||||
* @table: a non-pointer qdf_ht instance to iterate
|
* @table: a non-pointer qdf_ht instance to iterate
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -47,4 +47,7 @@ do { \
|
|||||||
break; \
|
break; \
|
||||||
} while (false)
|
} while (false)
|
||||||
|
|
||||||
|
#define __qdf_ht_for_each_safe(table, i, tmp, cursor, entry_field) \
|
||||||
|
hash_for_each_safe(table, i, tmp, cursor, entry_field)
|
||||||
|
|
||||||
#endif /* __I_QDF_HASHTABLE_H */
|
#endif /* __I_QDF_HASHTABLE_H */
|
||||||
|
Reference in New Issue
Block a user