else if (!strcmp(op, "EVLG"))
{
// unsigned int *overflow = (unsigned int *)(d + 0);
-// unsigned int *stolen = (unsigned int *)(d + 4);
unsigned char *end = d + size;
unsigned char *p = d + 8;
char *event_str, *detail_str;
Eina_Evlog_Buf *evlog = eina_evlog_steal();
if ((evlog) && (evlog->buf))
{
- char tmp[16];
+ char tmp[12];
unsigned int *size = (unsigned int *)(tmp + 0);
char *op2 = "EVLG";
unsigned int *overflow = (unsigned int *)(tmp + 8);
- unsigned int *stolen = (unsigned int *)(tmp + 12);
*size = (sizeof(tmp) - 4) + evlog->top;
memcpy(tmp + 4, op2, 4);
*overflow = evlog->overflow;
- *stolen = evlog->stolen;
write(_eina_debug_monitor_service_fd,
- tmp, 16);
+ tmp, sizeof(tmp));
write(_eina_debug_monitor_service_fd,
evlog->buf, evlog->top);
}
b->buf = malloc(size);
# endif
b->overflow = 0;
- b->stolen = 0;
}
static void
{
buf = &(buffers[1]);
buf->top = 0;
+ buf->overflow--;
stolen = &(buffers[0]);
- stolen->stolen++;
}
else
{
buf = &(buffers[0]);
buf->top = 0;
+ buf->overflow--;
stolen = &(buffers[1]);
- stolen->stolen++;
}
eina_spinlock_release(&_evlog_lock);
return stolen;
unsigned char *buf; // current buffer we fill with event logs
unsigned int size; // the max size of the evlog buffer
unsigned int top; // the current top byte for a new evlog item
- unsigned int overflow; // how many times this biffer has overflown
- unsigned int stolen; // how many times this buffer has been stolen
+ unsigned int overflow; // how many times this buffer has overflown
};
/**