diff --git a/kernel/drivers/ahci/ahci.cpp b/kernel/drivers/ahci/ahci.cpp index fd2a3ba36..bbc98cb3f 100644 --- a/kernel/drivers/ahci/ahci.cpp +++ b/kernel/drivers/ahci/ahci.cpp @@ -483,7 +483,6 @@ void ahci_wake_callback(void *cb, struct wait_queue_token *token) bool ahci_do_command(struct ahci_port *ahci_port, struct ahci_command_ata *buf) { struct aio_req req = {}; - memset(&req, 0, sizeof(req)); aio_req_init(&req); req.req_start = get_main_clock()->get_ns(); diff --git a/kernel/include/onyx/wait_queue.h b/kernel/include/onyx/wait_queue.h index 5e3bd62d6..9a1e4dc02 100644 --- a/kernel/include/onyx/wait_queue.h +++ b/kernel/include/onyx/wait_queue.h @@ -31,6 +31,11 @@ struct wait_queue { struct spinlock lock; struct list_head token_list; + + constexpr wait_queue() : lock{}, token_list{} + { + INIT_LIST_HEAD(&token_list); + } }; void wait_queue_wait(struct wait_queue *queue); diff --git a/kernel/kernel.config.example b/kernel/kernel.config.example index f82b3388d..755ddc1cf 100644 --- a/kernel/kernel.config.example +++ b/kernel/kernel.config.example @@ -20,4 +20,5 @@ CONFIG_X86_PLATFORM=pc CONFIG_KASAN=n CONFIG_NVME=n CONFIG_NET=y -CONFIG_LTO=y +CONFIG_LTO=n +CONFIG_SERIAL_UART8250=y diff --git a/kernel/kernel.config.minimal b/kernel/kernel.config.minimal index 4b182b6dc..ee3dec4ed 100644 --- a/kernel/kernel.config.minimal +++ b/kernel/kernel.config.minimal @@ -27,3 +27,4 @@ CONFIG_SCHED_DUMP_THREADS_MAGIC=n CONFIG_NVME=n CONFIG_LOG_BUF_MINIMAL=n CONFIG_LTO=y +CONFIG_SERIAL_UART8250=y diff --git a/musl/src/thread/pthread_create.c b/musl/src/thread/pthread_create.c index e4409513c..6710264bc 100644 --- a/musl/src/thread/pthread_create.c +++ b/musl/src/thread/pthread_create.c @@ -331,6 +331,8 @@ int __pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict att stack -= (uintptr_t)stack % sizeof(uintptr_t); stack -= sizeof(struct start_args); struct start_args *args = (void *)stack; + + stack -= (uintptr_t)stack % 16; stack -= sizeof(uintptr_t); args->start_func = entry; args->start_arg = arg;