final class org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode extends org.jboss.threads.EnhancedQueueExecutor$PoolThreadNodeBase
{
private static final int STATE_NORMAL;
private static final int STATE_PARKED;
private static final int STATE_UNPARKED;
private static final long taskOffset;
private static final long parkedOffset;
private final java.lang.Thread thread;
private volatile java.lang.Runnable task;
private volatile int parked;
void <init>(java.lang.Thread)
{
java.lang.Runnable v;
org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode v;
java.lang.Thread v;
v := @this: org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode;
v := @parameter: java.lang.Thread;
specialinvoke v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNodeBase: void <init>()>();
v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: java.lang.Thread thread> = v;
v = <org.jboss.threads.EnhancedQueueExecutor: java.lang.Runnable WAITING>;
v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: java.lang.Runnable task> = v;
return;
}
boolean compareAndSetTask(java.lang.Runnable, java.lang.Runnable)
{
sun.misc.Unsafe v;
long v;
java.lang.Runnable v, v, v;
org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode v;
boolean v, v;
v := @this: org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode;
v := @parameter: java.lang.Runnable;
v := @parameter: java.lang.Runnable;
v = v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: java.lang.Runnable task>;
if v != v goto label;
v = <org.jboss.threads.JBossExecutors: sun.misc.Unsafe unsafe>;
v = <org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: long taskOffset>;
v = virtualinvoke v.<sun.misc.Unsafe: boolean compareAndSwapObject(java.lang.Object,long,java.lang.Object,java.lang.Object)>(v, v, v, v);
if v == 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
java.lang.Runnable getTask()
{
java.lang.Runnable v;
org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode v;
v := @this: org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode;
v = v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: java.lang.Runnable task>;
return v;
}
org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode getNext()
{
org.jboss.threads.EnhancedQueueExecutor$QNode v;
org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode v;
v := @this: org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode;
v = specialinvoke v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNodeBase: org.jboss.threads.EnhancedQueueExecutor$QNode getNext()>();
return v;
}
void park(org.jboss.threads.EnhancedQueueExecutor)
{
java.lang.Throwable v;
sun.misc.Unsafe v, v, v;
org.jboss.threads.EnhancedQueueExecutor v;
long v, v, v;
int v, v, v, v, v;
boolean v, v, v;
org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode v;
v := @this: org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode;
v := @parameter: org.jboss.threads.EnhancedQueueExecutor;
v = <org.jboss.threads.EnhancedQueueExecutor: int PARK_SPINS>;
v = v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: int parked>;
if v != 2 goto label;
v = <org.jboss.threads.JBossExecutors: sun.misc.Unsafe unsafe>;
v = <org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: long parkedOffset>;
v = virtualinvoke v.<sun.misc.Unsafe: boolean compareAndSwapInt(java.lang.Object,long,int,int)>(v, v, 2, 0);
if v == 0 goto label;
return;
label:
if v <= 0 goto label;
v = <org.jboss.threads.EnhancedQueueExecutor: int YIELD_FACTOR>;
if v >= v goto label;
staticinvoke <java.lang.Thread: void yield()>();
goto label;
label:
staticinvoke <org.jboss.threads.JDKSpecific: void onSpinWait()>();
label:
v = v - 1;
v = v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: int parked>;
if v != 2 goto label;
v = <org.jboss.threads.JBossExecutors: sun.misc.Unsafe unsafe>;
v = <org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: long parkedOffset>;
v = virtualinvoke v.<sun.misc.Unsafe: boolean compareAndSwapInt(java.lang.Object,long,int,int)>(v, v, 2, 0);
if v == 0 goto label;
return;
label:
v = v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: int parked>;
if v != 0 goto label;
v = <org.jboss.threads.JBossExecutors: sun.misc.Unsafe unsafe>;
v = <org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: long parkedOffset>;
v = virtualinvoke v.<sun.misc.Unsafe: boolean compareAndSwapInt(java.lang.Object,long,int,int)>(v, v, 0, 1);
if v == 0 goto label;
label:
staticinvoke <java.util.concurrent.locks.LockSupport: void park(java.lang.Object)>(v);
label:
v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: int parked> = 0;
goto label;
label:
v := @caughtexception;
v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: int parked> = 0;
throw v;
label:
return;
catch java.lang.Throwable from label to label with label;
}
void park(org.jboss.threads.EnhancedQueueExecutor, long)
{
java.lang.Throwable v;
sun.misc.Unsafe v, v, v;
org.jboss.threads.EnhancedQueueExecutor v;
long v, v, v, v, v, v, v, v;
byte v;
int v, v, v, v, v;
boolean v, v, v;
org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode v;
v := @this: org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode;
v := @parameter: org.jboss.threads.EnhancedQueueExecutor;
v := @parameter: long;
v = <org.jboss.threads.EnhancedQueueExecutor: int PARK_SPINS>;
if v <= 0 goto label;
v = staticinvoke <java.lang.System: long nanoTime()>();
v = v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: int parked>;
if v != 2 goto label;
v = <org.jboss.threads.JBossExecutors: sun.misc.Unsafe unsafe>;
v = <org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: long parkedOffset>;
v = virtualinvoke v.<sun.misc.Unsafe: boolean compareAndSwapInt(java.lang.Object,long,int,int)>(v, v, 2, 0);
if v == 0 goto label;
return;
label:
if v <= 0 goto label;
v = <org.jboss.threads.EnhancedQueueExecutor: int YIELD_FACTOR>;
if v >= v goto label;
staticinvoke <java.lang.Thread: void yield()>();
goto label;
label:
staticinvoke <org.jboss.threads.JDKSpecific: void onSpinWait()>();
label:
v = v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: int parked>;
if v != 2 goto label;
v = <org.jboss.threads.JBossExecutors: sun.misc.Unsafe unsafe>;
v = <org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: long parkedOffset>;
v = virtualinvoke v.<sun.misc.Unsafe: boolean compareAndSwapInt(java.lang.Object,long,int,int)>(v, v, 2, 0);
if v == 0 goto label;
return;
label:
v = v - 1;
goto label;
label:
v = staticinvoke <java.lang.System: long nanoTime()>();
v = v - v;
v = v - v;
v = v cmp 0L;
if v >= 0 goto label;
return;
label:
v = v;
label:
v = v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: int parked>;
if v != 0 goto label;
v = <org.jboss.threads.JBossExecutors: sun.misc.Unsafe unsafe>;
v = <org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: long parkedOffset>;
v = virtualinvoke v.<sun.misc.Unsafe: boolean compareAndSwapInt(java.lang.Object,long,int,int)>(v, v, 0, 1);
if v == 0 goto label;
label:
staticinvoke <java.util.concurrent.locks.LockSupport: void parkNanos(java.lang.Object,long)>(v, v);
label:
v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: int parked> = 0;
goto label;
label:
v := @caughtexception;
v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: int parked> = 0;
throw v;
label:
return;
catch java.lang.Throwable from label to label with label;
}
void unpark()
{
sun.misc.Unsafe v;
java.lang.Thread v;
int v;
long v;
org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode v;
boolean v;
v := @this: org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode;
v = v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: int parked>;
if v != 0 goto label;
v = <org.jboss.threads.JBossExecutors: sun.misc.Unsafe unsafe>;
v = <org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: long parkedOffset>;
v = virtualinvoke v.<sun.misc.Unsafe: boolean compareAndSwapInt(java.lang.Object,long,int,int)>(v, v, 0, 2);
if v == 0 goto label;
return;
label:
v = v.<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: java.lang.Thread thread>;
staticinvoke <java.util.concurrent.locks.LockSupport: void unpark(java.lang.Thread)>(v);
return;
}
static void <clinit>()
{
sun.misc.Unsafe v, v;
long v, v;
java.lang.reflect.Field v, v;
java.lang.NoSuchFieldError v;
java.lang.NoSuchFieldException v;
java.lang.Class v, v;
java.lang.String v;
label:
v = <org.jboss.threads.JBossExecutors: sun.misc.Unsafe unsafe>;
v = class "Lorg/jboss/threads/EnhancedQueueExecutor$PoolThreadNode;";
v = virtualinvoke v.<java.lang.Class: java.lang.reflect.Field getDeclaredField(java.lang.String)>("task");
v = virtualinvoke v.<sun.misc.Unsafe: long objectFieldOffset(java.lang.reflect.Field)>(v);
<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: long taskOffset> = v;
v = <org.jboss.threads.JBossExecutors: sun.misc.Unsafe unsafe>;
v = class "Lorg/jboss/threads/EnhancedQueueExecutor$PoolThreadNode;";
v = virtualinvoke v.<java.lang.Class: java.lang.reflect.Field getDeclaredField(java.lang.String)>("parked");
v = virtualinvoke v.<sun.misc.Unsafe: long objectFieldOffset(java.lang.reflect.Field)>(v);
<org.jboss.threads.EnhancedQueueExecutor$PoolThreadNode: long parkedOffset> = v;
label:
goto label;
label:
v := @caughtexception;
v = new java.lang.NoSuchFieldError;
v = virtualinvoke v.<java.lang.NoSuchFieldException: java.lang.String getMessage()>();
specialinvoke v.<java.lang.NoSuchFieldError: void <init>(java.lang.String)>(v);
throw v;
label:
return;
catch java.lang.NoSuchFieldException from label to label with label;
}
}