[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] Hurd branch, master, updated. v0.5-452-gb2ae574
From: |
Justus Winter |
Subject: |
[SCM] Hurd branch, master, updated. v0.5-452-gb2ae574 |
Date: |
Mon, 29 Sep 2014 16:12:16 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hurd".
The branch, master has been updated
via b2ae574d39adfe283c61a3ec0c766e8780f345af (commit)
from 02c47da17b716bfff20bfafe2d5958b2b720ff49 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b2ae574d39adfe283c61a3ec0c766e8780f345af
Author: Justus Winter <address@hidden>
Date: Sat May 3 03:53:41 2014 +0200
libports: use a global hash table for the lookups
Previously, libports used a hash table per port bucket. This makes
looking up a port difficult if one does not know the port bucket, as
one has to iterate over all buckets and do a hash table lookup each.
Having to iterate over the buckets makes it necessary to keep a list
of all buckets, which has to be updated and protected by a lock as
well.
Also, the current code in _ports_bucket_class_iterate iterates over
the hash table associated with the bucket given. When
ports_class_iterate calls this common function, it obtains a reference
to the bucket from one of the ports in the given class. This will not
work if a class contains ports in different port buckets. This
limitation is not documented as far as I can see. Again, having to
maintain this list has its cost and requires serialization.
Use a global hash table for lookups instead. Keep the per-bucket hash
tables for efficient iteration over buckets. Furthermore, serialize
access to all hash tables using a separate lock. Remove the linked
lists of all buckets and all ports in a class.
* libports/bucket-iterate.c (ports_bucket_iterate): Acquire
_ports_htable_lock. Also, generalize ports_bucket_iterate so that it
takes a pointer to a hash table as first argument.
(ports_bucket_iterate): Ajust call to former function accordingly.
* libports/class-iterate.c (ports_class_iterate): Just call the
generalized _ports_bucket_class_iterate with the global hash table as
argument.
* libports/ports.h (struct port_info): Remove the port class links.
(struct port_bucket): Remove the hash table, and the all buckets link.
(_ports_all_buckets): Remove declaration.
(_ports_htable): New global hash table.
(_ports_htable_lock): Protected by this lock.
* libports/claim-right.c: Adjust accordingly.
* libports/complete-deallocate.c: Likewise.
* libports/create-bucket.c: Likewise.
* libports/create-class.c: Likewise.
* libports/create-internal.c: Likewise.
* libports/destroy-right.c: Likewise.
* libports/import-port.c: Likewise.
* libports/lookup-port.c: Likewise.
* libports/reallocate-from-external.c: Likewise.
* libports/reallocate-port.c: Likewise.
* libports/transfer-right.c: Likewise.
* libports/inhibit-all-rpcs.c: Iterate over the hash table.
* libports/inhibit-bucket-rpcs.c: Likewise, but filter using bucket.
* libports/inhibit-class-rpcs.c: Likewise, but filter using class.
* libports/init.c (_ports_htable): Initialize.
(_ports_htable_lock): Likewise.
-----------------------------------------------------------------------
Summary of changes:
libports/bucket-iterate.c | 14 +++++++++-----
libports/claim-right.c | 5 ++++-
libports/class-iterate.c | 10 +---------
libports/complete-deallocate.c | 7 +++----
libports/create-bucket.c | 6 ------
libports/create-class.c | 1 -
libports/create-internal.c | 19 +++++++++++++------
libports/destroy-right.c | 5 +++--
libports/import-port.c | 19 +++++++++++++------
libports/inhibit-all-rpcs.c | 27 +++++++++++++--------------
libports/inhibit-bucket-rpcs.c | 3 ++-
libports/inhibit-class-rpcs.c | 27 ++++++++++++++++++---------
libports/init.c | 7 ++++++-
libports/lookup-port.c | 23 +++++++++--------------
libports/ports.h | 22 +++++++++++++++++-----
libports/reallocate-from-external.c | 15 +++++++++++----
libports/reallocate-port.c | 9 ++++++++-
libports/transfer-right.c | 18 ++++++++++++++----
18 files changed, 144 insertions(+), 93 deletions(-)
hooks/post-receive
--
Hurd
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] Hurd branch, master, updated. v0.5-452-gb2ae574,
Justus Winter <=