public class SimtThread extends Thread implements BaseThread
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected static AtomicInteger |
BLOCKING_POINTS
Variable to keep track of threads launched by the HJ runtime.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier | Constructor and Description |
---|---|
protected |
SimtThread(String threadName,
int thId,
SimtThreadPool pool,
Runnable runnable)
Creates a ForkJoinWorkerThread operating in the given pool.
|
Modifier and Type | Method and Description |
---|---|
int[] |
activityCounter()
activityCounter.
|
HabaneroActivity |
currentActivity()
currentActivity.
|
void |
currentActivity(HabaneroActivity newCurrentActivity)
currentActivity.
|
int |
getMySimtIdentifier() |
int |
getThId() |
void |
run() |
void |
setMySimtIdentifier(int n)
Set a thread id meaning: "I am the n'th thread to join the simt task"
|
void |
stashActivity() |
void |
threadBlockedNotification(ForkJoinPool.ManagedBlocker managedBlocker)
Notification when a thread has been blocked by the HJ runtime by some synchronization constraint.
|
void |
threadUnblockedNotification()
Notification when a thread has been unblocked in the HJ runtime by some synchronization constraint.
|
HabaneroActivity |
unstashActivity() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected static final AtomicInteger BLOCKING_POINTS
protected SimtThread(String threadName, int thId, SimtThreadPool pool, Runnable runnable)
threadName
- Name of the threadpool
- the pool this thread works inpublic int getThId()
public int[] activityCounter()
activityCounter.
public final HabaneroActivity currentActivity()
currentActivity.
currentActivity
in interface BaseThread
public final void currentActivity(HabaneroActivity newCurrentActivity)
currentActivity.
currentActivity
in interface BaseThread
newCurrentActivity
- the new current activity being run by the thread.public final HabaneroActivity unstashActivity()
unstashActivity
in interface BaseThread
public final void stashActivity()
stashActivity
in interface BaseThread
public final void threadBlockedNotification(ForkJoinPool.ManagedBlocker managedBlocker)
threadBlockedNotification
in interface BaseThread
managedBlocker
- the given blockerpublic final void threadUnblockedNotification()
threadUnblockedNotification
in interface BaseThread
public final int getMySimtIdentifier()
public final void setMySimtIdentifier(int n)
Copyright © 2015 Rice University - Department of Computer Science. All rights reserved.