locking/refcounts: Include fewer headers in <linux/refcount.h>
[linux/fpc-iii.git] / drivers / isdn / hardware / eicon / dqueue.h
blob2da9799686abea340f21229aa32bd5edd845c54a
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* $Id: dqueue.h,v 1.1.2.2 2001/02/08 12:25:43 armin Exp $ */
4 #ifndef _DIVA_USER_MODE_IDI_DATA_QUEUE_H__
5 #define _DIVA_USER_MODE_IDI_DATA_QUEUE_H__
7 #define DIVA_UM_IDI_MAX_MSGS 64
9 typedef struct _diva_um_idi_data_queue {
10 int segments;
11 int max_length;
12 int read;
13 int write;
14 int count;
15 int segment_pending;
16 void *data[DIVA_UM_IDI_MAX_MSGS];
17 int length[DIVA_UM_IDI_MAX_MSGS];
18 } diva_um_idi_data_queue_t;
20 int diva_data_q_init(diva_um_idi_data_queue_t *q,
21 int max_length, int max_segments);
22 int diva_data_q_finit(diva_um_idi_data_queue_t *q);
23 int diva_data_q_get_max_length(const diva_um_idi_data_queue_t *q);
24 void *diva_data_q_get_segment4write(diva_um_idi_data_queue_t *q);
25 void diva_data_q_ack_segment4write(diva_um_idi_data_queue_t *q,
26 int length);
27 const void *diva_data_q_get_segment4read(const diva_um_idi_data_queue_t *
28 q);
29 int diva_data_q_get_segment_length(const diva_um_idi_data_queue_t *q);
30 void diva_data_q_ack_segment4read(diva_um_idi_data_queue_t *q);
32 #endif