8338745: Intrinsify Continuation.pin() and Continuation.unpin()

Reviewed-by: kvn
This commit is contained in:
Markus Grönlund 2024-08-23 09:26:00 +00:00
parent a5e28005fa
commit fead3cf541
9 changed files with 109 additions and 4 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
@ -427,6 +427,7 @@ public class Continuation {
* Pins the current continuation (enters a critical section).
* This increments an internal semaphore that, when greater than 0, pins the continuation.
*/
@IntrinsicCandidate
public static native void pin();
/**
@ -434,6 +435,7 @@ public class Continuation {
* This decrements an internal semaphore that, when equal 0, unpins the current continuation
* if pinned with {@link #pin()}.
*/
@IntrinsicCandidate
public static native void unpin();
/**