GME
13
|
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more 00002 * contributor license agreements. See the NOTICE file distributed with 00003 * this work for additional information regarding copyright ownership. 00004 * The ASF licenses this file to You under the Apache License, Version 2.0 00005 * (the "License"); you may not use this file except in compliance with 00006 * the License. You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #ifndef APR_QUEUE_H 00018 #define APR_QUEUE_H 00019 00028 #include "apu.h" 00029 #include "apr_errno.h" 00030 #include "apr_pools.h" 00031 00032 #if APR_HAS_THREADS 00033 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif /* __cplusplus */ 00037 00047 typedef struct apr_queue_t apr_queue_t; 00048 00055 APU_DECLARE(apr_status_t) apr_queue_create(apr_queue_t **queue, 00056 unsigned int queue_capacity, 00057 apr_pool_t *a); 00058 00068 APU_DECLARE(apr_status_t) apr_queue_push(apr_queue_t *queue, void *data); 00069 00079 APU_DECLARE(apr_status_t) apr_queue_pop(apr_queue_t *queue, void **data); 00080 00091 APU_DECLARE(apr_status_t) apr_queue_trypush(apr_queue_t *queue, void *data); 00092 00103 APU_DECLARE(apr_status_t) apr_queue_trypop(apr_queue_t *queue, void **data); 00104 00113 APU_DECLARE(unsigned int) apr_queue_size(apr_queue_t *queue); 00114 00120 APU_DECLARE(apr_status_t) apr_queue_interrupt_all(apr_queue_t *queue); 00121 00128 APU_DECLARE(apr_status_t) apr_queue_term(apr_queue_t *queue); 00129 00130 #ifdef __cplusplus 00131 } 00132 #endif 00133 00136 #endif /* APR_HAS_THREADS */ 00137 00138 #endif /* APRQUEUE_H */