Rev 2787 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2787 | Rev 4692 | ||
---|---|---|---|
Line 57... | Line 57... | ||
57 | * @param itms Number of items that can be stored in FIFO. |
57 | * @param itms Number of items that can be stored in FIFO. |
58 | */ |
58 | */ |
59 | #define FIFO_INITIALIZE_STATIC(name, t, itms) \ |
59 | #define FIFO_INITIALIZE_STATIC(name, t, itms) \ |
60 | struct { \ |
60 | struct { \ |
61 | t fifo[(itms)]; \ |
61 | t fifo[(itms)]; \ |
62 | count_t items; \ |
62 | size_t items; \ |
63 | index_t head; \ |
63 | size_t head; \ |
64 | index_t tail; \ |
64 | size_t tail; \ |
65 | } name = { \ |
65 | } name = { \ |
66 | .items = (itms), \ |
66 | .items = (itms), \ |
67 | .head = 0, \ |
67 | .head = 0, \ |
68 | .tail = 0 \ |
68 | .tail = 0 \ |
69 | } |
69 | } |
Line 78... | Line 78... | ||
78 | * @param itms Number of items that can be stored in FIFO. |
78 | * @param itms Number of items that can be stored in FIFO. |
79 | */ |
79 | */ |
80 | #define FIFO_INITIALIZE_DYNAMIC(name, t, itms) \ |
80 | #define FIFO_INITIALIZE_DYNAMIC(name, t, itms) \ |
81 | struct { \ |
81 | struct { \ |
82 | t *fifo; \ |
82 | t *fifo; \ |
83 | count_t items; \ |
83 | size_t items; \ |
84 | index_t head; \ |
84 | size_t head; \ |
85 | index_t tail; \ |
85 | size_t tail; \ |
86 | } name = { \ |
86 | } name = { \ |
87 | .fifo = NULL, \ |
87 | .fifo = NULL, \ |
88 | .items = (itms), \ |
88 | .items = (itms), \ |
89 | .head = 0, \ |
89 | .head = 0, \ |
90 | .tail = 0 \ |
90 | .tail = 0 \ |