Changeset 0b749a3 in mainline for uspace/lib/c/include/adt/dynamic_fifo.h
- Timestamp:
- 2010-11-22T15:39:53Z (15 years ago)
- 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. - File:
-
- 1 moved
-
uspace/lib/c/include/adt/dynamic_fifo.h (moved) (moved from uspace/lib/net/include/ip_local.h ) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/adt/dynamic_fifo.h
r9a1d8ab r0b749a3 27 27 */ 28 28 29 /** @addtogroup ip30 * @{29 /** @addtogroup libc 30 * @{ 31 31 */ 32 32 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 */ 35 37 36 #i nclude <async.h>37 # include <ipc/services.h>38 #ifndef LIBC_DYNAMIC_FIFO_H_ 39 #define LIBC_DYNAMIC_FIFO_H_ 38 40 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 */ 44 typedef struct dyn_fifo dyn_fifo_t; 43 45 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 */ 50 struct 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 63 extern int dyn_fifo_initialize(dyn_fifo_t *, int); 64 extern int dyn_fifo_destroy(dyn_fifo_t *); 65 extern int dyn_fifo_push(dyn_fifo_t *, int, int); 66 extern int dyn_fifo_pop(dyn_fifo_t *); 67 extern int dyn_fifo_value(dyn_fifo_t *); 57 68 58 69 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
