|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
#include <stdio.h>#include <stdlib.h>#include <errno.h>#include <string.h>#include <kos/thread.h>#include <kos/once.h>#include <kos/mutex.h>#include <kos/init.h>#include <arch/arch.h>#include <dc/maple.h>#include <dc/maple/controller.h>Macros | |
| #define | UNUSED __attribute__((unused)) |
| #define | THD_COUNT (475 * (DBL_MEM? 2 : 1)) |
Functions | |
| static void | inner_once_func (void) |
| static void * | inner_thd_func (void *param UNUSED) |
| static void | once_func (void) |
| static void * | thd_func (void *param UNUSED) |
| KOS_INIT_FLAGS (INIT_DEFAULT|INIT_MALLOCSTATS) | |
| int | main (int argc, char *argv[]) |
Variables | |
| static kthread_once_t | once = KTHREAD_ONCE_INIT |
| static mutex_t | lock = MUTEX_INITIALIZER |
| static int | counter = 0 |
| #define UNUSED __attribute__((unused)) |
|
static |
References counter, lock, mutex_lock(), and mutex_unlock().
Referenced by inner_thd_func().
|
static |
References inner_once_func(), kthread_once(), KTHREAD_ONCE_INIT, NULL, printf, thd_get_current(), and kthread_t::tid.
Referenced by once_func().
| KOS_INIT_FLAGS | ( | INIT_DEFAULT| | INIT_MALLOCSTATS | ) |
| int main | ( | int | argc, |
| char * | argv[] ) |
References CONT_A, CONT_B, cont_btn_callback(), CONT_START, CONT_X, CONT_Y, counter, fprintf, NULL, printf, THD_COUNT, thd_create(), thd_func(), and thd_join().
|
static |
References inner_thd_func(), NULL, printf, thd_create(), thd_get_current(), thd_join(), and kthread_t::tid.
Referenced by thd_func().
|
static |
References kthread_once(), NULL, once, once_func(), printf, thd_get_current(), and kthread_t::tid.
Referenced by main().
|
static |
Referenced by inner_once_func(), main(), main(), run_stop_source(), test_shared_lock(), and test_stop_source().
|
static |
|
static |
Referenced by thd_func().