Classes | Macros | Typedefs | Functions
sync_test.cc File Reference
#include <stdio.h>
#include <stdlib.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include <grpc/support/time.h>
#include "src/core/lib/gprpp/thd.h"
#include "test/core/util/test_config.h"
Include dependency graph for sync_test.cc:

Go to the source code of this file.

Classes

struct  queue
 
struct  test
 

Macros

#define N   4
 

Typedefs

typedef struct queue queue
 

Functions

static void consumer (void *v)
 
static void inc (void *v)
 
static void inc_by_turns (void *v)
 
static void inc_with_1ms_delay (void *v)
 
static void inc_with_1ms_delay_event (void *v)
 
static void inctry (void *v)
 
int main (int argc, char *argv[])
 
static void many_producers (void *v)
 
static void mark_thread_done (struct test *m)
 
void queue_append (queue *q, int x)
 
void queue_destroy (queue *q)
 
void queue_init (queue *q)
 
int queue_remove (queue *q, int *head, gpr_timespec abs_deadline)
 
int queue_try_append (queue *q, int x)
 
static void refcheck (void *v)
 
static void refinc (void *v)
 
static void statsinc (void *v)
 
static void test (const char *name, void(*body)(void *m), void(*extra)(void *m), int timeout_s, int incr_step)
 
static void test_create_threads (struct test *m, void(*body)(void *arg))
 
static void test_destroy (struct test *m)
 
static struct testtest_new (int nthreads, int64_t iterations, int incr_step)
 
static void test_wait (struct test *m)
 
static int thread_id (struct test *m)
 

Macro Definition Documentation

◆ N

#define N   4

Definition at line 37 of file sync_test.cc.

Typedef Documentation

◆ queue

typedef struct queue queue

Function Documentation

◆ consumer()

static void consumer ( void *  v)
static

Definition at line 387 of file sync_test.cc.

◆ inc()

static void inc ( void *  v)
static

Definition at line 285 of file sync_test.cc.

◆ inc_by_turns()

static void inc_by_turns ( void *  v)
static

Definition at line 313 of file sync_test.cc.

◆ inc_with_1ms_delay()

static void inc_with_1ms_delay ( void *  v)
static

Definition at line 331 of file sync_test.cc.

◆ inc_with_1ms_delay_event()

static void inc_with_1ms_delay_event ( void *  v)
static

Definition at line 349 of file sync_test.cc.

◆ inctry()

static void inctry ( void *  v)
static

Definition at line 298 of file sync_test.cc.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 459 of file sync_test.cc.

◆ many_producers()

static void many_producers ( void *  v)
static

Definition at line 367 of file sync_test.cc.

◆ mark_thread_done()

static void mark_thread_done ( struct test m)
static

Definition at line 225 of file sync_test.cc.

◆ queue_append()

void queue_append ( queue q,
int  x 
)

Definition at line 68 of file sync_test.cc.

◆ queue_destroy()

void queue_destroy ( queue q)

Definition at line 61 of file sync_test.cc.

◆ queue_init()

void queue_init ( queue q)

Definition at line 52 of file sync_test.cc.

◆ queue_remove()

int queue_remove ( queue q,
int head,
gpr_timespec  abs_deadline 
)

Definition at line 111 of file sync_test.cc.

◆ queue_try_append()

int queue_try_append ( queue q,
int  x 
)

Definition at line 92 of file sync_test.cc.

◆ refcheck()

static void refcheck ( void *  v)
static

Definition at line 441 of file sync_test.cc.

◆ refinc()

static void refinc ( void *  v)
static

Definition at line 422 of file sync_test.cc.

◆ statsinc()

static void statsinc ( void *  v)
static

Definition at line 407 of file sync_test.cc.

◆ test()

static void test ( const char *  name,
void(*)(void *m)  body,
void(*)(void *m)  extra,
int  timeout_s,
int  incr_step 
)
static

Definition at line 241 of file sync_test.cc.

◆ test_create_threads()

static void test_create_threads ( struct test m,
void(*)(void *arg body 
)
static

Definition at line 194 of file sync_test.cc.

◆ test_destroy()

static void test_destroy ( struct test m)
static

Definition at line 184 of file sync_test.cc.

◆ test_new()

static struct test* test_new ( int  nthreads,
int64_t  iterations,
int  incr_step 
)
static

Definition at line 162 of file sync_test.cc.

◆ test_wait()

static void test_wait ( struct test m)
static

Definition at line 203 of file sync_test.cc.

◆ thread_id()

static int thread_id ( struct test m)
static

Definition at line 215 of file sync_test.cc.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:33