|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
Go to the source code of this file.
Data Structures | |
| struct | thread |
| struct | thread_slot_t |
| struct | thread_bucket |
Macros | |
| #define | THREAD_MAKE_ID(id, gen) |
| #define | THREAD_GET_ID(thread_id) |
| #define | THREAD_GET_GEN(thread_id) |
Typedefs | |
| typedef uint64_t | thread_id |
| typedef struct thread | thread_t |
| typedef struct thread_bucket | thread_bucket_t |
Enumerations | |
| enum | { THREAD_USER = (1 << 0) , THREAD_KERNEL = ~(1 << 0) , THREAD_PREEMPT_ENABLE = (1 << 1) , THREAD_PREEMPT_DISABLE = ~(1 << 1) } |
| enum | { THREAD_STATE_CREATE = 0 , THREAD_STATE_READY = 1 , THREAD_STATE_RUNNING = 2 , THREAD_STATE_HAL = 3 , THREAD_STATE_TERMINATED = 3 } |
Functions | |
| struct thread | __attribute__ ((aligned(64))) |
| thread_id | vxCreateThread (const uintptr_t entry, uint16_t core_affinity, uint8_t priority, uint16_t flags) |
| void | vxThreadExit () |
Variables | |
| typedef | __attribute__ |
| thread_id | id |
| uint16_t | core_affinity |
| uint8_t | state |
| uint8_t | priority |
| uint16_t | flags |
| uint64_t | last_run_time |
| uint32_t | uuid |
| boolean_t | has_update_run_time |
| uint8_t | _pad1 [64 - 29] |
| uintptr_t | entry_addr |
| uint64_t | stack |
| cpu_register_t | reg |
| #define THREAD_GET_GEN | ( | thread_id | ) |
| #define THREAD_GET_ID | ( | thread_id | ) |
Definition at line 61 of file thread.h.
Referenced by vxUpdateThreadSlot().
| #define THREAD_MAKE_ID | ( | id, | |
| gen ) |
| typedef struct thread_bucket thread_bucket_t |
| anonymous enum |
| anonymous enum |
| thread_id vxCreateThread | ( | const uintptr_t | entry, |
| uint16_t | core_affinity, | ||
| uint8_t | priority, | ||
| uint16_t | flags ) |
References core_affinity, flags, and priority.
| void vxThreadExit | ( | ) |
Definition at line 70 of file thread.c.
References get_current_core_cpuid(), queue, THREAD_STATE_TERMINATED, and vxSchedulerGetCurrentQueue().
Referenced by workqueue_process().
| struct xhci_input_ctx __attribute__ |
| uint16_t core_affinity |
Definition at line 2 of file thread.h.
Referenced by create_thread(), and vxCreateThread().
| uintptr_t entry_addr |
Definition at line 12 of file thread.h.
Referenced by elf_prepare_stack(), and execve().
| uint32_t flags |
Definition at line 5 of file thread.h.
Referenced by __attribute__(), __attribute__(), console_add_space(), console_newline(), console_printf(), console_vaprintf(), create_thread(), elf_pflags_to_page_flags(), gdt_make_entry(), handle_tcp(), ATAPIModule::identify(), ioapic_add_irq_gsi_map(), irq_is_enabled(), irq_restore(), irq_save(), iso9660_get_rr_name(), lock_irqsave(), mmap_handle_anonymous(), mmap_prot_to_flags(), mmap_resolve_virt_addr(), notify_dev_create(), paging_physwindow_mmap(), paging_physwindow_mmap(), parsing_madt(), ATAPIModule::read(), send_command(), syscall_mmap(), syscall_open(), unlock_irqrestore(), vfs_mount(), vxCreateThread(), vxMmap(), vxMultipleMmap(), and ATAPIModule::write().
| thread_id id |
Definition at line 1 of file thread.h.
Referenced by update_core_gs().
| uint8_t priority |
Definition at line 4 of file thread.h.
Referenced by create_thread(), and vxCreateThread().
| cpu_register_t reg |
Definition at line 14 of file thread.h.
Referenced by __attribute__(), apic_read(), apic_write(), cmos_read(), hpet_read(), hpet_write(), ioapic_isr_get_vector(), XHCIModule::probe_ports(), vxRestoreRegister(), vxSaveRegister(), and vxSchedulerTick().
| uint64_t stack |
Definition at line 13 of file thread.h.
Referenced by __attribute__(), __attribute__(), __attribute__(), create_thread(), INIT(), INIT(), module_loader(), vxRestoreRegister(), and vxSaveRegister().