File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
com.oracle.svm.core.posix/src/com/oracle/svm/core/posix/pthread
com.oracle.svm.core/src/com/oracle/svm/core/locks Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ protected VMMutex createReplacement(VMMutex source) {
75
75
private final ClassInstanceReplacer <VMCondition , VMCondition > conditionReplacer = new ClassInstanceReplacer <>(VMCondition .class ) {
76
76
@ Override
77
77
protected VMCondition createReplacement (VMCondition source ) {
78
- return new PthreadVMCondition ((PthreadVMMutex ) mutexReplacer .apply (source .getMutex ()));
78
+ return new PthreadVMCondition ((PthreadVMMutex ) mutexReplacer .apply (source .getMutex ()), source . getConditionName () );
79
79
}
80
80
};
81
81
Original file line number Diff line number Diff line change 43
43
public class VMCondition {
44
44
protected final VMMutex mutex ;
45
45
46
+ @ Platforms (Platform .HOSTED_ONLY .class ) //
47
+ private final String name ;
48
+
46
49
@ Platforms (Platform .HOSTED_ONLY .class )
47
50
public VMCondition (VMMutex mutex ) {
51
+ this (mutex , null );
52
+ }
53
+
54
+ @ Platforms (Platform .HOSTED_ONLY .class )
55
+ public VMCondition (VMMutex mutex , String name ) {
48
56
this .mutex = mutex ;
57
+ this .name = name ;
58
+ }
59
+
60
+ @ Platforms (Platform .HOSTED_ONLY .class )
61
+ public String getName () {
62
+ return name == null ? mutex .getName () : mutex .getName () + "_" + name ;
63
+ }
64
+
65
+ @ Platforms (Platform .HOSTED_ONLY .class )
66
+ public String getConditionName () {
67
+ return name ;
49
68
}
50
69
51
70
@ Uninterruptible (reason = "Called from uninterruptible code." , mayBeInlined = true )
You can’t perform that action at this time.
0 commit comments