Ignore:
Timestamp:
04/10/14 01:24:05 (8 years ago)
Author:
Richard Sanger <rsangerarj@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
df668eb
Parents:
fb1fd42
Message:

Use size_t rather than int for the data structures. Export vector, deque and ring_buffer for testing and use in programs.
Remove some inlines for now since these result in lots of compile warnings when also exported, the compiler is probably smart enough anyway.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/data-struct/sliding_window.h

    rd6a56b6 read9478  
    11#include <stdint.h>
     2#include <stddef.h>
    23
    34#ifndef LIBTRACE_SLIDING_WINDOW_H
     
    1011// if LIBTRACE_RINGBUFFER_SPINNING is to work.
    1112typedef struct libtrace_slidingwindow {
    12         volatile int start;
    13         int size;
     13        volatile size_t start;
     14        size_t size;
    1415        volatile uint64_t start_number;
    1516        void *volatile*elements;
    1617} libtrace_slidingwindow_t;
    1718
    18 void libtrace_slidingwindow_init(libtrace_slidingwindow_t * sw, int size, uint64_t start_number);
     19void libtrace_slidingwindow_init(libtrace_slidingwindow_t * sw, size_t size, uint64_t start_number);
    1920inline void libtrace_zero_slidingwindow(libtrace_slidingwindow_t * sw);
    2021void libtrace_slidingwindow_destroy(libtrace_slidingwindow_t * sw);
Note: See TracChangeset for help on using the changeset viewer.