#include <freeradius-devel/io/atomic_queue.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/util/table.h>
#include <string.h>
#include <sys/time.h>
Go to the source code of this file.
◆ OFFSET
◆ queue_test_t
| typedef void(* queue_test_t) (TALLOC_CTX *ctx, int size) |
◆ request_t
◆ queue_type_t
◆ main()
| int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
◆ queue_exercise()
Fill the queue to capacity, check it refuses one more, then drain it.
Exits the process on the first wrong answer.
Definition at line 78 of file atomic_queue_test.c.
◆ request_verify()
◆ test_malloc()
| static void test_malloc |
( |
TALLOC_CTX * |
ctx, |
|
|
int |
size |
|
) |
| |
|
static |
Queue allocated outside talloc, but owned by a talloc context.
The only talloc'd block is the owner handle, so the context holds exactly one child, and freeing the context releases the raw queue through the handle.
Definition at line 194 of file atomic_queue_test.c.
◆ test_talloc()
| static void test_talloc |
( |
TALLOC_CTX * |
ctx, |
|
|
int |
size |
|
) |
| |
|
static |
◆ usage()
◆ debug_lvl
◆ queue_tests
Initial value:= {
}
static void test_malloc(TALLOC_CTX *ctx, int size)
Queue allocated outside talloc, but owned by a talloc context.
@ QUEUE_TYPE_MALLOC
fr_atomic_queue_malloc, raw queue owned by a talloc handle.
@ QUEUE_TYPE_TALLOC
fr_atomic_queue_talloc, queue lives in the talloc hierarchy.
static void test_talloc(TALLOC_CTX *ctx, int size)
Queue allocated inside the talloc hierarchy.
Definition at line 218 of file atomic_queue_test.c.
◆ queue_type_table
Initial value:= {
}
#define L(_str)
Helper for initialising arrays of string literals.
Definition at line 47 of file atomic_queue_test.c.
◆ queue_type_table_len