diff options
| author | Vadim Yanitskiy <axilirator@gmail.com> | 2017-08-31 02:31:18 +0700 |
|---|---|---|
| committer | Vadim Yanitskiy <axilirator@gmail.com> | 2017-09-04 04:37:21 +0700 |
| commit | 4922c8376713196d909cb7b6d204cb10664116c2 (patch) | |
| tree | ec8582ed001458bf6bf429f26216072d724e6c25 | |
| parent | 617daf02012a4e4d1a104d52f2517ad81b72dd54 (diff) | |
procqueue: expose the processing queue struct definition
To be able to use processing queues from outside, the pq struct
should be shared in the corresponding header file.
| -rw-r--r-- | include/osmocom/gapk/procqueue.h | 11 | ||||
| -rw-r--r-- | src/procqueue.c | 10 |
2 files changed, 9 insertions, 12 deletions
diff --git a/include/osmocom/gapk/procqueue.h b/include/osmocom/gapk/procqueue.h index 708f767..b07970d 100644 --- a/include/osmocom/gapk/procqueue.h +++ b/include/osmocom/gapk/procqueue.h @@ -22,8 +22,6 @@ #include <stdint.h> #include <stdio.h> /* for FILE */ -struct pq; - struct pq_item { /*! input frame size (in bytes). '0' in case of variable frames */ int len_in; @@ -41,6 +39,15 @@ struct pq_item { void (*exit)(void *state); }; +#define VAR_BUF_SIZE 320 +#define MAX_PQ_ITEMS 8 + +struct pq { + unsigned n_items; + struct pq_item *items[MAX_PQ_ITEMS]; + void *buffers[MAX_PQ_ITEMS + 1]; +}; + /* Management */ struct pq * pq_create(void); void pq_destroy(struct pq *pq); diff --git a/src/procqueue.c b/src/procqueue.c index f54da40..cba6dbb 100644 --- a/src/procqueue.c +++ b/src/procqueue.c @@ -23,16 +23,6 @@ #include <osmocom/gapk/procqueue.h> -#define VAR_BUF_SIZE 320 -#define MAX_PQ_ITEMS 8 - -struct pq { - int n_items; - struct pq_item* items[MAX_PQ_ITEMS]; - void * buffers[MAX_PQ_ITEMS+1]; -}; - - /* crate a new (empty) processing queue */ struct pq * pq_create(void) |
