blob: 3d775102b8b00b9c29987ef15967d9ac6d399ec1 [file] [log] [blame]
// Copyright 2016 The Fuchsia Authors
// Copyright (c) 2008 Travis Geiselbrecht
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
#ifndef ZIRCON_KERNEL_INCLUDE_ARCH_THREAD_H_
#define ZIRCON_KERNEL_INCLUDE_ARCH_THREAD_H_
#include <arch.h>
#include <lib/zircon-internal/thread_annotations.h>
#include <zircon/compiler.h>
#include <arch/arch_thread.h>
#include <kernel/thread.h>
struct Thread;
void arch_thread_initialize(Thread* thread, vaddr_t entry_point) TA_REQ(thread->get_lock());
void arch_context_switch(Thread* oldthread, Thread* newthread)
TA_REQ(oldthread->get_lock(), newthread->get_lock());
void arch_save_user_state(Thread* thread);
void arch_restore_user_state(Thread* thread);
void arch_thread_construct_first(Thread*);
vaddr_t arch_thread_get_blocked_fp(Thread*);
void arch_set_suspended_general_regs(Thread* thread, GeneralRegsSource source, void* gregs);
void arch_reset_suspended_general_regs(Thread* thread);
#endif // ZIRCON_KERNEL_INCLUDE_ARCH_THREAD_H_