Rev 1787 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1787 | Rev 1866 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | */ |
27 | */ |
28 | 28 | ||
29 | /** @addtogroup libc |
29 | /** @addtogroup libc |
30 | * @{ |
30 | * @{ |
31 | */ |
31 | */ |
32 | /** @file |
32 | /** @file |
33 | */ |
33 | */ |
34 | 34 | ||
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 | - |