Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writeback #29

Merged
merged 3 commits into from
Dec 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion kernel/drivers/ahci/ahci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 5 additions & 0 deletions kernel/include/onyx/wait_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion kernel/kernel.config.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions kernel/kernel.config.minimal
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions musl/src/thread/pthread_create.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down