Changeset b5e68c8 in mainline for uspace/lib/c/generic/adt/dynamic_fifo.c
- Timestamp:
- 2011-05-12T16:49:44Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f36787d7
- Parents:
- e80329d6 (diff), 750636a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/adt/dynamic_fifo.c
re80329d6 rb5e68c8 56 56 * 57 57 * @param[in] fifo The dynamic queue. 58 * @return sTRUE if the queue is valid.59 * @return sFALSE otherwise.60 */ 61 static int dyn_fifo_is_valid(dyn_fifo_ reffifo)58 * @return TRUE if the queue is valid. 59 * @return FALSE otherwise. 60 */ 61 static int dyn_fifo_is_valid(dyn_fifo_t *fifo) 62 62 { 63 63 return fifo && (fifo->magic_value == DYN_FIFO_MAGIC_VALUE); … … 68 68 * @param[in,out] fifo The dynamic queue. 69 69 * @param[in] size The initial queue size. 70 * @return sEOK on success.71 * @return sEINVAL if the queue is not valid.72 * @return sEBADMEM if the fifo parameter is NULL.73 * @return sENOMEM if there is not enough memory left.74 */ 75 int dyn_fifo_initialize(dyn_fifo_ reffifo, int 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) 76 76 { 77 77 if (!fifo) … … 100 100 * this limit. May be zero or negative to indicate no 101 101 * limit. 102 * @return sEOK on success.103 * @return sEINVAL if the queue is not valid.104 * @return sENOMEM if there is not enough memory left.105 */ 106 int dyn_fifo_push(dyn_fifo_ reffifo, int value, int max_size)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) 107 107 { 108 108 int *new_items; … … 150 150 * 151 151 * @param[in,out] fifo The dynamic queue. 152 * @return sValue of the first item in the queue.153 * @return sEINVAL if the queue is not valid.154 * @return sENOENT if the queue is empty.155 */ 156 int dyn_fifo_pop(dyn_fifo_ reffifo)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) 157 157 { 158 158 int value; … … 172 172 * 173 173 * @param[in,out] fifo The dynamic queue. 174 * @return siValue of the first item in the queue.175 * @return sEINVAL if the queue is not valid.176 * @return sENOENT if the queue is empty.177 */ 178 int dyn_fifo_value(dyn_fifo_ reffifo)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) 179 179 { 180 180 if (!dyn_fifo_is_valid(fifo)) … … 190 190 * 191 191 * @param[in,out] fifo The dynamic queue. 192 * @return sEOK on success.193 * @return sEINVAL if the queue is not valid.194 */ 195 int dyn_fifo_destroy(dyn_fifo_ reffifo)192 * @return EOK on success. 193 * @return EINVAL if the queue is not valid. 194 */ 195 int dyn_fifo_destroy(dyn_fifo_t *fifo) 196 196 { 197 197 if (!dyn_fifo_is_valid(fifo))
Note:
See TracChangeset
for help on using the changeset viewer.