|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
#include <kos/thread.h>#include <kos/barrier.h>#include <dc/wdt.h>#include <stdlib.h>#include <stdint.h>#include <stdbool.h>#include <stdatomic.h>#include <stdio.h>Macros | |
| #define | WATCHDOG_TIMEOUT (10 * 1000 * 1000) /* 10s */ |
| #define | THREAD_COUNT 15 /* Number of threads to spawn */ |
| #define | BARRIER_COUNT 5 /* Number of barriers within pipeline */ |
| #define | ITERATION_COUNT 10 /* Number of times to run through pipeline */ |
Functions | |
| static bool | run_iteration (uintptr_t tid) |
| static void * | thread_exec (void *user_data) |
| static void | watchdog_timeout (void *user_data) |
| int | main (int argc, char *argv[]) |
Variables | ||
| struct { | ||
| thd_barrier_t barrier | ||
| atomic_uint pre_barrier_counter | ||
| atomic_uint serial_barrier_counter | ||
| atomic_uint post_barrier_counter | ||
| } | data [BARRIER_COUNT] = { 0 } | |
| #define BARRIER_COUNT 5 /* Number of barriers within pipeline */ |
Referenced by main(), and run_iteration().
| #define ITERATION_COUNT 10 /* Number of times to run through pipeline */ |
Referenced by main(), and thread_exec().
| #define THREAD_COUNT 15 /* Number of threads to spawn */ |
Referenced by main().
| #define WATCHDOG_TIMEOUT (10 * 1000 * 1000) /* 10s */ |
Referenced by main().
| int main | ( | int | argc, |
| char * | argv[] ) |
References barrier, BARRIER_COUNT, data, fprintf, ITERATION_COUNT, NULL, post_barrier_counter, pre_barrier_counter, printf, serial_barrier_counter, thd_barrier_destroy(), thd_barrier_init(), thd_create(), thd_join(), THREAD_COUNT, thread_exec(), WATCHDOG_TIMEOUT, watchdog_timeout(), wdt_disable(), and wdt_enable_timer().
|
static |
References barrier, BARRIER_COUNT, data, fprintf, printf, THD_BARRIER_SERIAL_THREAD, and thd_barrier_wait().
Referenced by thread_exec().
|
static |
References ITERATION_COUNT, and run_iteration().
Referenced by main().
| thd_barrier_t barrier |
Referenced by main(), and run_iteration().
| struct { ... } data[BARRIER_COUNT] |
Referenced by destructor(), handle_request(), main(), main(), main(), run_iteration(), thd_func(), kthread_worker_t::thd_worker_create(), write_entry(), and write_game_entry().
| atomic_uint post_barrier_counter |
Referenced by main().
| atomic_uint pre_barrier_counter |
Referenced by main().
| atomic_uint serial_barrier_counter |
Referenced by main().