diff options
author | jerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68> | 2002-12-30 06:19:27 +0000 |
---|---|---|
committer | jerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68> | 2002-12-30 06:19:27 +0000 |
commit | 990ff390f7b756798ab1920f21d6077c76bbb3a3 (patch) | |
tree | cf8a951e6b9f094da8d5b9e36292f17f63c17072 | |
parent | edb8381a0c6c9cf7e26d828029f22808099abb17 (diff) | |
download | libapr-util-990ff390f7b756798ab1920f21d6077c76bbb3a3.tar.gz |
Use apr_uint32_t rather than apr_size_t for the maximum queue size.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@58815 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | include/apr_queue.h | 4 | ||||
-rw-r--r-- | misc/apr_queue.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/include/apr_queue.h b/include/apr_queue.h index 4d408713..32460039 100644 --- a/include/apr_queue.h +++ b/include/apr_queue.h @@ -94,7 +94,7 @@ typedef struct apr_queue_t apr_queue_t; * @param a pool to allocate queue from */ APU_DECLARE(apr_status_t) apr_queue_create(apr_queue_t **queue, - apr_size_t queue_capacity, + apr_uint32_t queue_capacity, apr_pool_t *a); /** @@ -151,7 +151,7 @@ APU_DECLARE(apr_status_t) apr_queue_trypop(apr_queue_t *queue, void **data); * @param queue the queue * @returns the size of the queue */ -APU_DECLARE(apr_size_t) apr_queue_size(apr_queue_t *queue); +APU_DECLARE(apr_uint32_t) apr_queue_size(apr_queue_t *queue); /** * interrupt all the threads blocking on this queue. diff --git a/misc/apr_queue.c b/misc/apr_queue.c index f5548c12..4808a71f 100644 --- a/misc/apr_queue.c +++ b/misc/apr_queue.c @@ -81,10 +81,10 @@ struct apr_queue_t { void **data; - apr_size_t nelts; /**< # elements */ - apr_size_t in; /**< next empty location */ - apr_size_t out; /**< next filled location */ - apr_size_t bounds;/**< max size of queue */ + apr_uint32_t nelts; /**< # elements */ + apr_uint32_t in; /**< next empty location */ + apr_uint32_t out; /**< next filled location */ + apr_uint32_t bounds;/**< max size of queue */ apr_thread_mutex_t *one_big_mutex; apr_thread_cond_t *not_empty; apr_thread_cond_t *not_full; @@ -136,7 +136,7 @@ static apr_status_t queue_destroy(void *data) * Initialize the apr_queue_t. */ APU_DECLARE(apr_status_t) apr_queue_create(apr_queue_t **q, - apr_size_t queue_capacity, + apr_uint32_t queue_capacity, apr_pool_t *a) { apr_status_t rv; @@ -288,7 +288,7 @@ APU_DECLARE(apr_status_t) apr_queue_trypush(apr_queue_t *queue, void *data) /** * not thread safe */ -APU_DECLARE(apr_size_t) apr_queue_size(apr_queue_t *queue) { +APU_DECLARE(apr_uint32_t) apr_queue_size(apr_queue_t *queue) { return queue->nelts; } |