summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2008-02-08 10:01:41 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-04-07 23:13:32 +0200
commit79abfdbc8a51615e3c820387c935d3fe8546ea7d (patch)
treea2c98046ff1de1ea74f28f9d800033b92811b166
parentb8eff95e439ec9f12dc748882e3769a080722475 (diff)
libhurd-ihash/
2008-02-08 Neal H. Walfield <neal@gnu.org> * ihash.h: Include <bits/wordsize.h>. (hurd_ihash_key64_t): New definition. (struct _hurd_ihash_item64): New structure. (struct hurd_ihash): Change items's type void *. [__WORDSIZE == 32]: Add field large. (_HURD_IHASH_LARGE): New macro. (HURD_IHASH_INITIALIZER): Take additional argument large. Use it. (hurd_ihash_init): Take additional argument large. (hurd_ihash_buffer_size): Likewise. (hurd_ihash_init_with_buffer): Likewise. (hurd_ihash_create): Likewise. (hurd_ihash_replace): Change key's type to hurd_ihash_key64_t. (hurd_ihash_add): Likewise. (hurd_ihash_find): Likewise. (hurd_ihash_remove): Likewise. (HURD_IHASH_ITERATE): Rewrite to properly handle both 32- and 64-bit keys. * ihash.c (ITEM): New macro. (VALUE): Likewise. (KEY): Likewise. (ITEM_SIZE): Likewise. (index_empty): Use the above macros rather than accessing HT->ITEMS directly. (index_valid): Likewise and change key's type to a hurd_ihash_key64_t. (find_index): Likewise. (replace_one): Likewise. (hurd_ihash_replace): Likewise. (hurd_ihash_find): Likewise. (hurd_ihash_remove): Likewise. (hurd_ihash_init_internal): Take additional argument large. Use it. (hurd_ihash_init): Likewise. (hurd_ihash_init_with_buffer): Likewise. (hurd_ihash_create): Likewise. (hurd_ihash_buffer_size): Likewise. * t-ihash.c: Include <assert.h>. (main): Expect that TEST_LARGE is defined. Use it when calling hurd_ihash_init. If true, add some tests with 64-bit keys. * Makefile.am (TESTS): Add t-ihash64. (check_PROGRAMS): Likewise. (t_ihash_CPPFLAGS): Add -DTEST_LARGE=false. (t_ihash64_SOURCES): New variable. (t_ihash64_CPPFLAGS): Likewise. viengoos/ 2008-02-08 Neal H. Walfield <neal@gnu.org> * thread.c (thread_init): Update use of hurd_ihash_init_with_buffer to be consistent with new API. * object.c (object_init): Likewise. libpthread/ 2008-02-08 Neal H. Walfield <neal@gnu.org> * sysdeps/hurd/pt-setspecific.c (pthread_setspecific): Update use of hurd_ihash_create to be consistent with API changes.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/hurd/pt-setspecific.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b26189a..f221393 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-02-08 Neal H. Walfield <neal@gnu.org>
+
+ * sysdeps/hurd/pt-setspecific.c (pthread_setspecific): Update use
+ of hurd_ihash_create to be consistent with API changes.
+
2008-01-23 Neal H. Walfield <neal@gnu.org>
* Makefile.am (AM_CPPFLAGS): Add -I$(LIBC)/include.
diff --git a/sysdeps/hurd/pt-setspecific.c b/sysdeps/hurd/pt-setspecific.c
index 89ca4d7..d2d1157 100644
--- a/sysdeps/hurd/pt-setspecific.c
+++ b/sysdeps/hurd/pt-setspecific.c
@@ -1,5 +1,5 @@
/* pthread_setspecific. Generic version.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,7 +30,8 @@ pthread_setspecific (pthread_key_t key, const void *value)
if (! self->thread_specifics)
{
- err = hurd_ihash_create (&self->thread_specifics, HURD_IHASH_NO_LOCP);
+ err = hurd_ihash_create (&self->thread_specifics, false,
+ HURD_IHASH_NO_LOCP);
if (err)
return ENOMEM;
}