Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / native_client / src / minsfi / trusted / syscall / exit.c
1 /*
2  * Copyright (c) 2014 The Native Client Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6
7 #include "native_client/src/include/minsfi_syscalls.h"
8
9 int32_t __minsfi_syscall_exit(int32_t exit_code) {
10   MinsfiSandbox *sb = MinsfiGetActiveSandbox();
11   ((volatile MinsfiSandbox*) sb)->exit_code = exit_code;
12   longjmp(sb->exit_env, 1);
13 }