hash.h (e87183c2b5ab1f55ebad2f260a7eb4d31549ce25) hash.h (2c53040f018b6c36a46eec75b9b937aaa5f78e6d)
1/* Copyright (C) 2006-2012 B.A.T.M.A.N. contributors:
2 *
3 * Simon Wunderlich, Marek Lindner
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public
7 * License as published by the Free Software Foundation.
8 *

--- 67 unchanged lines hidden (view full) ---

76 free_cb(node, arg);
77 }
78 spin_unlock_bh(list_lock);
79 }
80
81 batadv_hash_destroy(hash);
82}
83
1/* Copyright (C) 2006-2012 B.A.T.M.A.N. contributors:
2 *
3 * Simon Wunderlich, Marek Lindner
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public
7 * License as published by the Free Software Foundation.
8 *

--- 67 unchanged lines hidden (view full) ---

76 free_cb(node, arg);
77 }
78 spin_unlock_bh(list_lock);
79 }
80
81 batadv_hash_destroy(hash);
82}
83
84/* hash_add - adds data to the hashtable
84/**
85 * batadv_hash_add - adds data to the hashtable
85 * @hash: storage hash table
86 * @compare: callback to determine if 2 hash elements are identical
87 * @choose: callback calculating the hash index
88 * @data: data passed to the aforementioned callbacks as argument
89 * @data_node: to be added element
90 *
91 * Returns 0 on success, 1 if the element already is in the hash
92 * and -1 on error.

--- 74 unchanged lines hidden ---
86 * @hash: storage hash table
87 * @compare: callback to determine if 2 hash elements are identical
88 * @choose: callback calculating the hash index
89 * @data: data passed to the aforementioned callbacks as argument
90 * @data_node: to be added element
91 *
92 * Returns 0 on success, 1 if the element already is in the hash
93 * and -1 on error.

--- 74 unchanged lines hidden ---