Go to the documentation of this file.
70 for (
i = 0;
i !=
m->thread_count;
i++) {
72 m->threads[
i].Start();
79 for (
i = 0;
i !=
m->thread_count;
i++) {
90 static void test(
const char*
name,
void (*body)(
void*
m),
int timeout_s,
108 if (
m->counter !=
m->thread_count *
m->iterations *
m->incr_step) {
109 fprintf(
stderr,
"counter %ld threads %d iterations %ld\n",
110 static_cast<long>(
m->counter),
m->thread_count,
111 static_cast<long>(
m->iterations));
118 fprintf(
stderr,
" done %lld.%09d s\n",
128 for (
i = 0;
i !=
m->iterations;
i++) {
140 for (
i = 0;
i !=
m->iterations;) {
151 int main(
int argc,
char* argv[]) {
#define GPR_SPINLOCK_INITIALIZER
static void inctry(void *v)
static void test_destroy(struct test *m)
GPRAPI void gpr_free(void *ptr)
GPRAPI void * gpr_malloc(size_t size)
#define gpr_spinlock_lock(lock)
static uv_thread_t * threads
GPRAPI int gpr_time_cmp(gpr_timespec a, gpr_timespec b)
GPRAPI gpr_timespec gpr_time_sub(gpr_timespec a, gpr_timespec b)
static void test(const char *name, void(*body)(void *m), int timeout_s, int incr_step)
#define gpr_spinlock_unlock(lock)
GPRAPI gpr_timespec gpr_now(gpr_clock_type clock)
#define gpr_spinlock_trylock(lock)
int main(int argc, char *argv[])
static void test_create_threads(struct test *m, void(*body)(void *arg))
GPRAPI gpr_timespec gpr_time_add(gpr_timespec a, gpr_timespec b)
GPRAPI gpr_timespec gpr_time_from_micros(int64_t us, gpr_clock_type clock_type)
grpc_core::Thread * threads
static void test_wait(struct test *m)
static struct test * test_new(int threads, int64_t iterations, int incr_step)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:20