test/hotspot/jtreg/compiler/testlibrary/rtm/libXAbortProvoker.c
author mdoerr
Thu, 13 Jun 2019 11:12:23 +0200
changeset 55376 0f38ab93a53c
parent 55087 82fe7292ca5c
child 58679 9c3209ff7550
permissions -rw-r--r--
8225663: [testbug] Missing JNIEXPORT in XAbortProvoker native function Reviewed-by: mbaesken, gromero, kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
55087
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
     1
/*
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
     2
 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
     4
 *
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
     7
 * published by the Free Software Foundation.
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
     8
 *
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    13
 * accompanied this code).
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    14
 *
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    18
 *
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    21
 * questions.
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    22
 */
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    23
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    24
#include "jni.h"
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    25
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    26
/**
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    27
 * Simply calling a JNI method from the JVM will abort any active transaction,
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    28
 * so doAbort() does nothing special and only returns after being called.
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    29
 * The transaction abortion happens right before the JNI method is called.
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    30
 */
55376
0f38ab93a53c 8225663: [testbug] Missing JNIEXPORT in XAbortProvoker native function
mdoerr
parents: 55087
diff changeset
    31
JNIEXPORT int JNICALL
55087
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    32
Java_compiler_testlibrary_rtm_XAbortProvoker_doAbort(JNIEnv *env, jobject o) {
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    33
  return 0;
82fe7292ca5c 8223660: jtreg: Decouple Unsafe from RTM tests
gromero
parents:
diff changeset
    34
}