X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_ringbuffer.c;h=fc33a60a1d42b6fffc741e233df96e51bf1d5ba8;hb=4ca005982593fbdd7f4204ec9805b5f86edf5155;hp=0797a7289b5e8fcafffa4aedeb277809de497c48;hpb=b7093fd3602ef2c796a1f8a0daded9d6aad0b756;p=palacios.git diff --git a/palacios/src/palacios/vmm_ringbuffer.c b/palacios/src/palacios/vmm_ringbuffer.c index 0797a72..fc33a60 100644 --- a/palacios/src/palacios/vmm_ringbuffer.c +++ b/palacios/src/palacios/vmm_ringbuffer.c @@ -27,7 +27,7 @@ void NO_INST v3_init_ringbuf(struct v3_ringbuf * ring, uint_t size) { ring->buf = V3_Malloc(size); if (!(ring->buf)) { - PrintError("Cannot init a ring buffer\n"); + PrintError(VM_NONE, VCORE_NONE, "Cannot init a ring buffer\n"); return; } @@ -43,7 +43,7 @@ struct v3_ringbuf * v3_create_ringbuf(uint_t size) { struct v3_ringbuf * ring = (struct v3_ringbuf *)V3_Malloc(sizeof(struct v3_ringbuf)); if (!ring) { - PrintError("Cannot allocate a ring buffer\n"); + PrintError(VM_NONE, VCORE_NONE, "Cannot allocate a ring buffer\n"); return NULL; } @@ -192,7 +192,7 @@ int v3_ringbuf_write(struct v3_ringbuf * ring, uchar_t * src, uint_t len) { if (is_write_loop(ring, write_len)) { int section_len = get_write_section_size(ring); - // PrintDebug("Write loop: write_ptr=%p, src=%p, sec_len=%d\n", + // PrintDebug(info->vm_info, info, "Write loop: write_ptr=%p, src=%p, sec_len=%d\n", // (void *)get_write_ptr(ring),(void*)src, section_len); memcpy(get_write_ptr(ring), src, section_len); @@ -202,7 +202,7 @@ int v3_ringbuf_write(struct v3_ringbuf * ring, uchar_t * src, uint_t len) { ring->end += write_len - section_len; } else { - // PrintDebug("Writing: write_ptr=%p, src=%p, write_len=%d\n", + // PrintDebug(info->vm_info, info, "Writing: write_ptr=%p, src=%p, write_len=%d\n", // (void *)get_write_ptr(ring),(void*)src, write_len); memcpy(get_write_ptr(ring), src, write_len); @@ -223,6 +223,6 @@ void v3_print_ringbuf(struct v3_ringbuf * ring) { for (ctr = 0; ctr < ring->current_len; ctr++) { int index = (ctr + ring->start) % ring->size; - PrintDebug("Entry %d (index=%d): %c\n", ctr, index, ring->buf[index]); + PrintDebug(VM_NONE, VCORE_NONE, "Entry %d (index=%d): %c\n", ctr, index, ring->buf[index]); } }