From 3b4a6097dee760d22eecd97ebe041c69da6b056a Mon Sep 17 00:00:00 2001 From: johannst Date: Thu, 8 Oct 2020 20:14:42 +0200 Subject: remove incorrect const --- lib/arch/x86_64/api.h | 4 ++-- lib/arch/x86_64/init_stack.cc | 2 +- lib/arch/x86_64/yield.s | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/arch/x86_64') diff --git a/lib/arch/x86_64/api.h b/lib/arch/x86_64/api.h index b2babc9..729bd1a 100644 --- a/lib/arch/x86_64/api.h +++ b/lib/arch/x86_64/api.h @@ -2,5 +2,5 @@ #pragma once -extern "C" void yield(const void* new_stack, void* const* old_stack); -void* init_stack(void* stack_ptr, void (*entry)(void*), void* ctx); +extern "C" void yield(const void* new_stack, void** old_stack); +void* init_stack(void* stack_ptr, void (*entry)(void*), const void* ctx); diff --git a/lib/arch/x86_64/init_stack.cc b/lib/arch/x86_64/init_stack.cc index 748fb56..c249bc8 100644 --- a/lib/arch/x86_64/init_stack.cc +++ b/lib/arch/x86_64/init_stack.cc @@ -3,7 +3,7 @@ extern "C" void thread_create(); -void* init_stack(void* stack_ptr, void (*entry)(void*), void* ctx) { +void* init_stack(void* stack_ptr, void (*entry)(void*), const void* ctx) { static_assert(sizeof(uint64_t) == sizeof(std::uintptr_t), "Pointer must be 64bit!"); // Setup initial stack frame which will be popped when yielding diff --git a/lib/arch/x86_64/yield.s b/lib/arch/x86_64/yield.s index d40bcd7..2c5f1d6 100644 --- a/lib/arch/x86_64/yield.s +++ b/lib/arch/x86_64/yield.s @@ -3,9 +3,9 @@ .intel_syntax noprefix .section .text, "ax", @progbits - # extern "C" void yield(const void* new_stack, void* const* old_stack); - # ^^^^^^^^^ ^^^^^^^^^ - # rdi rsi + # extern "C" void yield(const void* new_stack, void** old_stack); + # ^^^^^^^^^ ^^^^^^^^^ + # rdi rsi .global yield .type yield, @function yield: -- cgit v1.2.3