From 88fd78df0f3288a821343f18416624ec7f32ca97 Mon Sep 17 00:00:00 2001 From: Stratos Psomadakis Date: Thu, 18 Jun 2015 23:03:12 +0200 Subject: [PATCH] Adjust xseg logging levels --- src/xseg.c | 196 ++++++++++++++++++++++---------------------- src/xseg_posix.c | 10 +-- src/xseg_pthread.c | 10 +-- src/xseg_user.c | 4 +- src/xtypes/xcache.c | 48 +++++------ src/xtypes/xhash.c | 2 +- src/xtypes/xheap.c | 8 +- src/xtypes/xq.c | 2 +- 8 files changed, 140 insertions(+), 140 deletions(-) diff --git a/src/xseg.c b/src/xseg.c index cd3e1b1..c4fb260 100644 --- a/src/xseg.c +++ b/src/xseg.c @@ -122,7 +122,7 @@ static struct xseg_peer *__get_peer_type(struct xseg *xseg, uint32_t serial) priv = xseg->priv; if (serial >= xseg->max_peer_types) { - XSEGLOG2(I, "invalid peer type serial %d >= %d\n", + XSEGLOG2(W, "invalid peer type serial %d >= %d\n", serial, xseg->max_peer_types); return NULL; } @@ -137,13 +137,13 @@ static struct xseg_peer *__get_peer_type(struct xseg *xseg, uint32_t serial) shared_peer_types = XPTR_TAKE(xseg->shared->peer_types, xseg->segment); name = shared_peer_types[serial]; if (!*name) { - XSEGLOG2(I, "nonexistent peer type serial %d\n", serial); + XSEGLOG2(W, "nonexistent peer type serial %d\n", serial); return NULL; } type = __find_or_load_peer_type(name); if (!type) - XSEGLOG2(I, "could not find driver for peer type %d [%s]\n", + XSEGLOG2(W, "could not find driver for peer type %d [%s]\n", serial, name); priv->peer_types[serial] = type; @@ -163,7 +163,7 @@ static void * __get_peer_type_data(struct xseg *xseg, uint32_t serial) priv = xseg->priv; if (serial >= xseg->max_peer_types) { - XSEGLOG2(I, "invalid peer type serial %d >= %d\n", + XSEGLOG2(W, "invalid peer type serial %d >= %d\n", serial, xseg->max_peer_types); return 0; } @@ -175,7 +175,7 @@ static void * __get_peer_type_data(struct xseg *xseg, uint32_t serial) shared_peer_types = XPTR_TAKE(xseg->shared->peer_types, xseg->segment); name = shared_peer_types[serial]; if (!*name) { - XSEGLOG2(I, "nonexistent peer type serial %d\n", serial); + XSEGLOG2(W, "nonexistent peer type serial %d\n", serial); return 0; } shared_peer_type_data = XPTR_TAKE(xseg->shared->peer_type_data, xseg->segment); @@ -187,7 +187,7 @@ static void * __get_peer_type_data(struct xseg *xseg, uint32_t serial) static inline int __validate_port(struct xseg *xseg, uint32_t portno) { if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return 0; } return portno < xseg->config.nr_ports; @@ -196,7 +196,7 @@ static inline int __validate_port(struct xseg *xseg, uint32_t portno) static inline int __validate_ptr(struct xseg *xseg, xptr ptr) { if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return 0; } return ptr < xseg->segment_size; @@ -256,7 +256,7 @@ int xseg_parse_spec(char *segspec, struct xseg_config *config) char *s = segspec, *sp = segspec; if (!config) { - XSEGLOG2(I, "Invalid configuration argument"); + XSEGLOG2(W, "Invalid configuration argument"); return -1; } @@ -303,12 +303,12 @@ int xseg_register_type(struct xseg_type *type) __type = __find_type(type->name, &i); if (__type) { - XSEGLOG2(I, "type %s already exists\n", type->name); + XSEGLOG2(W, "type %s already exists\n", type->name); goto out; } if (__nr_types >= XSEG_NR_TYPES) { - XSEGLOG2(I, "maximum type registrations reached: %u\n", __nr_types); + XSEGLOG2(W, "maximum type registrations reached: %u\n", __nr_types); r -= 1; goto out; } @@ -334,7 +334,7 @@ int xseg_unregister_type(const char *name) __lock_domain(); __type = __find_type(name, &i); if (!__type) { - XSEGLOG2(I, "segment type '%s' does not exist\n", name); + XSEGLOG2(W, "segment type '%s' does not exist\n", name); goto out; } @@ -360,19 +360,19 @@ int xseg_register_peer(struct xseg_peer *peer_type) type = __find_peer_type(peer_type->name, &i); if (type) { - XSEGLOG2(I, "peer type '%s' already exists\n", type->name); + XSEGLOG2(W, "peer type '%s' already exists\n", type->name); goto out; } if (__nr_peer_types >= XSEG_NR_PEER_TYPES) { - XSEGLOG2(I, "maximum peer type registrations reached: %u", + XSEGLOG2(W, "maximum peer type registrations reached: %u", __nr_peer_types); r -= 1; goto out; } if (peer_type->peer_ops.remote_signal_init()) { - XSEGLOG2(I, "peer type '%s': signal initialization failed\n", + XSEGLOG2(W, "peer type '%s': signal initialization failed\n", peer_type->name); r -= 1; goto out; @@ -400,7 +400,7 @@ int xseg_unregister_peer(const char *name) __lock_domain(); driver = __find_peer_type(name, &i); if (!driver) { - XSEGLOG2(I, "peer type '%s' does not exist\n", name); + XSEGLOG2(W, "peer type '%s' does not exist\n", name); goto out; } @@ -424,14 +424,14 @@ int64_t __enable_driver(struct xseg *xseg, struct xseg_peer *driver) xptr peer_type_data; if (!xseg || !driver) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return -1; } max_drivers = xseg->max_peer_types; if (xseg->shared->nr_peer_types >= max_drivers) { - XSEGLOG2(I, "cannot register '%s': driver namespace full\n", + XSEGLOG2(W, "cannot register '%s': driver namespace full\n", driver->name); return -1; } @@ -478,7 +478,7 @@ int64_t xseg_enable_driver(struct xseg *xseg, const char *name) __lock_domain(); driver = __find_peer_type(name, &r); if (!driver) { - XSEGLOG2(I, "driver '%s' not found\n", name); + XSEGLOG2(W, "driver '%s' not found\n", name); goto out; } @@ -504,7 +504,7 @@ int xseg_disable_driver(struct xseg *xseg, const char *name) __lock_domain(); driver = __find_peer_type(name, &i); if (!driver) { - XSEGLOG2(I, "driver '%s' not found\n", name); + XSEGLOG2(W, "driver '%s' not found\n", name); goto out; } @@ -526,7 +526,7 @@ static uint64_t calculate_segment_size(struct xseg_config *config) uint64_t size = 0; if (!config) { - XSEGLOG2(I, "Invalid configuration argument"); + XSEGLOG2(W, "Invalid configuration argument"); return 0; } @@ -535,7 +535,7 @@ static uint64_t calculate_segment_size(struct xseg_config *config) /* assert(sizeof(struct xseg) <= (1 << 9)); */ if (page_shift < 9) { - XSEGLOG2(I, "page_shift must be >= %d\n", 9); + XSEGLOG2(W, "page_shift must be >= %d\n", 9); return 0; } @@ -562,7 +562,7 @@ static long initialize_segment(struct xseg *xseg, struct xseg_config *cfg) xport *gw; if (!xseg || !cfg) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return -1; } @@ -688,47 +688,47 @@ int xseg_create(struct xseg_config *cfg) long r; if (!cfg) { - XSEGLOG2(I, "Invalid configuration argument"); + XSEGLOG2(W, "Invalid configuration argument"); goto out_err; } if (cfg->dynports >= cfg->nr_ports) { - XSEGLOG2(I, "Invalid config: Dynamic ports >= Total number of ports"); + XSEGLOG2(W, "Invalid config: Dynamic ports >= Total number of ports"); goto out_err; } type = __find_or_load_type(cfg->type); if (!type) { cfg->type[XSEG_TNAMESIZE-1] = 0; - XSEGLOG2(I, "type '%s' does not exist\n", cfg->type); + XSEGLOG2(W, "type '%s' does not exist\n", cfg->type); goto out_err; } size = calculate_segment_size(cfg); if (!size) { - XSEGLOG2(I, "invalid config!\n"); + XSEGLOG2(W, "invalid config!\n"); goto out_err; } xops = &type->ops; cfg->name[XSEG_NAMESIZE-1] = 0; -// XSEGLOG2(I, "creating segment of size %llu\n", size); +// XSEGLOG2(W, "creating segment of size %llu\n", size); r = xops->allocate(cfg->name, size); if (r) { - XSEGLOG2(I, "cannot allocate segment!\n"); + XSEGLOG2(W, "cannot allocate segment!\n"); goto out_err; } xseg = xops->map(cfg->name, size, NULL); if (!xseg) { - XSEGLOG2(I, "cannot map segment!\n"); + XSEGLOG2(W, "cannot map segment!\n"); goto out_deallocate; } r = initialize_segment(xseg, cfg); xops->unmap(xseg, size); if (r) { - XSEGLOG2(I, "cannot initilize segment!\n"); + XSEGLOG2(W, "cannot initilize segment!\n"); goto out_deallocate; } @@ -746,14 +746,14 @@ void xseg_destroy(struct xseg *xseg) struct xseg_type *type; if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return; } __lock_domain(); type = __find_or_load_type(xseg->config.type); if (!type) { - XSEGLOG2(I, "no segment type '%s'\n", xseg->config.type); + XSEGLOG2(W, "no segment type '%s'\n", xseg->config.type); goto out; } @@ -771,7 +771,7 @@ static int pointer_ok( unsigned long ptr, { int ret = !(ptr >= base && ptr < base + size); if (ret) - XSEGLOG2(I, "invalid pointer '->%s' [%llx on %llx]!\n", + XSEGLOG2(W, "invalid pointer '->%s' [%llx on %llx]!\n", (unsigned long long)ptr, (unsigned long long)base, name); @@ -822,7 +822,7 @@ struct xseg *xseg_join(const char *segtypename, peertype = __find_or_load_peer_type(peertypename); if (!peertype) { - XSEGLOG2(I, "Peer type '%s' not found\n", peertypename); + XSEGLOG2(W, "Peer type '%s' not found\n", peertypename); __unlock_domain(); err_no = EINVAL; goto err; @@ -830,7 +830,7 @@ struct xseg *xseg_join(const char *segtypename, segtype = __find_or_load_type(segtypename); if (!segtype) { - XSEGLOG2(I, "Segment type '%s' not found\n", segtypename); + XSEGLOG2(W, "Segment type '%s' not found\n", segtypename); __unlock_domain(); err_no = EINVAL; goto err; @@ -844,27 +844,27 @@ struct xseg *xseg_join(const char *segtypename, xseg = pops->malloc(sizeof(struct xseg)); if (!xseg) { err_no = errno; - XSEGLOG2(I, "Cannot allocate memory"); + XSEGLOG2(W, "Cannot allocate memory"); goto err; } priv = pops->malloc(sizeof(struct xseg_private)); if (!priv) { err_no = errno; - XSEGLOG2(I, "Cannot allocate memory"); + XSEGLOG2(W, "Cannot allocate memory"); goto err_seg; } __xseg = xops->map(segname, XSEG_MIN_PAGE_SIZE, NULL); if (!__xseg) { err_no = errno; - XSEGLOG2(I, "Cannot map segment"); + XSEGLOG2(W, "Cannot map segment"); goto err_priv; } if (!(__xseg->version == XSEG_VERSION)) { err_no = EPROTO; - XSEGLOG2(I, "Version mismatch. Expected %llu, segment version %llu", + XSEGLOG2(W, "Version mismatch. Expected %llu, segment version %llu", XSEG_VERSION, __xseg->version); goto err_priv; } @@ -876,7 +876,7 @@ struct xseg *xseg_join(const char *segtypename, __xseg = xops->map(segname, size, xseg); if (!__xseg) { err_no = errno; - XSEGLOG2(I, "Cannot map segment"); + XSEGLOG2(W, "Cannot map segment"); goto err_priv; } @@ -895,14 +895,14 @@ struct xseg *xseg_join(const char *segtypename, priv->peer_types = pops->malloc(sizeof(void *) * xseg->max_peer_types); if (!priv->peer_types) { err_no = errno; - XSEGLOG2(I, "Cannot allocate memory"); + XSEGLOG2(W, "Cannot allocate memory"); goto err_unmap; } memset(priv->peer_types, 0, sizeof(void *) * xseg->max_peer_types); priv->peer_type_data = pops->malloc(sizeof(void *) * xseg->max_peer_types); if (!priv->peer_types) { err_no = errno; - XSEGLOG2(I, "Cannot allocate memory"); + XSEGLOG2(W, "Cannot allocate memory"); //FIXME wrong err handling goto err_unmap; } @@ -926,14 +926,14 @@ struct xseg *xseg_join(const char *segtypename, r = xseg_validate_pointers(xseg); if (r) { err_no = EFAULT; - XSEGLOG2(I, "found %d invalid xseg pointers!\n", r); + XSEGLOG2(W, "found %d invalid xseg pointers!\n", r); goto err_free_types; } /* Do we need this? r = xops->signal_join(xseg); if (r) { - XSEGLOG2(I, "Cannot attach signaling to segment! (error: %d)\n", r); + XSEGLOG2(W, "Cannot attach signaling to segment! (error: %d)\n", r); goto err_free_types; } */ @@ -962,7 +962,7 @@ void xseg_leave(struct xseg *xseg) struct xseg_type *type; if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return; } @@ -976,7 +976,7 @@ void xseg_leave(struct xseg *xseg) __lock_domain(); type = __find_or_load_type(xseg->config.type); if (!type) { - XSEGLOG2(I, "no segment type '%s'\n", xseg->config.type); + XSEGLOG2(W, "no segment type '%s'\n", xseg->config.type); __unlock_domain(); return; } @@ -992,7 +992,7 @@ struct xseg_port* xseg_get_port(struct xseg *xseg, uint32_t portno) xptr p; if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return NULL; } @@ -1013,7 +1013,7 @@ struct xq * __alloc_queue(struct xseg *xseg, uint64_t nr_reqs) struct xheap *heap = xseg->heap; if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return NULL; } @@ -1039,7 +1039,7 @@ struct xq * __alloc_queue(struct xseg *xseg, uint64_t nr_reqs) struct xseg_port *xseg_alloc_port(struct xseg *xseg, uint32_t flags, uint64_t nr_reqs) { if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return NULL; } @@ -1097,7 +1097,7 @@ err_free: void xseg_free_port(struct xseg *xseg, struct xseg_port *port) { if (!xseg || !port) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return; } struct xobject_h *obj_h = xseg->port_h; @@ -1120,14 +1120,14 @@ void xseg_free_port(struct xseg *xseg, struct xseg_port *port) void* xseg_alloc_buffer(struct xseg *xseg, uint64_t size) { if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return NULL; } struct xheap *heap = xseg->heap; void *mem = xheap_allocate(heap, size); if (mem && xheap_get_chunk_size(mem) < size) { - XSEGLOG2(I, "Buffer size %llu instead of %llu\n", + XSEGLOG2(W, "Buffer size %llu instead of %llu\n", xheap_get_chunk_size(mem), size); xheap_free(mem); mem = NULL; @@ -1138,7 +1138,7 @@ void* xseg_alloc_buffer(struct xseg *xseg, uint64_t size) void xseg_free_buffer(struct xseg *xseg, void *ptr) { if (!xseg || !ptr) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return; } @@ -1148,7 +1148,7 @@ void xseg_free_buffer(struct xseg *xseg, void *ptr) int xseg_prepare_wait(struct xseg *xseg, uint32_t portno) { if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return -1; } @@ -1161,7 +1161,7 @@ int xseg_prepare_wait(struct xseg *xseg, uint32_t portno) int xseg_cancel_wait(struct xseg *xseg, uint32_t portno) { if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return -1; } @@ -1181,7 +1181,7 @@ int xseg_signal(struct xseg *xseg, xport portno) struct xseg_port *port; if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return -1; } port = xseg_get_port(xseg, portno); @@ -1201,7 +1201,7 @@ int xseg_init_local_signal(struct xseg *xseg, xport portno) struct xseg_port *port; if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return -1; } port = xseg_get_port(xseg, portno); @@ -1222,7 +1222,7 @@ void xseg_quit_local_signal(struct xseg *xseg, xport portno) struct xseg_port *port; if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return; } port = xseg_get_port(xseg, portno); @@ -1248,7 +1248,7 @@ int xseg_alloc_requests(struct xseg *xseg, uint32_t portno, uint32_t nr) struct xseg_port *port; if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return -1; } port = xseg_get_port(xseg, portno); @@ -1283,7 +1283,7 @@ int xseg_free_requests(struct xseg *xseg, uint32_t portno, int nr) struct xseg_port *port; if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return -1; } port = xseg_get_port(xseg, portno); @@ -1313,7 +1313,7 @@ int xseg_prep_ports (struct xseg *xseg, struct xseg_request *xreq, uint32_t src_portno, uint32_t dst_portno) { if (!xseg || !xreq) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return -1; } @@ -1349,7 +1349,7 @@ struct xseg_request *xseg_get_request(struct xseg *xseg, xport src_portno, xptr ptr; if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return NULL; } @@ -1414,7 +1414,7 @@ int xseg_put_request (struct xseg *xseg, struct xseg_request *xreq, xport portno) { if (!xseg || !xreq) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return -1; } @@ -1476,7 +1476,7 @@ int xseg_prep_request ( struct xseg* xseg, struct xseg_request *req, req->bufferlen = 0; if (!xseg || !req) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return -1; } @@ -1497,7 +1497,7 @@ int xseg_resize_request (struct xseg *xseg, struct xseg_request *req, uint32_t new_targetlen, uint64_t new_datalen) { if (!xseg || !req) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return -1; } @@ -1524,7 +1524,7 @@ static void __update_timestamp(struct xseg_request *xreq) struct timeval tv; if (!xreq) { - XSEGLOG2(I, "Invalid xreq argument"); + XSEGLOG2(W, "Invalid xreq argument"); return; } @@ -1553,19 +1553,19 @@ xport xseg_submit (struct xseg *xseg, struct xseg_request *xreq, struct xseg_port *port; if (!xseg || !xreq) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return NoPort; } /* discover where to submit */ if (!__validate_port(xseg, xreq->transit_portno)){ - XSEGLOG2(I, "Couldn't validate transit_portno (portno: %lu)", + XSEGLOG2(W, "Couldn't validate transit_portno (portno: %lu)", xreq->transit_portno); return NoPort; } if (!__validate_port(xseg, xreq->effective_dst_portno)){ - XSEGLOG2(I, "Couldn't validate effective_dst_portno (portno: %lu)", + XSEGLOG2(W, "Couldn't validate effective_dst_portno (portno: %lu)", xreq->effective_dst_portno); return NoPort; } @@ -1575,7 +1575,7 @@ xport xseg_submit (struct xseg *xseg, struct xseg_request *xreq, //FIXME assert(cur == portno); do { if (next == xreq->effective_dst_portno){ - XSEGLOG2(I, "Path ended with no one willing to accept"); + XSEGLOG2(W, "Path ended with no one willing to accept"); return NoPort; } @@ -1587,7 +1587,7 @@ xport xseg_submit (struct xseg *xseg, struct xseg_request *xreq, port = xseg_get_port(xseg, next); if (!port){ - XSEGLOG2(I, "Couldnt get port (next :%u)", next); + XSEGLOG2(W, "Couldnt get port (next :%u)", next); return NoPort; } } while ((!port->flags & CAN_ACCEPT)); @@ -1601,7 +1601,7 @@ xport xseg_submit (struct xseg *xseg, struct xseg_request *xreq, /* add current port to path */ serial = __xq_append_head(&xreq->path, cur); if (serial == Noneidx){ - XSEGLOG2(I, "Couldn't append path head"); + XSEGLOG2(W, "Couldn't append path head"); return NoPort; } @@ -1626,7 +1626,7 @@ xport xseg_submit (struct xseg *xseg, struct xseg_request *xreq, out_rel: xlock_release(&port->rq_lock); if (serial == Noneidx){ - XSEGLOG2(I, "Couldn't append request to queue"); + XSEGLOG2(W, "Couldn't append request to queue"); __xq_pop_head(&xreq->path); next = NoPort; } @@ -1643,7 +1643,7 @@ struct xseg_request *xseg_receive(struct xseg *xseg, xport portno, uint32_t flag struct xseg_port *port; if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return NULL; } port = xseg_get_port(xseg, portno); @@ -1669,7 +1669,7 @@ retry: serial = __xq_pop_head(&req->path); if (serial == Noneidx){ /* this should never happen */ - XSEGLOG2(I, "pop head of path queue returned Noneidx\n"); + XSEGLOG2(W, "pop head of path queue returned Noneidx\n"); goto retry; } @@ -1685,7 +1685,7 @@ struct xseg_request *xseg_accept(struct xseg *xseg, xport portno, uint32_t flags struct xseg_port *port; if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return NULL; } port = xseg_get_port(xseg, portno); @@ -1722,7 +1722,7 @@ xport xseg_respond (struct xseg *xseg, struct xseg_request *xreq, xport dst; if (!xseg || !xreq) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return NoPort; } @@ -1736,7 +1736,7 @@ retry: if (!port) return NoPort; if (!(port->flags & CAN_RECEIVE)){ - //XSEGLOG2(I, "Port %u cannot receive", dst); + //XSEGLOG2(W, "Port %u cannot receive", dst); /* Port cannot receive. Try next one in path */ __xq_pop_head(&xreq->path); goto retry; @@ -1774,12 +1774,12 @@ xport xseg_forward(struct xseg *xseg, struct xseg_request *req, xport new_dst, xport portno, uint32_t flags) { if (!xseg || !req) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return NoPort; } if (!__validate_port(xseg, new_dst)){ - XSEGLOG2(I, "Couldn't validate new destination (new_dst %lu)", + XSEGLOG2(W, "Couldn't validate new destination (new_dst %lu)", new_dst); return NoPort; } @@ -1791,7 +1791,7 @@ xport xseg_forward(struct xseg *xseg, struct xseg_request *req, xport new_dst, int xseg_set_path_next(struct xseg *xseg, xport portno, xport next) { if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return -1; } if (!__validate_port(xseg, portno)) @@ -1808,11 +1808,11 @@ int xseg_set_req_data(struct xseg *xseg, struct xseg_request *xreq, void *data) xhash_t *req_data; if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return -1; } if (!xreq) { - XSEGLOG2(I, "Invalid xreq argument"); + XSEGLOG2(W, "Invalid xreq argument"); return -1; } @@ -1839,11 +1839,11 @@ int xseg_get_req_data(struct xseg *xseg, struct xseg_request *xreq, void **data) xhash_t *req_data; if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return -1; } if (!xreq) { - XSEGLOG2(I, "Invalid xreq argument"); + XSEGLOG2(W, "Invalid xreq argument"); return -1; } @@ -1873,7 +1873,7 @@ struct xobject_h * xseg_get_objh(struct xseg *xseg, uint32_t magic, uint64_t siz { int r; if (!xseg) { - XSEGLOG2(I, "Invalid xseg argument"); + XSEGLOG2(W, "Invalid xseg argument"); return NULL; } struct xobject_h *obj_h = xobj_get_obj(xseg->object_handlers, X_ALLOC); @@ -1890,7 +1890,7 @@ struct xobject_h * xseg_get_objh(struct xseg *xseg, uint32_t magic, uint64_t siz void xseg_put_objh(struct xseg *xseg, struct xobject_h *objh) { if (!xseg || !objh) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return; } xobj_put_obj(xseg->object_handlers, objh); @@ -1920,7 +1920,7 @@ struct xseg_port *xseg_bind_port(struct xseg *xseg, uint32_t req, void * sd) int r; if (!xseg) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return NULL; } @@ -1996,7 +1996,7 @@ struct xseg_port *xseg_bind_dynport(struct xseg *xseg) int r, has_sd=0, port_allocated=0; if (!xseg) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return NULL; } @@ -2067,7 +2067,7 @@ out: int xseg_leave_dynport(struct xseg *xseg, struct xseg_port *port) { if (!xseg) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return -1; } if (!port) @@ -2095,7 +2095,7 @@ int xseg_set_max_requests(struct xseg *xseg, xport portno, uint64_t nr_reqs) struct xq *q; if (!xseg) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return -1; } if (nr_reqs > XSEG_MAX_ALLOCATED_REQS) @@ -2124,7 +2124,7 @@ int xseg_set_max_requests(struct xseg *xseg, xport portno, uint64_t nr_reqs) uint64_t xseg_get_max_requests(struct xseg *xseg, xport portno) { if (!xseg) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return -1; } struct xseg_port *port = xseg_get_port(xseg, portno); @@ -2136,7 +2136,7 @@ uint64_t xseg_get_max_requests(struct xseg *xseg, xport portno) uint64_t xseg_get_allocated_requests(struct xseg *xseg, xport portno) { if (!xseg) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return -1; } struct xseg_port *port = xseg_get_port(xseg, portno); @@ -2160,7 +2160,7 @@ int xseg_set_freequeue_size(struct xseg *xseg, xport portno, xqindex size, struct xseg_port *port; if (!xseg) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return -1; } port = xseg_get_port(xseg, portno); @@ -2234,7 +2234,7 @@ int xseg_finalize(void) char* xseg_get_data_nonstatic(struct xseg* xseg, struct xseg_request *req) { if (!xseg || !req) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return NULL; } return xseg_get_data(xseg, req); @@ -2243,7 +2243,7 @@ char* xseg_get_data_nonstatic(struct xseg* xseg, struct xseg_request *req) char* xseg_get_target_nonstatic(struct xseg* xseg, struct xseg_request *req) { if (!xseg || !req) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return NULL; } return xseg_get_target(xseg, req); @@ -2252,7 +2252,7 @@ char* xseg_get_target_nonstatic(struct xseg* xseg, struct xseg_request *req) void* xseg_get_signal_desc_nonstatic(struct xseg *xseg, struct xseg_port *port) { if (!xseg || !port) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return NULL; } return xseg_get_signal_desc(xseg, port); @@ -2261,7 +2261,7 @@ void* xseg_get_signal_desc_nonstatic(struct xseg *xseg, struct xseg_port *port) uint32_t xseg_portno_nonstatic(struct xseg *xseg, struct xseg_port *port) { if (!xseg || !port) { - XSEGLOG2(I, "Invalid argument"); + XSEGLOG2(W, "Invalid argument"); return NoPort; } return xseg_portno(xseg, port); diff --git a/src/xseg_posix.c b/src/xseg_posix.c index 358ed8a..84200e7 100644 --- a/src/xseg_posix.c +++ b/src/xseg_posix.c @@ -43,7 +43,7 @@ static long posix_allocate(const char *name, uint64_t size) fd = shm_open(name, O_RDWR | O_CREAT | O_EXCL, 0770); if (fd < 0) { err_no = errno; - XSEGLOG2(I, "Cannot create shared segment: %s\n", + XSEGLOG2(W, "Cannot create shared segment: %s\n", strerror_r(errno, errbuf, ERRSIZE)); ret = fd; goto exit; @@ -53,7 +53,7 @@ static long posix_allocate(const char *name, uint64_t size) if (lr == (off_t)-1) { err_no = errno; close(fd); - XSEGLOG2(I, "Cannot seek into segment file: %s\n", + XSEGLOG2(W, "Cannot seek into segment file: %s\n", strerror_r(errno, errbuf, ERRSIZE)); ret = lr; goto exit; @@ -64,7 +64,7 @@ static long posix_allocate(const char *name, uint64_t size) if (r != 1) { err_no = errno; close(fd); - XSEGLOG2(I, "Failed to set segment size: %s\n", + XSEGLOG2(w, "Failed to set segment size: %s\n", strerror_r(errno, errbuf, ERRSIZE)); ret = r; goto exit; @@ -90,7 +90,7 @@ static void *posix_map(const char *name, uint64_t size, struct xseg *seg) fd = shm_open(name, O_RDWR, 0000); if (fd < 0) { err_no = errno; - XSEGLOG2(I, "Failed to open '%s' for mapping: %s\n", + XSEGLOG2(W, "Failed to open '%s' for mapping: %s\n", name, strerror_r(errno, errbuf, ERRSIZE)); errno = err_no; return NULL; @@ -104,7 +104,7 @@ static void *posix_map(const char *name, uint64_t size, struct xseg *seg) if (xseg == MAP_FAILED) { err_no = errno; - XSEGLOG2(I, "Could not map segment: %s\n", + XSEGLOG2(W, "Could not map segment: %s\n", strerror_r(errno, errbuf, ERRSIZE)); errno = err_no; return NULL; diff --git a/src/xseg_pthread.c b/src/xseg_pthread.c index d3a8323..24b555d 100644 --- a/src/xseg_pthread.c +++ b/src/xseg_pthread.c @@ -43,7 +43,7 @@ static long pthread_allocate(const char *name, uint64_t size) off_t lr; fd = shm_open(name, O_RDWR | O_CREAT | O_EXCL, 0770); if (fd < 0) { - XSEGLOG2(I, "Cannot create shared segment: %s\n", + XSEGLOG2(W, "Cannot create shared segment: %s\n", strerror_r(errno, errbuf, ERRSIZE)); return fd; } @@ -51,7 +51,7 @@ static long pthread_allocate(const char *name, uint64_t size) lr = lseek(fd, size -1, SEEK_SET); if (lr == (off_t)-1) { close(fd); - XSEGLOG2(I, "Cannot seek into segment file: %s\n", + XSEGLOG2(W, "Cannot seek into segment file: %s\n", strerror_r(errno, errbuf, ERRSIZE)); return lr; } @@ -60,7 +60,7 @@ static long pthread_allocate(const char *name, uint64_t size) r = write(fd, errbuf, 1); if (r != 1) { close(fd); - XSEGLOG2(I, "Failed to set segment size: %s\n", + XSEGLOG2(W, "Failed to set segment size: %s\n", strerror_r(errno, errbuf, ERRSIZE)); return r; } @@ -84,7 +84,7 @@ static void *pthread_map(const char *name, uint64_t size, struct xseg *seg) fd = shm_open(name, O_RDWR, 0000); if (fd < 0) { - XSEGLOG2(I, "Failed to open '%s' for mapping: %s\n", + XSEGLOG2(W, "Failed to open '%s' for mapping: %s\n", name, strerror_r(errno, errbuf, ERRSIZE)); return NULL; } @@ -96,7 +96,7 @@ static void *pthread_map(const char *name, uint64_t size, struct xseg *seg) fd, 0 ); if (xseg == MAP_FAILED) { - XSEGLOG2(I, "Could not map segment: %s\n", + XSEGLOG2(W, "Could not map segment: %s\n", strerror_r(errno, errbuf, ERRSIZE)); return NULL; } diff --git a/src/xseg_user.c b/src/xseg_user.c index b36ea86..78aae6f 100644 --- a/src/xseg_user.c +++ b/src/xseg_user.c @@ -65,7 +65,7 @@ void __load_plugin(const char *name) _name[5 + namelen + 3 ] = 0; dl = dlopen(_name, RTLD_NOW); if (!dl) { - XSEGLOG2(I, "Cannot load plugin '%s': %s\n", _name, dlerror()); + XSEGLOG2(W, "Cannot load plugin '%s': %s\n", _name, dlerror()); return; } @@ -73,7 +73,7 @@ void __load_plugin(const char *name) _name[127] = 0; init = (void (*)(void))(long)dlsym(dl, _name); if (!init) { - XSEGLOG2(I, "Init function '%s' not found!\n", _name); + XSEGLOG2(W, "Init function '%s' not found!\n", _name); return; } diff --git a/src/xtypes/xcache.c b/src/xtypes/xcache.c index 8e4052f..6b5d829 100644 --- a/src/xtypes/xcache.c +++ b/src/xtypes/xcache.c @@ -39,7 +39,7 @@ static xqindex __alloc_cache_entry(struct xcache *cache) static void __free_cache_entry(struct xcache *cache, xqindex idx) { if (__xq_append_head(&cache->free_nodes, idx) == Noneidx) - XSEGLOG2(I, "BUG: Could not free cache entry node. Queue is full"); + XSEGLOG2(W, "BUG: Could not free cache entry node. Queue is full"); } #endif @@ -64,7 +64,7 @@ static int __table_insert(xhash_t **table, struct xcache * cache, xcache_handler XSEGLOG2(I, "Rebuilding internal hash table"); new = xhash_resize(*table, (*table)->size_shift, (*table)->limit, NULL); if (!new) { - XSEGLOG2(I, "Error resizing hash table"); + XSEGLOG2(W, "Error resizing hash table"); return -1; } *table = new; @@ -72,7 +72,7 @@ static int __table_insert(xhash_t **table, struct xcache * cache, xcache_handler /* We give insertion a second shot */ r = xhash_insert(*table, (xhashidx)ce->name, idx); if (r == -XHASH_ERESIZE) { - XSEGLOG2(I, "BUG: failed to insert entry after resize"); + XSEGLOG2(W, "BUG: failed to insert entry after resize"); return -1; } } @@ -87,9 +87,9 @@ static int __table_remove(xhash_t *table, char *name) r = xhash_delete(table, (xhashidx)name); if (UNLIKELY(r<0)){ if (r == -XHASH_ERESIZE) - XSEGLOG2(I, "BUG: hash table must be resized"); + XSEGLOG2(W, "BUG: hash table must be resized"); else if (r == -XHASH_EEXIST) - XSEGLOG2(I, "BUG: Entry %s not found in hash table", name); + XSEGLOG2(W, "BUG: Entry %s not found in hash table", name); } return r; } @@ -102,7 +102,7 @@ static xqindex alloc_cache_entry(struct xcache *cache) static void __free_cache_entry(struct xcache *cache, xqindex idx) { if (UNLIKELY(xq_append_head(&cache->free_nodes, idx) == Noneidx)) - XSEGLOG2(I, "BUG: Could not free cache entry node. Queue is full"); + XSEGLOG2(W, "BUG: Could not free cache entry node. Queue is full"); } static void free_cache_entry(struct xcache *cache, xqindex idx) @@ -110,7 +110,7 @@ static void free_cache_entry(struct xcache *cache, xqindex idx) struct xcache_entry *ce = &cache->nodes[idx]; if (ce->ref != 0) - XSEGLOG2(I, "BUG: Free entry has ref %lu (priv: %p, h: %p)", ce->priv, idx); + XSEGLOG2(W, "BUG: Free entry has ref %lu (priv: %p, h: %p)", ce->priv, idx); __free_cache_entry(cache, idx); if (cache->ops.on_free) @@ -175,7 +175,7 @@ static void __update_access_time(struct xcache *cache, xqindex idx) } else { ce->h = xbinheap_insert(&cache->binheap, cache->time, idx); if (ce->h == NoNode){ - XSEGLOG2(I, "BUG: Cannot insert to lru binary heap"); + XSEGLOG2(W, "BUG: Cannot insert to lru binary heap"); } } } @@ -207,7 +207,7 @@ static int __xcache_remove_entries(struct xcache *cache, xcache_handler h) r = __table_remove(cache->entries, ce->name); if (UNLIKELY(r < 0)){ - XSEGLOG2(I, "Couldn't delete cache entry from hash table:\n" + XSEGLOG2(W, "Couldn't delete cache entry from hash table:\n" "h: %llu, name: %s, cache->nodes[h].priv: %p, ref: %llu", h, ce->name, cache->nodes[idx].priv, cache->nodes[idx].ref); return r; @@ -218,10 +218,10 @@ static int __xcache_remove_entries(struct xcache *cache, xcache_handler h) else if (cache->flags & XCACHE_LRU_HEAP) { if (ce->h != NoNode) { if (xbinheap_increasekey(&cache->binheap, ce->h, XCACHE_LRU_MAX) < 0){ - XSEGLOG2(I, "BUG: cannot increase key to XCACHE_LRU_MAX"); + XSEGLOG2(W, "BUG: cannot increase key to XCACHE_LRU_MAX"); } if (xbinheap_extract(&cache->binheap) == NoNode){ - XSEGLOG2(I, "BUG: cannot remove cache entry from lru"); + XSEGLOG2(W, "BUG: cannot remove cache entry from lru"); } ce->h = NoNode; } @@ -242,7 +242,7 @@ static int __xcache_remove_rm(struct xcache *cache, xcache_handler h) r = __table_remove(cache->rm_entries, ce->name); if (UNLIKELY(r < 0)) { - XSEGLOG2(I, "Couldn't delete cache entry from hash table:\n" + XSEGLOG2(W, "Couldn't delete cache entry from hash table:\n" "h: %llu, name: %s, cache->nodes[h].priv: %p, ref: %llu", h, ce->name, cache->nodes[idx].priv, cache->nodes[idx].ref); } @@ -364,7 +364,7 @@ static int xcache_entry_init(struct xcache *cache, xqindex idx, char *name) xlock_release(&ce->lock); if (UNLIKELY(ce->ref != 0)) - XSEGLOG2(I, "BUG: New entry has ref != 0 (h: %lu, ref: %lu, priv: %p)", + XSEGLOG2(W, "BUG: New entry has ref != 0 (h: %lu, ref: %lu, priv: %p)", idx, ce->ref, ce->priv); ce->ref = 1; strncpy(ce->name, name, XSEG_MAX_TARGETLEN); @@ -418,7 +418,7 @@ static int __xcache_evict(struct xcache *cache, xcache_handler h) r = __xcache_remove_entries(cache, h); if (r < 0) { - XSEGLOG2(I, "Failed to evict %llu from entries", h); + XSEGLOG2(W, "Failed to evict %llu from entries", h); return -1; } @@ -429,7 +429,7 @@ static int __xcache_evict(struct xcache *cache, xcache_handler h) ce = &cache->nodes[h]; if (UNLIKELY(ce->state == NODE_EVICTED)) - XSEGLOG2(I, "BUG: Evicting an already evicted entry (h: %lu, priv: %p)", + XSEGLOG2(W, "BUG: Evicting an already evicted entry (h: %lu, priv: %p)", h, ce->priv); if (!(cache->flags & XCACHE_USE_RMTABLE)) @@ -442,7 +442,7 @@ static int __xcache_evict(struct xcache *cache, xcache_handler h) if (r < 0) { ce->state = NODE_ACTIVE; - XSEGLOG2(I, "BUG: Failed insert %llu to rm_entries", h); + XSEGLOG2(W, "BUG: Failed insert %llu to rm_entries", h); return -1; } @@ -456,7 +456,7 @@ static xcache_handler __xcache_evict_lru(struct xcache *cache) lru = __xcache_lru(cache); if (lru == NoEntry){ - XSEGLOG2(I, "BUG: No lru found"); + XSEGLOG2(W, "BUG: No lru found"); return NoEntry; } @@ -519,7 +519,7 @@ static xcache_handler __xcache_insert(struct xcache *cache, xcache_handler h, /* if so then remove it from rm table */ r = __xcache_remove_rm(cache, tmp_h); if (UNLIKELY(r < 0)) { - XSEGLOG2(I, "Could not remove found entry (%llu) for %s" + XSEGLOG2(W, "Could not remove found entry (%llu) for %s" "from rm_entries", tmp_h, ce->name); xlock_release(&cache->rm_lock); return NoEntry; @@ -528,7 +528,7 @@ static xcache_handler __xcache_insert(struct xcache *cache, xcache_handler h, /* and prepare it for reinsertion */ ce = &cache->nodes[tmp_h]; if (UNLIKELY(ce->state != NODE_EVICTED)) - XSEGLOG2(I, "BUG: Entry (%llu) in rm table not in evicted state", tmp_h); + XSEGLOG2(W, "BUG: Entry (%llu) in rm table not in evicted state", tmp_h); ce->state = NODE_ACTIVE; __xcache_entry_get(cache, tmp_h); @@ -543,7 +543,7 @@ insert: if (r == -XHASH_ENOSPC){ lru = __xcache_evict_lru(cache); if (UNLIKELY(lru == NoEntry)) { - XSEGLOG2(I, "BUG: Failed to evict lru entry"); + XSEGLOG2(W, "BUG: Failed to evict lru entry"); return NoEntry; } *lru_handler = lru; @@ -554,13 +554,13 @@ insert: */ r = __xcache_insert_entries(cache, h); if (r < 0) { - XSEGLOG2(I, "BUG: failed to insert enries after eviction"); + XSEGLOG2(W, "BUG: failed to insert enries after eviction"); return NoEntry; } } if (UNLIKELY(r >= 0 && ce->ref == 0)) - XSEGLOG2(I, "BUG: (Re)inserted entry has ref 0 (priv: %p, h: %lu)", + XSEGLOG2(W, "BUG: (Re)inserted entry has ref 0 (priv: %p, h: %lu)", ce->priv, h); if (r >= 0) @@ -592,7 +592,7 @@ xcache_handler xcache_insert(struct xcache *cache, xcache_handler h) if (lru != NoEntry) { if (UNLIKELY(ret == NoEntry)) - XSEGLOG2(I, "BUG: Unsuccessful insertion lead to LRU eviction."); + XSEGLOG2(W, "BUG: Unsuccessful insertion lead to LRU eviction."); ce = &cache->nodes[lru]; if (cache->ops.on_evict) cache->ops.on_evict(cache->priv, ce->priv); @@ -601,7 +601,7 @@ xcache_handler xcache_insert(struct xcache *cache, xcache_handler h) if (reinsert_handler != NoEntry) { if (UNLIKELY(ret != reinsert_handler)) - XSEGLOG2(I, "BUG: Re-insert handler is different from returned handler" + XSEGLOG2(W, "BUG: Re-insert handler is different from returned handler" "(rei_h = %llu, ret_h = %llu)", reinsert_handler, ret); ce = &cache->nodes[reinsert_handler]; if (cache->ops.on_reinsert) diff --git a/src/xtypes/xhash.c b/src/xtypes/xhash.c index 4ad2fb3..83ce738 100644 --- a/src/xtypes/xhash.c +++ b/src/xtypes/xhash.c @@ -260,7 +260,7 @@ xhash_new__(xhashidx size_shift, xhashidx minsize_shift, xhashidx limit, struct xhash *xhash; xhash = xtypes_malloc(get_alloc_size(size_shift, vals)); if (!xhash) { - XSEGLOG2(I, "couldn't malloc\n"); + XSEGLOG2(W, "couldn't malloc\n"); return NULL; } diff --git a/src/xtypes/xheap.c b/src/xtypes/xheap.c index a2af1a6..ef5e0eb 100644 --- a/src/xtypes/xheap.c +++ b/src/xtypes/xheap.c @@ -100,7 +100,7 @@ void* xheap_allocate(struct xheap *heap, uint64_t bytes) if (!head) goto alloc; if (head > heap->cur) { - XSEGLOG2(I, "invalid xptr %llu found in chunk lists\n", head); + XSEGLOG2(W, "invalid xptr %llu found in chunk lists\n", head); goto out; } next = *(xptr *)(((unsigned long) mem) + head); @@ -129,13 +129,13 @@ out: // printf("alloced: %lx (size: %llu) (xptr: %llu)\n", addr, __get_header(addr)->size, // addr-mem); if (addr && xheap_get_chunk_size(addr) < req_bytes){ - XSEGLOG2(I, "requested %llu bytes but heap returned %llu", + XSEGLOG2(W, "requested %llu bytes but heap returned %llu", req_bytes, xheap_get_chunk_size(addr)); addr = NULL; } if (addr && xheap_get_chunk_size(addr) != (__get_alloc_bytes(heap, req_bytes) - sizeof(struct xheap_header))) { - XSEGLOG2(I, "allocated chunk size %llu, but it should be %llu (req_bytes %llu)", + XSEGLOG2(W, "allocated chunk size %llu, but it should be %llu (req_bytes %llu)", xheap_get_chunk_size(addr), __get_alloc_bytes(heap, req_bytes), req_bytes); addr = NULL; } @@ -168,7 +168,7 @@ void xheap_free(void *ptr) int r; xptr *free_list; if (h->magic != 0xdeadbeaf) { - XSEGLOG2(I, "for ptr: %lx, magic %lx != 0xdeadbeaf", ptr, h->magic); + XSEGLOG2(W, "for ptr: %lx, magic %lx != 0xdeadbeaf", ptr, h->magic); } mem = XPTR(&heap->mem); size = xheap_get_chunk_size(ptr); diff --git a/src/xtypes/xq.c b/src/xtypes/xq.c index 5161b86..35c2d49 100644 --- a/src/xtypes/xq.c +++ b/src/xtypes/xq.c @@ -130,7 +130,7 @@ void xq_print(struct xq *xq) for (;;) { if (i == xq->head) break; - XSEGLOG2(I, "%lu %lu\n", + XSEGLOG2(I, "%lu %lu\n", (unsigned long)i, (unsigned long)xq_element(xq, i) ); i += 1; -- GitLab