View | Details | Raw Unified | Return to bug 42806
Collapse All | Expand All

(-)apr/test/testatomic.c (-5 / +5 lines)
Lines 114-120 static void test_cas_notequal(abts_case Link Here
114
static void test_casptr_equal(abts_case *tc, void *data)
114
static void test_casptr_equal(abts_case *tc, void *data)
115
{
115
{
116
    int a;
116
    int a;
117
    volatile void *target_ptr = NULL;
117
    void *target_ptr = NULL;
118
    void *old_ptr;
118
    void *old_ptr;
119
119
120
    old_ptr = apr_atomic_casptr(&target_ptr, &a, NULL);
120
    old_ptr = apr_atomic_casptr(&target_ptr, &a, NULL);
Lines 125-131 static void test_casptr_equal(abts_case Link Here
125
static void test_casptr_equal_nonnull(abts_case *tc, void *data)
125
static void test_casptr_equal_nonnull(abts_case *tc, void *data)
126
{
126
{
127
    int a, b;
127
    int a, b;
128
    volatile void *target_ptr = &a;
128
    void *target_ptr = &a;
129
    void *old_ptr;
129
    void *old_ptr;
130
130
131
    old_ptr = apr_atomic_casptr(&target_ptr, &b, &a);
131
    old_ptr = apr_atomic_casptr(&target_ptr, &b, &a);
Lines 136-142 static void test_casptr_equal_nonnull(ab Link Here
136
static void test_casptr_notequal(abts_case *tc, void *data)
136
static void test_casptr_notequal(abts_case *tc, void *data)
137
{
137
{
138
    int a, b;
138
    int a, b;
139
    volatile void *target_ptr = &a;
139
    void *target_ptr = &a;
140
    void *old_ptr;
140
    void *old_ptr;
141
141
142
    old_ptr = apr_atomic_casptr(&target_ptr, &a, &b);
142
    old_ptr = apr_atomic_casptr(&target_ptr, &a, &b);
Lines 214-221 void *APR_THREAD_FUNC thread_func_mutex( Link Here
214
void *APR_THREAD_FUNC thread_func_atomic(apr_thread_t *thd, void *data);
214
void *APR_THREAD_FUNC thread_func_atomic(apr_thread_t *thd, void *data);
215
215
216
apr_thread_mutex_t *thread_lock;
216
apr_thread_mutex_t *thread_lock;
217
volatile apr_uint32_t mutex_locks = 0;
217
apr_uint32_t mutex_locks = 0;
218
volatile apr_uint32_t atomic_ops = 0;
218
apr_uint32_t atomic_ops = 0;
219
apr_status_t exit_ret_val = 123; /* just some made up number to check on later */
219
apr_status_t exit_ret_val = 123; /* just some made up number to check on later */
220
220
221
#define NUM_THREADS 40
221
#define NUM_THREADS 40

Return to bug 42806