summaryrefslogtreecommitdiff
path: root/viengoos
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2009-01-20 04:14:13 +0100
committerNeal H. Walfield <neal@gnu.org>2009-01-20 04:52:44 +0100
commitbb56eacd336ec224676f1864f83c86dde15d0e3c (patch)
treecf557b22773a840eb935b938b97eb0b9fa58a3b0 /viengoos
parentb58d7bb88e34ef005ce157c08c6eda6ead63e0e9 (diff)
Use correct printf format specifiers.
2009-01-20 Neal H. Walfield <neal@gnu.org> * activity.c (activity_destroy): Use correct printf format specifiers. * memory.c: Include <inttypes.h>. (memory_reserve): Use correct printf format specifiers. (memory_reserve_dump): Likewise. (memory_is_reserved): Likewise. (memory_add): Likewise. * object.c (memory_object_alloc): Likewise. (memory_object_destroy): Likewise. (folio_object_alloc): Likewise. * thread.c (thread_activate): Likewise.
Diffstat (limited to 'viengoos')
-rw-r--r--viengoos/ChangeLog14
-rw-r--r--viengoos/activity.c4
-rw-r--r--viengoos/memory.c23
-rw-r--r--viengoos/object.c11
-rw-r--r--viengoos/thread.c7
5 files changed, 40 insertions, 19 deletions
diff --git a/viengoos/ChangeLog b/viengoos/ChangeLog
index 9a2719a..aaf6252 100644
--- a/viengoos/ChangeLog
+++ b/viengoos/ChangeLog
@@ -1,5 +1,19 @@
2009-01-20 Neal H. Walfield <neal@gnu.org>
+ * activity.c (activity_destroy): Use correct printf format
+ specifiers.
+ * memory.c: Include <inttypes.h>.
+ (memory_reserve): Use correct printf format specifiers.
+ (memory_reserve_dump): Likewise.
+ (memory_is_reserved): Likewise.
+ (memory_add): Likewise.
+ * object.c (memory_object_alloc): Likewise.
+ (memory_object_destroy): Likewise.
+ (folio_object_alloc): Likewise.
+ * thread.c (thread_activate): Likewise.
+
+2009-01-20 Neal H. Walfield <neal@gnu.org>
+
* zalloc.c (ZONE_SIZE): Correct computation.
2009-01-20 Neal H. Walfield <neal@gnu.org>
diff --git a/viengoos/activity.c b/viengoos/activity.c
index 730f024..9c31d10 100644
--- a/viengoos/activity.c
+++ b/viengoos/activity.c
@@ -228,7 +228,7 @@ activity_destroy (struct activity *activity, struct activity *victim)
do_debug (1)
if (victim->frames_total != count || victim->frames_local != count)
{
- debug (0, "activity (%llx), total = %d, local: %d, count: %d",
+ debug (0, "activity (" VG_OID_FMT "), total = %d, local: %d, count: %d",
object_to_object_desc ((struct vg_object *) victim)->oid,
victim->frames_total, victim->frames_local, count);
activity_dump (root_activity);
@@ -459,7 +459,7 @@ activity_dump (struct activity *activity)
{
do_debug (5)
{
- printf ("Available memory: %d (%d%%); laundry: %d\n",
+ printf ("Available memory: %"PRIdPTR" (%"PRIdPTR"%%); laundry: %d\n",
zalloc_memory + available_list_count (&available),
(100 * (zalloc_memory + available_list_count (&available))) /
memory_total,
diff --git a/viengoos/memory.c b/viengoos/memory.c
index 4ef7288..8c4c140 100644
--- a/viengoos/memory.c
+++ b/viengoos/memory.c
@@ -25,6 +25,7 @@
#include "zalloc.h"
#include <string.h>
+#include <inttypes.h>
#include <l4.h>
#include <hurd/btree.h>
@@ -88,14 +89,16 @@ memory_reserve (uintptr_t start, uintptr_t end,
struct region region = { start, end };
- debug (5, "Reserving region 0x%x-0x%x (%d)", start, end, type);
+ debug (5, "Reserving region 0x%"PRIxPTR"-0x%"PRIxPTR" (%d)",
+ start, end, type);
/* Check for overlap. */
struct reservation *overlap
= hurd_btree_reservation_find (&reservations, &region);
if (overlap)
{
- debug (5, "Region 0x%x-0x%x overlaps with region 0x%x-0x%x",
+ debug (5, "Region 0x%"PRIxPTR"-0x%"PRIxPTR" overlaps "
+ "with region 0x%"PRIxPTR"-0x%"PRIxPTR,
start, end, overlap->region.start, overlap->region.end);
return false;
}
@@ -129,7 +132,7 @@ memory_reserve (uintptr_t start, uintptr_t end,
&& right->type == type)
/* We can coalesce with RIGHT. */
{
- debug (5, "Coalescing with region 0x%x-0x%x",
+ debug (5, "Coalescing with region 0x%"PRIxPTR"-0x%"PRIxPTR,
right->region.start, right->region.end);
right->region.start = start;
coalesced = 1;
@@ -141,7 +144,7 @@ memory_reserve (uintptr_t start, uintptr_t end,
&& left->type == type)
/* We can coalesce with LEFT. */
{
- debug (5, "Coalescing with region 0x%x-0x%x",
+ debug (5, "Coalescing with region 0x%"PRIxPTR"-0x%"PRIxPTR,
left->region.start, left->region.end);
if (right)
@@ -192,7 +195,7 @@ memory_reserve_dump (void)
struct reservation *r;
for (r = hurd_btree_reservation_first (&reservations);
r; r = hurd_btree_reservation_next (r))
- debug (3, " 0x%x-0x%x", r->region.start, r->region.end);
+ debug (3, " 0x%"PRIxPTR"-0x%"PRIxPTR"", r->region.start, r->region.end);
}
bool
@@ -219,7 +222,8 @@ memory_is_reserved (uintptr_t start, uintptr_t end,
}
while (prev && prev->region.end > start);
- debug (5, "Region 0x%x-0x%x overlaps with reserved region 0x%x-0x%x",
+ debug (5, "Region 0x%"PRIxPTR"-0x%"PRIxPTR" overlaps "
+ "with reserved region 0x%"PRIxPTR"-0x%"PRIxPTR,
start, end, overlap->region.start, overlap->region.end);
*start_reservation
@@ -237,7 +241,8 @@ memory_add (uintptr_t start, uintptr_t end)
assert ((start & (PAGESIZE - 1)) == 0);
assert ((end & (PAGESIZE - 1)) == (PAGESIZE - 1));
- debug (5, "Request to add physical memory 0x%x-0x%x", start, end);
+ debug (5, "Request to add physical memory 0x%"PRIxPTR"-0x%"PRIxPTR"",
+ start, end);
if (start == 0)
/* Just drop the page at address 0. */
@@ -258,13 +263,13 @@ memory_add (uintptr_t start, uintptr_t end)
/* Round the start of the reservation down. */
{
start_reservation &= ~(PAGESIZE - 1);
- debug (5, "Not adding reserved memory 0x%x-0x%x",
+ debug (5, "Not adding reserved memory 0x%"PRIxPTR"-0x%"PRIxPTR"",
start_reservation, end_reservation);
}
if (start_reservation - start > 0)
{
- debug (5, "Adding physical memory 0x%x-0x%x",
+ debug (5, "Adding physical memory 0x%"PRIxPTR"-0x%"PRIxPTR"",
start, start_reservation - 1);
zfree (start, start_reservation - start);
diff --git a/viengoos/object.c b/viengoos/object.c
index ab7e52d..99437c6 100644
--- a/viengoos/object.c
+++ b/viengoos/object.c
@@ -110,7 +110,8 @@ memory_object_alloc (struct activity *activity,
vg_oid_t oid, uintptr_t version,
struct vg_object_policy policy)
{
- debug (5, "Allocating %llx(%d), %s", oid, version, vg_cap_type_string (type));
+ debug (5, "Allocating "VG_OID_FMT"(%d), %s",
+ oid, version, vg_cap_type_string (type));
assert (activity || ! root_activity);
assert (type != vg_cap_void);
@@ -178,7 +179,7 @@ memory_object_destroy (struct activity *activity, struct vg_object *object)
objects_folio_offset (object))),
vg_cap_type_string (desc->type));
- debug (5, "Destroy %s at 0x%llx (object %d)",
+ debug (5, "Destroy %s at "VG_OID_FMT" (object %d)",
vg_cap_type_string (desc->type), desc->oid,
((uintptr_t) desc - (uintptr_t) object_descs) / sizeof (*desc));
@@ -544,15 +545,15 @@ folio_object_alloc (struct activity *activity,
switch (vg_folio_object_type (folio, idx))
{
case vg_cap_activity_control:
- debug (4, "Destroying activity at %llx", oid);
+ debug (4, "Destroying activity at "VG_OID_FMT, oid);
activity_destroy (activity, (struct activity *) object);
break;
case vg_cap_thread:
- debug (4, "Destroying thread object at %llx", oid);
+ debug (4, "Destroying thread object at "VG_OID_FMT, oid);
thread_deinit (activity, (struct thread *) object);
break;
case vg_cap_messenger:
- debug (4, "Destroying messenger object at %llx", oid);
+ debug (4, "Destroying messenger object at "VG_OID_FMT, oid);
messenger_destroy (activity, (struct messenger *) object);
break;
default:
diff --git a/viengoos/thread.c b/viengoos/thread.c
index 2e3a98b..7c22430 100644
--- a/viengoos/thread.c
+++ b/viengoos/thread.c
@@ -599,11 +599,12 @@ thread_raise_exception (struct activity *activity,
{
struct messenger *handler
= (struct messenger *) vg_cap_to_object (activity,
- &thread->exception_messenger);
+ &thread->exception_messenger);
if (! handler)
{
backtrace_print ();
- debug (0, "Thread %x has no exception handler.", thread->tid);
+ debug (0, "Thread "VG_THREAD_ID_FMT" has no exception handler.",
+ thread->tid);
}
else if (object_type ((struct vg_object *) handler) != vg_cap_messenger)
debug (0, "%s is not a valid exception handler.",
@@ -624,7 +625,7 @@ thread_deliver_pending (struct activity *activity,
= (struct vg_utcb *) vg_cap_to_object (activity, &thread->utcb);
if (! utcb)
{
- debug (0, "Malformed thread (%x): no utcb",
+ debug (0, "Malformed thread ("VG_THREAD_ID_FMT"): no utcb",
thread->tid);
return;
}