miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
Loading...
Searching...
No Matches
main.c File Reference
#include <pthread.h>
#include <unistd.h>
#include <string.h>
#include <stdint.h>
Include dependency graph for main.c:

Macros

#define N_THREADS   4

Functions

static void write_str (const char *s)
static void * thread_set_flag (void *arg)
static void test_pthread_create_join (void)
static void * thread_increment (void *arg)
static void test_pthread_mutex (void)
static void * thread_mark_done (void *arg)
static void test_pthread_create_many (void)
int main (void)

Variables

static pthread_mutex_t g_mutex = PTHREAD_MUTEX_INITIALIZER
static volatile int g_counter = 0
static volatile int done_flags [N_THREADS]

Macro Definition Documentation

◆ N_THREADS

#define N_THREADS   4

Function Documentation

◆ main()

int main ( void )
Here is the call graph for this function:

◆ test_pthread_create_join()

void test_pthread_create_join ( void )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_pthread_create_many()

void test_pthread_create_many ( void )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_pthread_mutex()

void test_pthread_mutex ( void )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_increment()

void * thread_increment ( void * arg)
static
Here is the caller graph for this function:

◆ thread_mark_done()

void * thread_mark_done ( void * arg)
static
Here is the caller graph for this function:

◆ thread_set_flag()

void * thread_set_flag ( void * arg)
static
Here is the caller graph for this function:

◆ write_str()

void write_str ( const char * s)
static
Here is the call graph for this function:

Variable Documentation

◆ done_flags

volatile int done_flags[N_THREADS]
static

◆ g_counter

volatile int g_counter = 0
static

◆ g_mutex

pthread_mutex_t g_mutex = PTHREAD_MUTEX_INITIALIZER
static