diff options
author | Neal H. Walfield <neal@gnu.org> | 2008-12-17 13:55:11 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@gnu.org> | 2008-12-17 13:55:11 +0100 |
commit | a858b6d4273835eaf8027275d542c75f210855a3 (patch) | |
tree | 625b6c6fb0bbe9b17abe421d428bffd231c5187d | |
parent | ee961b372e1d403d3fb205b5887025ccc72c0a87 (diff) |
Replace use of l4_msb, etc. with vg_msb.
libpthread/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* signal/signal-dispatch.c: Include <viengoos/math.h>.
(signal_dispatch): Use vg_lsb64, not l4_lsb64.
* sysdeps/viengoos/pt-sigstate.c (__pthread_sigstate): Likewise.
* signal/sigwaitinfo.c (sigwaitinfo): Use vg_msb64, not l4_msb64.
libviengoos/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* t-addr.c: Don't include <l4/math.h>. Include <viengoos/math.h>.
(main): Use vg_msb64 instead of l4_msb64 and vg_lsb64 instead of
l4_lsb64.
viengoos/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* zalloc.c: Don't include <l4/math.h>. Include <viengoos/math.h>.
(zfree): Use vg_msb instead of l4_msb.
* ager.c (update_stats): Likewise.
-rw-r--r-- | libpthread/ChangeLog | 7 | ||||
-rw-r--r-- | libpthread/signal/signal-dispatch.c | 4 | ||||
-rw-r--r-- | libpthread/signal/sigwaitinfo.c | 2 | ||||
-rw-r--r-- | libpthread/sysdeps/viengoos/pt-sigstate.c | 3 | ||||
-rw-r--r-- | libviengoos/ChangeLog | 6 | ||||
-rw-r--r-- | libviengoos/t-addr.c | 6 | ||||
-rw-r--r-- | viengoos/ChangeLog | 6 | ||||
-rw-r--r-- | viengoos/ager.c | 4 | ||||
-rw-r--r-- | viengoos/zalloc.c | 8 |
9 files changed, 34 insertions, 12 deletions
diff --git a/libpthread/ChangeLog b/libpthread/ChangeLog index 65ba0d4..8afbae0 100644 --- a/libpthread/ChangeLog +++ b/libpthread/ChangeLog @@ -1,5 +1,12 @@ 2008-12-17 Neal H. Walfield <neal@gnu.org> + * signal/signal-dispatch.c: Include <viengoos/math.h>. + (signal_dispatch): Use vg_lsb64, not l4_lsb64. + * sysdeps/viengoos/pt-sigstate.c (__pthread_sigstate): Likewise. + * signal/sigwaitinfo.c (sigwaitinfo): Use vg_msb64, not l4_msb64. + +2008-12-17 Neal H. Walfield <neal@gnu.org> + * sysdeps/viengoos/bits/pthread-np.h (pthread_hurd_utcb_np): Return a struct hurd_utcb *, not a struct vg_utcb *. * sysdeps/viengoos/pt-sysdep.h (PTHREAD_SYSDEP_MEMBERS): Change diff --git a/libpthread/signal/signal-dispatch.c b/libpthread/signal/signal-dispatch.c index 40440b7..6fafcc1 100644 --- a/libpthread/signal/signal-dispatch.c +++ b/libpthread/signal/signal-dispatch.c @@ -20,6 +20,8 @@ #include "sig-internal.h" +#include <viengoos/math.h> + /* This is the signal handler entry point. A thread is forced into this state when it receives a signal. We need to save the thread's state and then invoke the high-level signal dispatcher. SS->LOCK @@ -107,7 +109,7 @@ signal_dispatch (struct signal_state *ss, siginfo_t *si) sigset_t pending = ~ss->blocked & ss->pending; if (! pending) pending = ~ss->blocked & process_pending; - signo = l4_lsb64 (pending); + signo = vg_lsb64 (pending); } while (signo); diff --git a/libpthread/signal/sigwaitinfo.c b/libpthread/signal/sigwaitinfo.c index 1b47079..dea3ef4 100644 --- a/libpthread/signal/sigwaitinfo.c +++ b/libpthread/signal/sigwaitinfo.c @@ -43,7 +43,7 @@ sigwaitinfo (const sigset_t *restrict set, siginfo_t *restrict info) assert (extant); - int signo = l4_msb64 (extant); + int signo = vg_msb64 (extant); if (info) { diff --git a/libpthread/sysdeps/viengoos/pt-sigstate.c b/libpthread/sysdeps/viengoos/pt-sigstate.c index 66dd08c..7894d99 100644 --- a/libpthread/sysdeps/viengoos/pt-sigstate.c +++ b/libpthread/sysdeps/viengoos/pt-sigstate.c @@ -20,6 +20,7 @@ #include <pthread.h> #include <assert.h> #include <signal.h> +#include <viengoos/math.h> #include <pt-internal.h> @@ -75,7 +76,7 @@ __pthread_sigstate (struct __pthread *thread, int how, pthread_mutex_unlock (&ss->lock); if (extant) - raise (l4_lsb64 (extant)); + raise (vg_lsb64 (extant)); return 0; } diff --git a/libviengoos/ChangeLog b/libviengoos/ChangeLog index 5991b0a..f112761 100644 --- a/libviengoos/ChangeLog +++ b/libviengoos/ChangeLog @@ -1,5 +1,11 @@ 2008-12-17 Neal H. Walfield <neal@gnu.org> + * t-addr.c: Don't include <l4/math.h>. Include <viengoos/math.h>. + (main): Use vg_msb64 instead of l4_msb64 and vg_lsb64 instead of + l4_lsb64. + +2008-12-17 Neal H. Walfield <neal@gnu.org> + * viengoos/math.h: Move from ../hurd. Rewrite to use gcc builtin functions. * Makefile.am (viengoos_headers): Add math.h. diff --git a/libviengoos/t-addr.c b/libviengoos/t-addr.c index 1c2494d..a69eb83 100644 --- a/libviengoos/t-addr.c +++ b/libviengoos/t-addr.c @@ -22,7 +22,7 @@ #include <hurd/types.h> #include <viengoos/addr.h> #include <assert.h> -#include <l4/math.h> +#include <viengoos/math.h> char *program_name = "t-addr"; int output_debug = 0; @@ -51,8 +51,8 @@ main (int argc, char *argv[]) { addr = addr_extend (addr, 1, 1); assert (addr_depth (addr) == i); - assert (l4_msb64 (addr_prefix (addr)) == ADDR_BITS); - assert (l4_lsb64 (addr_prefix (addr)) == ADDR_BITS - i + 1); + assert (vg_msb64 (addr_prefix (addr)) == ADDR_BITS); + assert (vg_lsb64 (addr_prefix (addr)) == ADDR_BITS - i + 1); } printf ("ok.\n"); diff --git a/viengoos/ChangeLog b/viengoos/ChangeLog index f172696..7bcefa1 100644 --- a/viengoos/ChangeLog +++ b/viengoos/ChangeLog @@ -1,5 +1,11 @@ 2008-12-17 Neal H. Walfield <neal@gnu.org> + * zalloc.c: Don't include <l4/math.h>. Include <viengoos/math.h>. + (zfree): Use vg_msb instead of l4_msb. + * ager.c (update_stats): Likewise. + +2008-12-17 Neal H. Walfield <neal@gnu.org> + * server.c: Don't include "rm.h" but <viengoos/misc.h>. 2008-12-17 Neal H. Walfield <neal@gnu.org> diff --git a/viengoos/ager.c b/viengoos/ager.c index d078252..1e08fec 100644 --- a/viengoos/ager.c +++ b/viengoos/ager.c @@ -332,7 +332,7 @@ update_stats (void) avail -= dec; ACTIVITY_STATS (activity)->damping_factor - = -l4_msb (1024 * 1024 / PAGESIZE); + = -vg_msb (1024 * 1024 / PAGESIZE); } else if (activity->frames_total > 7 * (frames / 8)) /* The allocated amount is close to the available frames. @@ -341,7 +341,7 @@ update_stats (void) else /* It can allocate. */ ACTIVITY_STATS (activity)->damping_factor - = l4_msb (1024 * 1024 / PAGESIZE); + = vg_msb (1024 * 1024 / PAGESIZE); ACTIVITY_STATS (activity)->available_local = avail; } diff --git a/viengoos/zalloc.c b/viengoos/zalloc.c index fd4aa55..e9411f3 100644 --- a/viengoos/zalloc.c +++ b/viengoos/zalloc.c @@ -27,7 +27,7 @@ #include <string.h> #include <stdint.h> #include <hurd/stddef.h> -#include <l4/math.h> +#include <viengoos/math.h> #include "zalloc.h" @@ -195,8 +195,8 @@ zfree (uintptr_t block, uintptr_t size) do { /* All blocks must be stored aligned to their size. */ - unsigned int block_align = l4_lsb (block) - 1; - unsigned int size_align = l4_msb (size) - 1; + unsigned int block_align = vg_lsb (block) - 1; + unsigned int size_align = vg_msb (size) - 1; unsigned int zone_nr = (block_align < size_align ? block_align : size_align) - PAGESIZE_LOG2; @@ -232,7 +232,7 @@ zalloc_internal (uintptr_t size) case where only one bit is set. To adjust for this border case, we subtract one from the argument to the MSB function). Calculate the zone number by subtracting page shift. */ - zone_nr = l4_msb (size - 1) - PAGESIZE_LOG2; + zone_nr = vg_msb (size - 1) - PAGESIZE_LOG2; /* Find the smallest zone which fits the request and has memory available. */ |