2528N/A/*
2528N/A * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
2528N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2528N/A *
2528N/A * This code is free software; you can redistribute it and/or modify it
2528N/A * under the terms of the GNU General Public License version 2 only, as
2528N/A * published by the Free Software Foundation. Oracle designates this
2528N/A * particular file as subject to the "Classpath" exception as provided
6983N/A * by Oracle in the LICENSE file that accompanied this code.
6983N/A *
2528N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2528N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2528N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2528N/A * version 2 for more details (a copy is included in the LICENSE file that
6983N/A * accompanied this code).
6983N/A *
6983N/A * You should have received a copy of the GNU General Public License version
6983N/A * 2 along with this work; if not, write to the Free Software Foundation,
2528N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2528N/A *
2528N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2528N/A * or visit www.oracle.com if you need additional information or have any
2528N/A * questions.
3231N/A */
2528N/A
2528N/A#include <signal.h>
2528N/A#include <stdlib.h>
2528N/A
2528N/A#include <jni.h>
2528N/A#include <jlong.h>
2528N/A#include "sun_misc_NativeSignalHandler.h"
2528N/A
2528N/Atypedef void (*sig_handler_t)(jint, void *, void *);
2528N/A
2528N/AJNIEXPORT void JNICALL
2528N/AJava_sun_misc_NativeSignalHandler_handle0(JNIEnv *env, jclass cls, jint sig, jlong f)
2528N/A{
2528N/A /* We've lost the siginfo and context */
2528N/A (*(sig_handler_t)jlong_to_ptr(f))(sig, NULL, NULL);
2528N/A}
2528N/A