Changeset cf28036c in mainline for libc/include/libadt/fifo.h


Ignore:
Timestamp:
2006-06-01T11:06:34Z (19 years ago)
Author:
Josef Cejka <malyzelenyhnus@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a2ae4f4
Parents:
ad123964
Message:

Console stores unsatisfied getchar requests and handle them after keypress.
Fifo modified to be usable as structure member.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libc/include/libadt/fifo.h

    rad123964 rcf28036c  
    4545typedef unsigned long fifo_index_t;
    4646
     47#define FIFO_CREATE_STATIC(name, t, itms)               \
     48        struct {                                        \
     49                t fifo[(itms)];                         \
     50                fifo_count_t items;                     \
     51                fifo_index_t head;                      \
     52                fifo_index_t tail;                      \
     53        } name
     54
    4755/** Create and initialize static FIFO.
    4856 *
     
    5563 */
    5664#define FIFO_INITIALIZE_STATIC(name, t, itms)           \
    57         struct {                                        \
    58                 t fifo[(itms)];                         \
    59                 fifo_count_t items;                     \
    60                 fifo_index_t head;                      \
    61                 fifo_index_t tail;                      \
    62         } name = {                                      \
     65        FIFO_CREATE_STATIC(name, t, itms) = {           \
    6366                .items = (itms),                        \
    6467                .head = 0,                              \
Note: See TracChangeset for help on using the changeset viewer.