message: add thread exit function
diff: @@ -45,6 +45,12 @@ pub extern "C" fn sys_exit(arg: i32) -> ! {
  syscalls::sys_shutdown(arg);
  }
  +#[no_mangle]
  +pub extern "C" fn sys_thread_exit(arg: i32) -> ! {
  + debug!("Exit thread with error code {}!", arg);
  + core_scheduler().exit(arg);
  +}
  +
  #[no_mangle]
  pub extern "C" fn sys_abort() -> ! {
  sys_exit(-1);
  