Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/adt/dynamic_fifo.c

    r1bfd3d3 r7e66a5ec  
    5656 *
    5757 * @param[in] fifo      The dynamic queue.
    58  * @return              TRUE if the queue is valid.
    59  * @return              FALSE otherwise.
    60  */
    61 static int dyn_fifo_is_valid(dyn_fifo_t *fifo)
     58 * @returns             TRUE if the queue is valid.
     59 * @returns             FALSE otherwise.
     60 */
     61static int dyn_fifo_is_valid(dyn_fifo_ref fifo)
    6262{
    6363        return fifo && (fifo->magic_value == DYN_FIFO_MAGIC_VALUE);
     
    6868 * @param[in,out] fifo  The dynamic queue.
    6969 * @param[in] size      The initial queue size.
    70  * @return              EOK on success.
    71  * @return              EINVAL if the queue is not valid.
    72  * @return              EBADMEM if the fifo parameter is NULL.
    73  * @return              ENOMEM if there is not enough memory left.
    74  */
    75 int dyn_fifo_initialize(dyn_fifo_t *fifo, int size)
     70 * @returns             EOK on success.
     71 * @returns             EINVAL if the queue is not valid.
     72 * @returns             EBADMEM if the fifo parameter is NULL.
     73 * @returns             ENOMEM if there is not enough memory left.
     74 */
     75int dyn_fifo_initialize(dyn_fifo_ref fifo, int size)
    7676{
    7777        if (!fifo)
     
    100100 *                      this limit. May be zero or negative to indicate no
    101101 *                      limit.
    102  * @return              EOK on success.
    103  * @return              EINVAL if the queue is not valid.
    104  * @return              ENOMEM if there is not enough memory left.
    105  */
    106 int dyn_fifo_push(dyn_fifo_t *fifo, int value, int max_size)
     102 * @returns             EOK on success.
     103 * @returns             EINVAL if the queue is not valid.
     104 * @returns             ENOMEM if there is not enough memory left.
     105 */
     106int dyn_fifo_push(dyn_fifo_ref fifo, int value, int max_size)
    107107{
    108108        int *new_items;
     
    150150 *
    151151 * @param[in,out] fifo  The dynamic queue.
    152  * @return              Value of the first item in the queue.
    153  * @return              EINVAL if the queue is not valid.
    154  * @return              ENOENT if the queue is empty.
    155  */
    156 int dyn_fifo_pop(dyn_fifo_t *fifo)
     152 * @returns             Value of the first item in the queue.
     153 * @returns             EINVAL if the queue is not valid.
     154 * @returns             ENOENT if the queue is empty.
     155 */
     156int dyn_fifo_pop(dyn_fifo_ref fifo)
    157157{
    158158        int value;
     
    172172 *
    173173 * @param[in,out] fifo  The dynamic queue.
    174  * @return              Value of the first item in the queue.
    175  * @return              EINVAL if the queue is not valid.
    176  * @return              ENOENT if the queue is empty.
    177  */
    178 int dyn_fifo_value(dyn_fifo_t *fifo)
     174 * @returnsi            Value of the first item in the queue.
     175 * @returns             EINVAL if the queue is not valid.
     176 * @returns             ENOENT if the queue is empty.
     177 */
     178int dyn_fifo_value(dyn_fifo_ref fifo)
    179179{
    180180        if (!dyn_fifo_is_valid(fifo))
     
    190190 *
    191191 * @param[in,out] fifo  The dynamic queue.
    192  * @return              EOK on success.
    193  * @return              EINVAL if the queue is not valid.
    194  */
    195 int dyn_fifo_destroy(dyn_fifo_t *fifo)
     192 * @returns             EOK on success.
     193 * @returns             EINVAL if the queue is not valid.
     194 */
     195int dyn_fifo_destroy(dyn_fifo_ref fifo)
    196196{
    197197        if (!dyn_fifo_is_valid(fifo))
Note: See TracChangeset for help on using the changeset viewer.