Skip to content

Fix multithread #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/commons/collections/include/pdc_hash_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
extern "C" {
#endif

#ifdef ENABLE_MULTITHREAD
#include "mercury_thread_mutex.h"

extern hg_thread_mutex_t hash_table_new_mutex_g;
#endif

/**
* A hash table structure.
*/
Expand Down
4 changes: 4 additions & 0 deletions src/commons/collections/pdc_hash_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "alloc-testing.h"
#endif

#ifdef ENABLE_MULTITHREAD
hg_thread_mutex_t hash_table_new_mutex_g;
#endif

struct _HashTableEntry {
HashTablePair pair;
HashTableEntry *next;
Expand Down
1 change: 0 additions & 1 deletion src/server/include/pdc_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ extern int use_sqlite3_g;
/*****************************/
/* Library-private Variables */
/*****************************/
hg_thread_mutex_t hash_table_new_mutex_g;
hg_thread_mutex_t pdc_client_addr_mutex_g;
hg_thread_mutex_t pdc_metadata_hash_table_mutex_g;
hg_thread_mutex_t pdc_container_hash_table_mutex_g;
Expand Down
Loading