summaryrefslogtreecommitdiff
path: root/libihash
AgeCommit message (Collapse)Author
2016-05-03libihash: enable fast insertions replacing tombstonesJustus Winter
* libihash/ihash.c (hurd_ihash_locp_add): Also replace tombstones.
2016-05-03libihash: fix corner caseJustus Winter
* libihash/ihash.c (hurd_ihash_locp_find): Set SLOT to NULL if the hash table has not been allocated.
2016-04-29libihash: rehash if effective load exceeds the thresholdJustus Winter
Previously, if a hash table was not growing anymore but entries were regularly replaced, the tombstones would accumulate slowing down lookups and insertions. A possible solution is to rehash the table if the effective load exceeds the configured threshold. The effective load also takes tombstones into account. * libihash/ihash.c (hurd_ihash_locp_add): Use the effective load. (hurd_ihash_add): Likewise. Use the load to decide whether we want to enlarge the table, otherwise we merely rehash.
2016-04-29libihash: keep track of free slotsJustus Winter
* libihash/ihash.c (hurd_ihash_init): Init new field 'nr_free'. (add_one): Decrement counter if a free slot is used. (hurd_ihash_locp_add): Likewise. (hurd_ihash_add): Reset counter on reallocation. * libihash/ihash.h (struct hurd_ihash): New field 'nr_free'. (hurd_ihash_get_effective_load): New function.
2016-04-29libihash: fix index computationJustus Winter
Previously, find_index would return a suboptimal slot if a tombstone was in the optimal slot. * libihash/ihash.c (find_index): Fix index computation.
2015-12-29fix compiler warnings in hurd/libihashFlavio Cruz
2015-11-29libihash: provide a general purpose hash algorithmJustus Winter
* libdiskfs/name-cache.c: Move the Murmur3 algorithm... * libihash/murmur3.c: ... here, and properly attribute the code. * libihash/ihash.h (hurd_ihash_hash32): New prototype. * libihash/Makefile (SRCS): Add new file.
2015-11-29libihash: fix item insertionJustus Winter
* libihash/ihash.c (find_index): Keep track and return the index where we could insert the item. (add_one): Use 'find_index'.
2015-11-29libihash: generalize the interface to support non-integer keysJustus Winter
* libihash/ihash.c (hash, compare): New functions that are used throughout libihash to hash and compare keys. (hurd_ihash_set_gki): New function. * libihash/ihash.h (hurd_ihash_fct_hash_t): New type for hash functions. (hurd_ihash_fct_cmp_t): New type for comparison functions. (struct hurd_ihash): New fields for hash and comparison functions. (HURD_IHASH_INITIALIZER_GKI): New static initializer. (hurd_ihash_set_gki): New prototype.
2015-11-29libihash: fix fast insertion corner caseJustus Winter
* libihash/ihash.c (hurd_ihash_locp_add): Fix insertion if the key doesn't match.
2015-11-29libihash: fix ill-devised locp lookup interfaceJustus Winter
* libihash/ihash.c (hurd_ihash_locp_find): Return both the item and the slot. * libihash/ihash.h (hurd_ihash_locp_find): Adjust prototype. (hurd_ihash_locp_value): Remove function.
2015-11-12libihash: prefer performance degradation over failureJustus Winter
* libihash/ihash.c (hurd_ihash_add): Add the item even though we are above the load factor if resizing failed.
2015-11-06libihash: optimize lookup-or-insert operationsJustus Winter
If libihash is used to implement a cache, a insertion is always preceeded by a lookup. hurd_ihash_add has to do the lookup again. Provide a new pair of functions, hurd_ihash_locp_add and hurd_ihash_locp_find, that can be used in combination to avoid the second lookup. * libihash/ihash.c (hurd_ihash_locp_add): New function using a location pointer... (hurd_ihash_locp_find): ... that has been returned by this function. * libihash/ihash.h (hurd_ihash_locp_add): New declaration. (hurd_ihash_locp_find): Likewise. (hurd_ihash_locp_value): New function.
2015-11-06libihash: add hurd_ihash_value_validJustus Winter
* libihash/ihash.h (hurd_ihash_value_valid): New function. * libihash/ihash.c (index_empty): Use hurd_ihash_value_valid.
2014-08-31libihash: fix comparison between signed and unsigned integerJustus Winter
* libihash/ihash.h (HURD_IHASH_ITERATE): Fix comparison between signed and unsigned integer expressions.
2014-05-26libihash: do not use an integer hash function by defaultJustus Winter
Recently libihash was changed to use an integer hash function on the keys in an attempt to reduce the rate of collisions (2d898893), which has long been assumed to be high. Richard Braun was kind enough to run some benchmarks. He observed: "1/ Using an extremely simple microbenchmark [1] that merely inserts keys, either random integers or sequential ones to match the way port names are managed, it seems that the previous code, despite its apparent flaws, did quite well. [1] http://darnassus.sceen.net/gitweb/rbraun/ihtest.git Using an integer hashing function actually reduces performance on the sequential integer test case. It makes sense because, considering a set of consecutive integers starting from 0, and a hash table that always has more slots than items, a modulo is a perfect hash function. Even when taking into account that only names for receive rights are normally managed with libihash, i.e. that keys aren't actually sequential, they are almost all equally distributed, leading to very few collisions. Therefore, as a third option, I've removed the hashing function, leaving only a fast modulo (an AND) and this variant provided the best raw results. 2/ I've also built hurd packages multiple times and got average build times with each variant (previous, new, new without hash function) and here are the results I obtained respectively : 52m59s, 52m31s, 52m22s." Do not use the integer hash function on the keys by default. * libihash/ihash.c (murmur3_mix32): Remove now unused function. (find_index): Use the fast division method to derive the index. (add_one): Likewise. Also, update the comment to reflect the current hashing method.
2014-05-22libihash: add hurd_ihash_get_loadJustus Winter
* libihash/ihash.c (hurd_ihash_add): Move the code computing the load factor of the hash table... * libihash/ihash.h (hurd_ihash_get_load): ... here, together with the comment describing the method and the rationale for chosing binary percent.
2014-05-22libihash: fix typoJustus Winter
* libihash/ihash.c (hurd_ihash_add): Fix typo.
2014-05-13libihash: use fast binary scaling to determine the loadJustus Winter
Expressing the maximum load in binary percent (where 128b% corresponds to 100%) allows us to use fast binary scaling to determine if the maximum load has been reached without losing precision. Furthermore, the previously used expression 'ht->nr_items * 100' overflows int at 2^25 (unsigned int at 2^26). When a hash table reached that limit, it would fail to resize and fill up the table. This change fixes that. * libihash/ihash.c (hurd_ihash_set_max_load): Update the comment. (hurd_ihash_add): Use fast binary scaling to determine the current load. * libihash/ihash.h (struct hurd_ihash): Update comment for max_load. (hurd_ihash_set_max_load): Update the comment.
2014-05-13libihash: use linear probing and fast modulo operationJustus Winter
libihash uses open addressing. Previously, quadratic probing in both directions was used to resolve collisions. Quadratic probing might result in a less efficient use of caches. Also, prime numbers of the form 4 * i + 3 were used as array sizes. This was used in combination with the integer modulo operation for hashing. It has been known for some time that libihash suffers from collisions, so a integer hash function is now applied to the keys to derive the index. Use linear probing instead. Also, use powers of two for the array sizes, so a bit mask can be used for the modulo operation. * libihash/ihash.c (ihash_sizes, ihash_nsizes): Remove. (find_index): Use linear probing and fast modulo operation. (add_one): Likewise. * libihash/ihash.h (HURD_IHASH_MIN_SIZE): New macro.
2014-05-13libihash: use an integer hash function on the keysJustus Winter
Use an integer hash function to derive the index from the key. This should reduce the number of collisions. * libihash/ihash.c (hash_int32): New function. (find_index): Use hash_int32 on the key to derive the index. (add_one): Likewise.
2014-05-13libihash: fix type of max_loadJustus Winter
Previously, int was used for the field max_load of struct hurd_ihash. There is no reason for this as far as I can tell. Furthermore, hurd_ihash_set_max_load takes an unsigned int max_load. * libihash/ihash.h (struct hurd_ihash): Use unsigned int for field max_load.
2014-05-13libihash: reduce the default maximum load factor to 75%Justus Winter
The performance of hash tables depend critically on a low number of hash collisions. As the table fills up, the chance of collisions necessarily raises. Previously, libihash resized the hash table when the load exceeded 80%. This seems a bit optimistic (e. g. java.util.Hashtable uses 75% as default). * libihash/ihash.h (HURD_IHASH_MAX_LOAD_DEFAULT): Set to 75.
2013-12-09libihash: remove dead codeJustus Winter
* libihash/ihash.c (hurd_ihash_add): Remove dead code.
2013-11-16Clean up the included header filesJustus Winter
* libihash/ihash.c: Clean up the included header files. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/canon-host.c: Likewise. * libshouldbeinlibc/fsysops.c: Likewise. * libshouldbeinlibc/idvec-auth.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/idvec.h: Likewise. * libshouldbeinlibc/localhost.c: Likewise. * libshouldbeinlibc/maptime.c: Likewise. * libshouldbeinlibc/nullauth.c: Likewise. * libshouldbeinlibc/portxlate.c: Likewise. * libshouldbeinlibc/shared-dom.c: Likewise. * libshouldbeinlibc/ugids-argp.c: Likewise. * libshouldbeinlibc/ugids-auth.c: Likewise. * libshouldbeinlibc/ugids-imply.c: Likewise. * libshouldbeinlibc/ugids-merge.c: Likewise. * libshouldbeinlibc/ugids-subtract.c: Likewise. * libshouldbeinlibc/ugids-verify-auth.c: Likewise. * libshouldbeinlibc/ugids-verify.c: Likewise. * libshouldbeinlibc/ugids.c: Likewise. * libshouldbeinlibc/ugids.h: Likewise. * libshouldbeinlibc/wire.c: Likewise.
2013-09-15libihash: add HURD_IHASH_ITERATE_ITEMS macroJustus Winter
Add a macro HURD_IHASH_ITERATE_ITEMS that iterates over all elements in the hash table making both the key and the value available. * libihash/ihash.h (HURD_IHASH_ITERATE_ITEMS): New macro.
2012-06-30Address gcc warningBob Ham
* ihash.c (ihash_add): Change type of i to unsigned int to address gcc warning.
2012-04-08Replace fragile manual »make dist« system with one based on »git archive«.Thomas Schwinge
* Makeconf (lndist): Remove target. (dist-hook, dist.tar): New targets. * Makefile (dist): Rewrite this target's as well as accompanying rules. (%-lndist, cp-linked-files, $(lf-inst)): Remove targets. (%.bz2, %.gz, %/dist-hook): New targets. (DISTFILES): Set. * doc/Makefile (DISTFILES): Set. * doc/Makefile (lndist, lndist-info-targets): Remove targets. * include/Makefile (lndist): Remove target. * libthreads/Makefile (lndist, lndist-i386-files, lndist-map-file): Remove targets. * pfinet/Makefile (lndist, lndist-linux-src-net-core-files) (lndist-linux-src-net-ethernet-files, lndist-linux-src-net-ipv4-files) (lndist-linux-src-net-ipv6-files, lndist-linux-src-asm-files) (lndist-linux-src-include-linux-files, lndist-linux-src-include-net-files) (lndist-linux-src-include-asm-files, lndist-glue-include-linux-files) (lndist-glue-include-asm-files): Remove targets. * auth/Makefile (LCLHDRS): Don't set. * boot/Makefile (LCLHDRS, DIST_FILES): Likewise. * bsdfsck/Makefile (LCLHDRS): Likewise. * config/Makefile (DIST_FILES): Likewise. * console-client/Makefile (LCLHDRS): Likewise. * console/Makefile (LCLHDRS, DIST_FILES): Likewise. * doc/Makefile (DIST_FILES): Likewise. * exec/Makefile (LCLHDRS, DIST_FILES): Likewise. * ext2fs/Makefile (LCLHDRS): Likewise. * fatfs/Makefile (LCLHDRS): Likewise. * ftpfs/Makefile (LCLHDRS): Likewise. * hostmux/Makefile (LCLHDRS): Likewise. * hurd/Makefile (DIST_FILES): Likewise. * include/Makefile (LCLHDRS): Likewise. * isofs/Makefile (LCLHDRS, DIST_FILES): Likewise. * libcons/Makefile (LCLHDRS): Likewise. * libdirmgt/Makefile (LCLHDRS): Likewise. * libdiskfs/Makefile (LCLHDRS): Likewise. * libfshelp/Makefile (LCLHDRS): Likewise. * libftpconn/Makefile (LCLHDRS): Likewise. * libihash/Makefile (LCLHDRS): Likewise. * libiohelp/Makefile (LCLHDRS): Likewise. * libnetfs/Makefile (LCLHDRS): Likewise. * libpager/Makefile (LCLHDRS): Likewise. * libpipe/Makefile (LCLHDRS): Likewise. * libports/Makefile (LCLHDRS): Likewise. * libps/Makefile (LCLHDRS): Likewise. * libshouldbeinlibc/Makefile (LCLHDRS): Likewise. * libstore/Makefile (LCLHDRS, DIST_FILES): Likewise. * libthreads/Makefile (LCLHDRS): Likewise. * libtreefs/Makefile (LCLHDRS): Likewise. * libtrivfs/Makefile (LCLHDRS): Likewise. * mach-defpager/Makefile (LCLHDRS): Likewise. * nfs/Makefile (LCLHDRS): Likewise. * nfsd/Makefile (LCLHDRS): Likewise. * pfinet/Makefile (LCLHDRS): Likewise. * pflocal/Makefile (LCLHDRS): Likewise. * proc/Makefile (LCLHDRS, DIST_FILES): Likewise. * release/Makefile (DIST_FILES): Likewise. * storeio/Makefile (LCLHDRS): Likewise. * sutils/Makefile (LCLHDRS): Likewise. * term/Makefile (LCLHDRS, DIST_FILES): Likewise. * tmpfs/Makefile (LCLHDRS): Likewise. * ufs-fsck/Makefile (LCLHDRS): Likewise. * ufs/Makefile (LCLHDRS): Likewise. * usermux/Makefile (LCLHDRS): Likewise. * utils/Makefile (LCLHDRS): Likewise.
2009-07-11Switch to the new ChangeLog style.Thomas Schwinge
* ChangeLog: Wipe out content, and add instructions about how to get it back. * auth/ChangeLog: Remove file. * benchmarks/ChangeLog: Likewise. * boot/ChangeLog: Likewise. * bsdfsck/ChangeLog: Likewise. * config/ChangeLog: Likewise. * console-client/ChangeLog: Likewise. * console/ChangeLog: Likewise. * daemons/ChangeLog: Likewise. * defpager/ChangeLog: Likewise. * doc/ChangeLog: Likewise. * exec/ChangeLog: Likewise. * ext2fs/ChangeLog: Likewise. * fatfs/ChangeLog: Likewise. * fstests/ChangeLog: Likewise. * ftpfs/ChangeLog: Likewise. * hostmux/ChangeLog: Likewise. * hurd/ChangeLog: Likewise. * include/ChangeLog: Likewise. * init/ChangeLog: Likewise. * isofs/ChangeLog: Likewise. * libcons/ChangeLog: Likewise. * libdirmgt/ChangeLog: Likewise. * libdiskfs/ChangeLog: Likewise. * libfshelp/ChangeLog: Likewise. * libftpconn/ChangeLog: Likewise. * libhurdbugaddr/ChangeLog: Likewise. * libihash/ChangeLog: Likewise. * libiohelp/ChangeLog: Likewise. * libnetfs/ChangeLog: Likewise. * libpager/ChangeLog: Likewise. * libpipe/ChangeLog: Likewise. * libports/ChangeLog: Likewise. * libps/ChangeLog: Likewise. * libshouldbeinlibc/ChangeLog: Likewise. * libstore/ChangeLog: Likewise. * libthreads/ChangeLog: Likewise. * libtrivfs/ChangeLog: Likewise. * login/ChangeLog: Likewise. * mach-defpager/ChangeLog: Likewise. * nfs/ChangeLog: Likewise. * nfsd/ChangeLog: Likewise. * pfinet/ChangeLog: Likewise. * pflocal/ChangeLog: Likewise. * proc/ChangeLog: Likewise. * release/ChangeLog: Likewise. * serverboot/ChangeLog: Likewise. * storeio/ChangeLog: Likewise. * sutils/ChangeLog: Likewise. * term/ChangeLog: Likewise. * tmpfs/ChangeLog: Likewise. * trans/ChangeLog: Likewise. * ufs-fsck/ChangeLog: Likewise. * ufs-utils/ChangeLog: Likewise. * ufs/ChangeLog: Likewise. * usermux/ChangeLog: Likewise. * utils/ChangeLog: Likewise.
2006-07-112006-07-11 Samuel Thibault <samuel.thibault@ens-lyon.org>Thomas Schwinge
* ihash.c (add_one): Cast VALUE with (hurd_ihash_locp_t *) instead of (hurd_ihash_locp_t).
2004-04-212004-04-21 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann
* ihash.h (HURD_IHASH_ITERATE): Don't use increment operator in assignment, but just add one. Reported by Ognyan Kulev.
2004-04-022004-04-02 Marco Gerards <metgerards@student.han.nl>Marco Gerards
* ihash.c (hurd_ihash_remove): Don't look for the index when the hashtable is empty. * ihash.h (HURD_IHASH_ITERATE): Doc fix.
2004-03-062004-03-07 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann
* ihash.h (HURD_IHASH_NO_LOCP): Change to INTPTR_MIN. (struct hurd_ihash): Change type of locp_offset from off_t to intptr_t. (hurd_ihash_init): Likewise in prototype. (hurd_ihash_create): Likewise in prototype. * ihash.c (hurd_ihash_init): Likewise in definition. (hurd_ihash_create): Likewise in definition.
2004-03-01auth/Marcus Brinkmann
2003-08-17 Marcus Brinkmann <marcus@gnu.org> * auth.c: Include <stddef.h>. (pending_users, pending_server): Change type to struct hurd_ihash, initialize with HURD_IHASH_INITIALIZER. (struct pending): Change type of member LOCP to hurd_ihash_locp_t. (S_auth_user_authenticate): Use hurd_ihash_* functions instead ihash_*. (S_auth_server_authenticate): Likewise. (main): Do not allocate the hash tables. console-client/ 2003-08-17 Marcus Brinkmann <marcus@gnu.org> * vga-dynafont.c: Include <stddef.h>. (struct mapped_character): Change type of LOCP to hurd_ihash_locp_t. (struct dynafont): Change type of CHARMAP to struct hurd_ihash. (dynafont_new): Use hurd_ihash_init instead of ihash_create. Remove variable ERR. Call hurd_ihash_add instead of ihash_add. (dynafont_free): Call hurd_ihash_destroy, no ihash_free. (dynafont_lookup_internal): Use hurd_ihash_find, not ihash_find. (dynafont_lookup_internal): Call hurd_ihash_locp_remove instead ihash_locp_remove, and hurd_ihash_add instead ihash_add. (dynafont_change_font): Likewise. Clean out LOCP if character is unmapped. ftpfs/ 2003-08-17 Marcus Brinkmann <marcus@gnu.org> * ftpfs.h: Include <hurd/ihash.h>. (struct ftpfs): Change type of INODE_MAPPINGS to struct hurd_ihash. (struct ftpfs_dir_entry): Change type of INODE_LOCP to hurd_ihash_locp_t. * node.c (ftpfs_create_node): Call hurd_ihash_add, not ihash_add. (netfs_node_norefs): Call hurd_ihash_locp_remove, not ihash_locp_remove. * fs.c: Include <stddef.h>. (ftpfs_create): Call hurd_ihash_init, not hurd_ihash_create. Call hurd_ihash_destroy on error. libihash/ 2003-08-17 Marcus Brinkmann <marcus@gnu.org> * ihash.c: Rewritten. * ihash.h: Rewritten. * Makefile (SRCS): Remove sizes.c. (LCLHDRS): Remove priv.h. * primes.c, sizes.c, priv.h: Files removed. 2003-08-17 Marcus Brinkmann <marcus@gnu.org> * ports.h (struct port_bucket): Change type of HTABLE to struct hurd_ihash. (struct port_info): Change type of HENTRY to hurd_ihash_locp_t. * lookup-port.c (ports_lookup_port): Use hurd_ihash_find instead ihash_find. * bucket-iterate.c (_ports_bucket_class_iterate): Use HURD_IHASH_ITERATE instead ihash_iterate. * inhibit-all-rpcs.c (ports_inhibit_all_rpcs): Likewise. * inhibit-bucket-rpcs.c (ports_inhibit_bucket_rpcs): Likewise. * create-internal.c (_ports_create_port_internal): Use hurd_ihash_add instead ihash_add. * import-port.c (ports_import_port): Likewise. * reallocate-from-external.c (ports_reallocate_from_external): Likewise. * reallocate-port.c (ports_reallocate_port): Likewise. * transfer-right.c (ports_transfer_right): Likewise. * create-bucket.c: Include <stddef.h>. (ports_create_bucket): Use hurd_ihash_init instead hurd_ihash_create. * class-iterate.c: Do not include <hurd/ihash.h>. * claim-right.c (ports_claim_right): Call hurd_ihash_locp_remove instead ihash_locp_remove. * complete-deallocate.c (_ports_complete_deallocate): Likewise. * destroy-right.c (ports_destroy_right): Likewise. * reallocate-from-external.c (ports_reallocate_from_external): Likewise. * reallocate-port.c (ports_reallocate_port): Likewise. * transfer-right.c (ports_transfer_right): Likewise. libps/ 2003-08-17 Marcus Brinkmann <marcus@gnu.org> * ps.h (struct ps_context): Change type of members procs, ttys, ttys_by_cttyid and users to struct hurd_ihash. * context.c (ps_context_create): Remove variables err_procs, err_ttys, err_ttys_by_cttyid and err_users. Use hurd_ihash_init instead of ihash_create. Call hurd_ihash_set_cleanup and the hurd_ihash_cleanup_t type instead of ihash_set_cleanup. (ps_context_free): Call hurd_ihash_destroy instead of ihash_free. (lookup): Call hurd_ihash_find instead ihash_find, hurd_ihash_add instead ihash_add. (ps_context_find_proc_stat): Take pointer of hash object. (ps_context_find_tty): Likewise. (ps_context_find_tty_by_cttyid): Likewise. (ps_context_find_user): Likewise. libpthread/ 2003-08-17 Marcus Brinkmann <marcus@gnu.org> * sysdeps/hurd/pt-key.h (PTHREAD_KEY_MEMBERS): Change type of THREAD_SPECIFICS to hurd_ihash_t. * sysdeps/hurd/pt-setspecific.c (pthread_setspecific): Call hurd_ihash_create instead ihash_create, and hurd_ihash_add instead ihash_add. * sysdeps/hurd/pt-getspecific.c (pthread_getspecific): Call hurd_ihash_find instead of ihash_find. * sysdeps/hurd/pt-destroy-specific.c (__pthread_destroy_specific): Call hurd_ihash_find instead of ihash_find, hurd_ihash_remove instead of ihash_remove, and hurd_ihash_free instead of ihash_free. proc/ 2003-08-17 Marcus Brinkmann <marcus@gnu.org> * proc.h: Include <hurd/ihash.h>. (struct proc): Change type of members p_pidhashloc and p_taskhashloc to hurd_ihash_locp_t. (struct pgrp): Likewise for pg_hashloc. (struct session): Likewise for s_hashloc. * hash.c: Change type of pghash, pidhash, taskhash and sidhash to struct hurd_ihash and initialize them with HURD_IHASH_INITIALIZER. Include stddef.h. (pid_find): Call hurd_ihash_find instead ihash_find. (pid_find_allow_zombie): Likewise. (task_find): Likewise. (task_find_nocreate): Likewise. (pgrp_find): Likewise. (session_find): Likewise. (add_proc_to_hash): Call hurd_ihash_add instead ihash_add. (add_pgrp_to_hash): Likewise. (add_session_to_hash): Likewise. (remove_pgrp_from_hash): Call hurd_ihash_locp_remove instead ihash_locp_remove, and provide hash table pointer. (remove_proc_from_hash): Likewise. (remove_session_from_hash): Likewise. (prociterate): Use HURD_IHASH_ITERATE instead ihash_iterate. trans/ 2003-08-17 Marcus Brinkmann <marcus@gnu.org> * fakeroot.c: Include <stddef.h>. (struct netnode): Change type of member idport_locp to hurd_ihash_locp_t. (idport_ihash): Change type to struct hurd_ihash and initialize with HURD_IHASH_INITIALIZER. (new_node): Call hurd_ihash_add instead of ihash_add. (netfs_node_norefs): Call hrd_ihash_locp_remove instead ihash_locp_remove. (netfs_S_dir_lookup): Call hurd_ihash_find instead ihash_find. utils/ 2003-08-17 Marcus Brinkmann <marcus@gnu.org> * rpctrace.c: Include <stddef.h>. (struct traced_info): Change type of LOCP to hurd_ihash_locp_t. (msgid_ihash): Change type to struct hurd_ihash, and initialize with HURD_IHASH_INITIALIZER, don't set cleanup here. (traced_names): Likewise. (main): Call hurd_ihash_set_cleanup for msgid_ihash. Don't create traced_names. (parse_msgid_list): Call hurd_ihash_add instead ihash_add. (new_send_wrapper): Likewise. (msgid_info): Likewise. Call hurd_ihash_find instead ihash_find. (rewrite_right): Likewise. (traced_dropweak): Call hurd_ihash_locp_remove instead ihash_locp_remove.
2001-08-15.Roland McGrath
2001-08-152001-08-15 Roland McGrath <roland@frob.com>Roland McGrath
* sizes.c: New file, a list of prime numbers useful for table sizes. * priv.h (_ihash_sizes, _ihash_nsizes): Declare. (_ihash_nextprime): Don't. * ihash.c (ihash_add): Select sizes from the _ihash_sizes array instead of using _ihash_nextprime. * Makefile: Clean up whitespace, reorder all the variable definitions. (SRCS): Remove primes.c, add sizes.c instead. (OBJS): Define dynamically.
1999-03-07.Roland McGrath
1999-03-071999-03-07 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* primes.c: Fix last change.
1999-03-05Fri Mar 5 17:13:04 1999 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* primes.c (_ihash_nextprime): Use a dynamically-sized array for `seive' instead of alloca, so that if we are looping we won't allocate more stack than necessary. Suggested by wesommer@mit.edu (Bill Sommerfeld).
1997-06-20.Miles Bader
1997-06-20(ihash_create):Miles Bader
Initialize CLEANUP & CLEANUP_ARG fields.
1996-07-17Initial revisionRoland McGrath
1996-04-25Undo last change.Roland McGrath
1996-04-25(ihash_find): Change return type to void **.Roland McGrath
1996-04-11Include "priv.h".Michael I. Bushnell
1996-04-11Initial revisionMichael I. Bushnell
1996-04-11(LCLHDRS): Add priv.h.Michael I. Bushnell
1996-04-11(ihash_add): New name of nextprime.Michael I. Bushnell
1996-04-11(_ihash_nextprime): Renamed from nextprime.c. All callers changed.Michael I. Bushnell
1996-03-07Include <spin_lock.h>.Michael I. Bushnell
(table_lock): New variable. (nextprime): Lock table_lock around operation of routine.