|
PatchworkOS
28a9544
A non-POSIX operating system.
|
#include <stdatomic.h>#include <stdbool.h>#include <stdint.h>#include <stdio.h>#include <threads.h>#include <time.h>Go to the source code of this file.
Macros | |
| #define | PRIME_MAX (10000000) |
Functions | |
| bool | is_prime (uint64_t n) |
| static void | count_primes (uint64_t start, uint64_t end) |
| static int | thread_entry (void *arg) |
| static void | benchmark (uint64_t threadAmount) |
| int | main (void) |
Variables | |
| static atomic_long | count |
| static atomic_long | next |
|
static |
Definition at line 68 of file main.c.
References atomic_init, atomic_load, clock(), CLOCKS_PER_SEC, count, fflush(), next, NULL, printf(), start(), stdout, thrd_create(), thrd_join(), thrd_success, thread_entry(), and threads.
Referenced by main().
Definition at line 39 of file main.c.
References atomic_fetch_add, count, is_prime(), and start().
Referenced by thread_entry().
Definition at line 13 of file main.c.
Referenced by count_primes().
| int main | ( | void | ) |
Definition at line 100 of file main.c.
References benchmark(), printf(), and threads.
|
static |
Definition at line 50 of file main.c.
References atomic_fetch_add, count_primes(), next, PRIME_MAX, start(), and thrd_success.
Referenced by benchmark().
|
static |
Definition at line 10 of file main.c.
Referenced by _file_fill_buffer(), _file_flush_buffer(), _syscall_getdents(), _syscall_read(), _syscall_write(), acpi_table_read(), aml_object_count_children(), argsplit(), argsplit_buf(), benchmark(), const_null_read(), const_null_write(), const_one_read(), const_zero_read(), count_primes(), ctl_dispatch(), dentry_generic_getdents(), fb_info_read(), getdents(), kbd_events_read(), kbd_name_read(), local_socket_recv(), local_socket_send(), log_file_op_read(), log_file_op_write(), mouse_events_read(), mouse_name_read(), note_queue_write(), page_table_count_pages_with_flags(), perf_cpu_read(), perf_mem_read(), pipe_read(), pipe_write(), pmm_alloc_bitmap(), pmm_alloc_pages(), pmm_bitmap_alloc(), pmm_bitmap_free(), pmm_free_pages(), pmm_free_pages_unlocked(), pmm_free_region(), process_cmdline_read(), process_cwd_read(), process_note_write(), process_prio_read(), process_prio_write(), process_stat_read(), process_wait_read(), ramfs_read(), ramfs_write(), read(), read_fd(), readfile(), ref_dec(), ring_read(), ring_read_at(), ring_write(), socket_data_read(), socket_data_write(), socket_factory_read(), SYSCALL_DEFINE(), SYSCALL_DEFINE(), SYSCALL_DEFINE(), thread_send_note(), vfs_getdents(), vfs_read(), vfs_write(), vremovef(), vwritef(), write(), and writefile().
|
static |
Definition at line 11 of file main.c.
Referenced by _heap_free(), aml_alias_obj_traverse(), aml_namespace_find(), aml_namespace_find_by_name_string(), aml_namespace_find_by_path(), aml_namespace_search_single_name(), benchmark(), interactive_handle_ansi(), list_add(), path_walk(), path_walk_single_step(), pmm_stack_free(), realloc(), sched_get_neighbor(), sched_invoke(), and thread_entry().