This file provides implementation of atomic_test(). It tests the functionality of the atomic variable API.
Scope of the Test
API tested:
This file is pjlib-test/atomic.c
#include "test.h"
#include <pjlib.h>
#if INCLUDE_ATOMIC_TEST
int atomic_test(void)
{
if (!pool)
return -10;
if (rc != 0) {
return -20;
}
return -30;
return -40;
return -50;
return -60;
return -60;
return -70;
if (rc != 0)
return -80;
return 0;
}
#else
int dummy_atomic_test;
#endif
pj_status_t pj_atomic_create(pj_pool_t *pool, pj_atomic_value_t initial, pj_atomic_t **atomic)
void pj_atomic_inc(pj_atomic_t *atomic_var)
pj_status_t pj_atomic_destroy(pj_atomic_t *atomic_var)
void pj_atomic_add(pj_atomic_t *atomic_var, pj_atomic_value_t value)
void pj_atomic_dec(pj_atomic_t *atomic_var)
pj_atomic_value_t pj_atomic_get(pj_atomic_t *atomic_var)
void pj_atomic_set(pj_atomic_t *atomic_var, pj_atomic_value_t value)
struct pj_atomic_t pj_atomic_t
Definition: types.h:226
int pj_status_t
Definition: types.h:68
pj_pool_t * pj_pool_create(pj_pool_factory *factory, const char *name, pj_size_t initial_size, pj_size_t increment_size, pj_pool_callback *callback)
void pj_pool_release(pj_pool_t *pool)