Skip to content
Snippets Groups Projects
threadpool_lib.h 722 B
Newer Older
  • Learn to ignore specific revisions
  • spruett3's avatar
    spruett3 committed
    #include <time.h>
    
    #include <stdio.h>
    
    spruett3's avatar
    spruett3 committed
    
    
    /**
     * These functions are mostly used by the tests and test driver.
     */
    
    spruett3's avatar
    spruett3 committed
    struct timespec timespec_diff(struct timespec start, struct timespec end);
    void timespec_print(struct timespec ts, char *buf, size_t buflen);
    int count_number_of_threads(void);
    
    struct benchmark_data;
    struct benchmark_data * start_benchmark(void);
    void stop_benchmark(struct benchmark_data * bdata);
    void report_benchmark_results(struct benchmark_data *bdata);
    void report_benchmark_results_to_human(FILE *file, struct benchmark_data *bdata);
    
    
    /* Worker threads can install this handler to guess whether a segmentation
     * fault may be the result of stack overflow. */
    void install_stack_overflow_handler(void);