Rev 1787 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1787 | Rev 1866 | ||
---|---|---|---|
Line 40... | Line 40... | ||
40 | * Because of better operation ordering in fifo_pop(), the access |
40 | * Because of better operation ordering in fifo_pop(), the access |
41 | * policy for these two indices is to 'increment (mod size of FIFO) |
41 | * policy for these two indices is to 'increment (mod size of FIFO) |
42 | * and use'. |
42 | * and use'. |
43 | */ |
43 | */ |
44 | 44 | ||
45 | #ifndef __FIFO_H__ |
45 | #ifndef LIBC_FIFO_H_ |
46 | #define __FIFO_H__ |
46 | #define LIBC_FIFO_H_ |
47 | 47 | ||
48 | #include <malloc.h> |
48 | #include <malloc.h> |
49 | 49 | ||
50 | typedef unsigned long fifo_count_t; |
50 | typedef unsigned long fifo_count_t; |
51 | typedef unsigned long fifo_index_t; |
51 | typedef unsigned long fifo_index_t; |
Line 121... | Line 121... | ||
121 | #define fifo_create(name) \ |
121 | #define fifo_create(name) \ |
122 | name.fifo = malloc(sizeof(*name.fifo) * name.items) |
122 | name.fifo = malloc(sizeof(*name.fifo) * name.items) |
123 | 123 | ||
124 | #endif |
124 | #endif |
125 | 125 | ||
126 | - | ||
127 | /** @} |
126 | /** @} |
128 | */ |
127 | */ |
129 | - | ||
130 | - |