text: /*
   * Copyright 2018, Data61
   * Commonwealth Scientific and Industrial Research Organisation (CSIRO)
   * ABN 41 687 119 230.
   *
   * This software may be distributed and modified according to the terms of
   * the GNU General Public License version 2. Note that NO WARRANTY is provided.
   * See "LICENSE_GPLv2.txt" for details.
   *
   * @TAG(DATA61_GPL)
   */
  
  /*
   *
   * Copyright 2016, 2017 Hesham Almatary, Data61/CSIRO <hesham.almatary@data61.csiro.au>
   * Copyright 2015, 2016 Hesham Almatary <heshamelmatary@gmail.com>
   */
  
  #ifndef __KERNEL_RISCV_TRAPS_H
  #define __KERNEL_RISCV_TRAPS_H
  
  #include <config.h>
  #include <util.h>
  
  static inline void arch_c_entry_hook(void)
  {
  }
  
  static inline void arch_c_exit_hook(void)
  {
  }
  
  void c_handle_syscall(word_t cptr, word_t msgInfo, word_t unused1, word_t unused2, word_t unused3, word_t unused4, word_t unused5, syscall_t syscall)
  VISIBLE NORETURN;
  
  void c_handle_interrupt(void)
  VISIBLE NORETURN;
  
  void c_handle_exception(void)
  VISIBLE NORETURN;
  
  void restore_user_context(void)
  VISIBLE NORETURN;
  
  void handle_exception(void);
  #endif /* __KERNEL_RISCV_TRAPS_H */
  