Blender  V2.93
BLI_gsqueue.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
20 #pragma once
21 
26 #include "BLI_utildefines.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 typedef struct _GSQueue GSQueue;
33 
34 GSQueue *BLI_gsqueue_new(const size_t elem_size);
36 size_t BLI_gsqueue_len(const GSQueue *queue);
37 void BLI_gsqueue_pop(GSQueue *queue, void *r_item);
38 void BLI_gsqueue_push(GSQueue *queue, const void *item);
40 
41 #ifdef __cplusplus
42 }
43 #endif
void BLI_gsqueue_free(GSQueue *queue)
Definition: gsqueue.c:107
void BLI_gsqueue_push(GSQueue *queue, const void *item)
Definition: gsqueue.c:122
GSQueue * BLI_gsqueue_new(const size_t elem_size)
Definition: gsqueue.c:83
void BLI_gsqueue_pop(GSQueue *queue, void *r_item)
Definition: gsqueue.c:162
bool BLI_gsqueue_is_empty(const GSQueue *queue)
Definition: gsqueue.c:193
size_t BLI_gsqueue_len(const GSQueue *queue)
Definition: gsqueue.c:185
ThreadQueue * queue
all scheduled work for the cpu
size_t elem_size
Definition: gsqueue.c:49