kinetic-c  v0.12.0
Seagate Kinetic Protocol Client Library for C
Macros | Functions | Variables
test_threadpool.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <assert.h>
#include <err.h>
#include <poll.h>
#include "threadpool.h"

Go to the source code of this file.

Macros

#define ATOMIC_BOOL_COMPARE_AND_SWAP(PTR, OLD, NEW)   (__sync_bool_compare_and_swap(PTR, OLD, NEW))
 

Functions

static size_t fibs (size_t arg)
 
static void dump_stats (const char *prefix, struct threadpool_info *stats)
 
static void task_cb (void *udata)
 
static void inf_loop_cb (void *env)
 
int main (int argc, char **argv)
 

Variables

static size_t task_count = 0
 

Macro Definition Documentation

#define ATOMIC_BOOL_COMPARE_AND_SWAP (   PTR,
  OLD,
  NEW 
)    (__sync_bool_compare_and_swap(PTR, OLD, NEW))

Definition at line 42 of file test_threadpool.c.

Function Documentation

static size_t fibs ( size_t  arg)
static

Definition at line 31 of file test_threadpool.c.

static void dump_stats ( const char *  prefix,
struct threadpool_info stats 
)
static
static void task_cb ( void *  udata)
static
static void inf_loop_cb ( void *  env)
static

Definition at line 68 of file test_threadpool.c.

int main ( int  argc,
char **  argv 
)

Variable Documentation

size_t task_count = 0
static

Definition at line 29 of file test_threadpool.c.