Ignore:
Timestamp:
2010-11-22T15:39:53Z (15 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0eddb76, aae339e9
Parents:
9a1d8ab (diff), 8cd1aa5e (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.
Message:

Merge development/ changes

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/adt/dynamic_fifo.h

    r9a1d8ab r0b749a3  
    2727 */
    2828
    29 /** @addtogroup ip
    30  * @{
     29/** @addtogroup libc
     30 *  @{
    3131 */
    3232
    33 #ifndef __NET_IP_LOCAL_H__
    34 #define __NET_IP_LOCAL_H__
     33/** @file
     34 * Dynamic first in first out positive integer queue.
     35 * Possitive integer values only.
     36 */
    3537
    36 #include <async.h>
    37 #include <ipc/services.h>
     38#ifndef LIBC_DYNAMIC_FIFO_H_
     39#define LIBC_DYNAMIC_FIFO_H_
    3840
    39 #include <ip_codes.h>
    40 #include <inet.h>
    41 #include <in.h>
    42 #include <socket.h>
     41/** Type definition of the dynamic fifo queue.
     42 * @see dyn_fifo
     43 */
     44typedef struct dyn_fifo dyn_fifo_t;
    4345
    44 extern int ip_received_error_msg_local(int, device_id_t, packet_t, services_t,
    45     services_t);
    46 extern int ip_set_gateway_req_local(int, device_id_t, in_addr_t);
    47 extern int ip_packet_size_req_local(int, device_id_t, packet_dimension_ref);
    48 extern int ip_received_error_msg_local(int, device_id_t, packet_t, services_t,
    49     services_t);
    50 extern int ip_device_req_local(int, device_id_t, services_t);
    51 extern int ip_add_route_req_local(int, device_id_t, in_addr_t, in_addr_t,
    52     in_addr_t);
    53 extern int ip_send_msg_local(int, device_id_t, packet_t, services_t,
    54     services_t);
    55 extern int ip_get_route_req_local(int, ip_protocol_t, const struct sockaddr *,
    56     socklen_t, device_id_t *, void **, size_t *);
     46/** Dynamic first in first out positive integer queue.
     47 * Possitive integer values only.
     48 * The queue automatically resizes if needed.
     49 */
     50struct dyn_fifo {
     51        /** Stored item field. */
     52        int *items;
     53        /** Actual field size. */
     54        int size;
     55        /** First item in the queue index. */
     56        int head;
     57        /** Last item in the queue index. */
     58        int tail;
     59        /** Consistency check magic value. */
     60        int magic_value;
     61};
     62
     63extern int dyn_fifo_initialize(dyn_fifo_t *, int);
     64extern int dyn_fifo_destroy(dyn_fifo_t *);
     65extern int dyn_fifo_push(dyn_fifo_t *, int, int);
     66extern int dyn_fifo_pop(dyn_fifo_t *);
     67extern int dyn_fifo_value(dyn_fifo_t *);
    5768
    5869#endif
Note: See TracChangeset for help on using the changeset viewer.