X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Frculfhash-internal.h;h=081f32e63551f57631f87478a12e37b0c25e2533;hb=81270292c23ff28aba1abd9a65f0624b657de82b;hp=e17210b8624cf7fd370ef88f591174e100085548;hpb=014775106c60f02818ca755b331f887030bd440f;p=userspace-rcu.git diff --git a/src/rculfhash-internal.h b/src/rculfhash-internal.h index e17210b..081f32e 100644 --- a/src/rculfhash-internal.h +++ b/src/rculfhash-internal.h @@ -1,27 +1,13 @@ +// SPDX-FileCopyrightText: 2011 Mathieu Desnoyers +// SPDX-FileCopyrightText: 2011 Lai Jiangshan +// +// SPDX-License-Identifier: LGPL-2.1-or-later + #ifndef _URCU_RCULFHASH_INTERNAL_H #define _URCU_RCULFHASH_INTERNAL_H /* - * urcu/rculfhash-internal.h - * * Internal header for 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 */ #include @@ -29,6 +15,8 @@ #include #include +#include "workqueue.h" + #ifdef DEBUG #define dbg_printf(fmt, args...) printf("[debug rculfhash] " fmt, ## args) #else @@ -82,11 +70,13 @@ struct cds_lfht { * therefore cause grace-period deadlock if we hold off RCU G.P. * completion. */ - pthread_mutex_t resize_mutex; /* resize mutex: add/del mutex */ - pthread_attr_t *resize_attr; /* Resize threads attributes */ + pthread_mutex_t resize_mutex; /* resize mutex: add/del mutex */ + pthread_attr_t *caller_resize_attr; /* resize threads attributes from lfht_new caller */ + pthread_attr_t resize_attr; unsigned int in_progress_destroy; unsigned long resize_target; int resize_initiated; + struct urcu_work destroy_work; /* * Variables needed for add and remove fast-paths.