X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=include%2Furcu%2Frculfhash.h;h=8385cd90a1d9f03c641bd2216bf6e852773ccbb9;hb=d3d3857f678627e7bbfb5a8d6f3bc15cd2a694d9;hp=16f7d1cdaa433d47f72aecd31a20b3a99cc2a8fe;hpb=e58cdfcfc3884d003b7a0b097fd02c6969382edc;p=urcu.git diff --git a/include/urcu/rculfhash.h b/include/urcu/rculfhash.h index 16f7d1c..8385cd9 100644 --- a/include/urcu/rculfhash.h +++ b/include/urcu/rculfhash.h @@ -1,28 +1,14 @@ +// SPDX-FileCopyrightText: 2011 Mathieu Desnoyers +// SPDX-FileCopyrightText: 2011 Lai Jiangshan +// +// SPDX-License-Identifier: LGPL-2.1-or-later + #ifndef _URCU_RCULFHASH_H #define _URCU_RCULFHASH_H /* - * urcu/rculfhash.h - * * Userspace RCU library - Lock-Free RCU Hash Table * - * Copyright 2011 - Mathieu Desnoyers - * Copyright 2011 - Lai Jiangshan - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * * For use with URCU_API_MAP (API mapping of liburcu), include this file * _after_ including your URCU flavor. */ @@ -545,10 +531,7 @@ void cds_lfht_resize(struct cds_lfht *ht, unsigned long new_size); node = cds_lfht_iter_get_node(iter)) #define cds_lfht_entry(ptr, type, member) \ - ({ \ - caa_unqual_scalar_typeof(ptr) ___ptr = (ptr); \ - ___ptr ? caa_container_of(___ptr, type, member) : NULL; \ - }) + caa_container_of_check_null(ptr, type, member) #define cds_lfht_for_each_entry(ht, iter, pos, member) \ for (cds_lfht_first(ht, iter), \