mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
committed by
Vitaly Provodin
parent
a12ec1a883
commit
67af01fbd6
@@ -30,7 +30,7 @@
|
||||
#include "agent_common.h"
|
||||
|
||||
#include "JVMTITools.h"
|
||||
#include "native_thread.h"
|
||||
#include "native_thread.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "agent_common.h"
|
||||
|
||||
#include "nsk_tools.h"
|
||||
#include "native_thread.h"
|
||||
#include "native_thread.hpp"
|
||||
#include "JVMTITools.h"
|
||||
#include "jvmti_tools.h"
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "agent_common.h"
|
||||
|
||||
#include "nsk_tools.h"
|
||||
#include "native_thread.h"
|
||||
#include "native_thread.hpp"
|
||||
#include "JVMTITools.h"
|
||||
#include "jvmti_tools.h"
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "agent_common.h"
|
||||
|
||||
#include "nsk_tools.h"
|
||||
#include "native_thread.h"
|
||||
#include "native_thread.hpp"
|
||||
#include "JVMTITools.h"
|
||||
#include "jvmti_tools.h"
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "agent_common.h"
|
||||
|
||||
#include "JVMTITools.h"
|
||||
#include "native_thread.h"
|
||||
#include "native_thread.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "agent_common.h"
|
||||
|
||||
#include "nsk_tools.h"
|
||||
#include "native_thread.h"
|
||||
#include "native_thread.hpp"
|
||||
#include "JVMTITools.h"
|
||||
#include "jvmti_tools.h"
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "nsk_tools.h"
|
||||
#include "JVMTITools.h"
|
||||
#include "jvmti_tools.h"
|
||||
#include "native_thread.h"
|
||||
#include "native_thread.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "nsk_tools.h"
|
||||
#include "JVMTITools.h"
|
||||
#include "jvmti_tools.h"
|
||||
#include "native_thread.h"
|
||||
#include "native_thread.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "native_thread.h"
|
||||
#include "native_thread.hpp"
|
||||
#include "jni_tools.h"
|
||||
#include "jvmti_tools.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
This code is free software; you can redistribute it and/or modify it
|
||||
@@ -36,8 +36,8 @@ Also this directory provides support for running native threads
|
||||
in a platform independent manner.
|
||||
|
||||
Source files:
|
||||
native_thread.h
|
||||
native_thread.c
|
||||
native_thread.hpp
|
||||
native_thread.cpp
|
||||
|
||||
Naming conventions:
|
||||
functions: THREAD_*
|
||||
@@ -100,7 +100,7 @@ use special macroses defined in share/jni and share/jvmti frameworks.
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
|
||||
native_thread.h
|
||||
native_thread.hpp
|
||||
|
||||
Provides platform-independent support for running native threads:
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
/* testbase_nsk threads: */
|
||||
#include <native_thread.h>
|
||||
#include <native_thread.hpp>
|
||||
|
||||
/***************************************************************/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -21,8 +21,8 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#ifndef NSK_SHARE_NATIVE_NATIVE_THREAD_H
|
||||
#define NSK_SHARE_NATIVE_NATIVE_THREAD_H
|
||||
#ifndef NSK_SHARE_NATIVE_NATIVE_THREAD_HPP
|
||||
#define NSK_SHARE_NATIVE_NATIVE_THREAD_HPP
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -33,38 +33,38 @@ extern "C" {
|
||||
typedef int(*PROCEDURE)(void*);
|
||||
|
||||
/**
|
||||
* Return a thread mirror, or NULL if failed.
|
||||
* Return a thread mirror, or null if failed.
|
||||
*/
|
||||
void* THREAD_new(PROCEDURE procedure, void* context);
|
||||
|
||||
/**
|
||||
* Return the thread if started OK, or NULL if failed.
|
||||
* Return the thread if started OK, or null if failed.
|
||||
*/
|
||||
void* THREAD_start(void* thread);
|
||||
|
||||
/**
|
||||
* Return 1 if the thread has been started, or 0 if not,
|
||||
* or -1 if thread==NULL.
|
||||
* or -1 if thread==nullptr.
|
||||
*/
|
||||
int THREAD_isStarted(void* thread);
|
||||
|
||||
/**
|
||||
* Return 1 if the thread has been started and already has finished,
|
||||
* or 0 if the thread hasn't finish (or even hasn't been started),
|
||||
* or -1 if thread==NULL.
|
||||
* or -1 if thread==nullptr.
|
||||
*/
|
||||
int THREAD_hasFinished(void* thread);
|
||||
|
||||
/**
|
||||
* Return thread->status if thread has finished,
|
||||
* or return 0 if thread hasn't finished,
|
||||
* or retuen -1 if thread==NULL.
|
||||
* or retuen -1 if thread==nullptr.
|
||||
*/
|
||||
int THREAD_status(void* thread);
|
||||
|
||||
/**
|
||||
* Cycle with 1 second sleeps until the thread has finished;
|
||||
* or return immediately, if thread==NULL.
|
||||
* or return immediately, if thread==nullptr.
|
||||
*/
|
||||
void THREAD_waitFor(void* thread);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*/
|
||||
#include "jni.h"
|
||||
#include "native_thread.h"
|
||||
#include "native_thread.hpp"
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
|
||||
Reference in New Issue
Block a user