|
19 | 19 | */
|
20 | 20 |
|
21 | 21 | #include "internal.h"
|
| 22 | +#include <inttypes.h> |
22 | 23 |
|
23 | 24 | #ifndef DISPATCH_IO_DEBUG
|
24 | 25 | #define DISPATCH_IO_DEBUG DISPATCH_DEBUG
|
@@ -2568,11 +2569,11 @@ static size_t
|
2568 | 2569 | _dispatch_io_debug_attr(dispatch_io_t channel, char* buf, size_t bufsiz)
|
2569 | 2570 | {
|
2570 | 2571 | dispatch_queue_t target = channel->do_targetq;
|
2571 |
| - return dsnprintf(buf, bufsiz, "type = %s, fd = 0x%x, %sfd_entry = %p, " |
| 2572 | + return dsnprintf(buf, bufsiz, "type = %s, fd = 0x%" PRIxPTR ", %sfd_entry = %p, " |
2572 | 2573 | "queue = %p, target = %s[%p], barrier_queue = %p, barrier_group = "
|
2573 | 2574 | "%p, err = 0x%x, low = 0x%zx, high = 0x%zx, interval%s = %llu ",
|
2574 | 2575 | channel->params.type == DISPATCH_IO_STREAM ? "stream" : "random",
|
2575 |
| - channel->fd_actual, channel->atomic_flags & DIO_STOPPED ? |
| 2576 | + (intptr_t)channel->fd_actual, channel->atomic_flags & DIO_STOPPED ? |
2576 | 2577 | "stopped, " : channel->atomic_flags & DIO_CLOSED ? "closed, " : "",
|
2577 | 2578 | channel->fd_entry, channel->queue, target && target->dq_label ?
|
2578 | 2579 | target->dq_label : "", target, channel->barrier_queue,
|
@@ -2601,13 +2602,13 @@ _dispatch_operation_debug_attr(dispatch_operation_t op, char* buf,
|
2601 | 2602 | {
|
2602 | 2603 | dispatch_queue_t target = op->do_targetq;
|
2603 | 2604 | dispatch_queue_t oqtarget = op->op_q ? op->op_q->do_targetq : NULL;
|
2604 |
| - return dsnprintf(buf, bufsiz, "type = %s %s, fd = 0x%x, fd_entry = %p, " |
| 2605 | + return dsnprintf(buf, bufsiz, "type = %s %s, fd = 0x%" PRIxPTR ", fd_entry = %p, " |
2605 | 2606 | "channel = %p, queue = %p -> %s[%p], target = %s[%p], "
|
2606 | 2607 | "offset = %lld, length = %zu, done = %zu, undelivered = %zu, "
|
2607 | 2608 | "flags = %u, err = 0x%x, low = 0x%zx, high = 0x%zx, "
|
2608 | 2609 | "interval%s = %llu ", op->params.type == DISPATCH_IO_STREAM ?
|
2609 | 2610 | "stream" : "random", op->direction == DOP_DIR_READ ? "read" :
|
2610 |
| - "write", op->fd_entry ? op->fd_entry->fd : -1, op->fd_entry, |
| 2611 | + "write", (intptr_t)(op->fd_entry ? op->fd_entry->fd : -1), op->fd_entry, |
2611 | 2612 | op->channel, op->op_q, oqtarget && oqtarget->dq_label ?
|
2612 | 2613 | oqtarget->dq_label : "", oqtarget, target && target->dq_label ?
|
2613 | 2614 | target->dq_label : "", target, (long long)op->offset, op->length,
|
|
0 commit comments