//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
Base class for thread errors to be used for function inside GC when allocations are unavailable.
Base class for thread exceptions.
Indicates whether an address has been marked by the GC.
Indicates the kind of scan being performed by thread_scanAllType.
Check whether a thread was created by createLowLevelThread.
A callback for thread errors in D during collections. Since an allocation is not possible a preallocated ThreadError will be used as the Error instance
Registers the calling thread for use with the D Runtime. If this routine is called for a thread which is already registered, no action is performed.
Deregisters the given thread from use with the runtime. If this routine is called for a thread which is not registered, the result is undefined.
Deregisters the calling thread from use with the runtime. If this routine is called for a thread which is not registered, the result is undefined.
Signals that the code following this call is a critical region. Any code in this region must finish running before the calling thread can be suspended by a call to thread_suspendAll.
Signals that the calling thread is no longer in a critical region. Following a call to this function, the thread can once again be suspended.
Returns true if the current thread is in a critical region; otherwise, false.
Joins all non-daemon threads that are currently running. This is done by performing successive scans through the thread list until a scan consists of only daemon threads.
This routine allows the runtime to process any special per-thread handling for the GC. This is needed for taking into account any memory that is referenced by non-scanned pointers but is about to be freed. That currently means the array append cache.
Resume all threads but the calling thread for "stop the world" garbage collection runs. This function must be called once for each preceding call to thread_suspendAll before the threads are actually resumed.
The main entry point for garbage collection. The supplied delegate will be passed ranges representing both stack and register values.
The main entry point for garbage collection. The supplied delegate will be passed ranges representing both stack and register values.
Sets the current thread to a specific reference. Only to be used when dealing with externally-created threads (in e.g. C code). The primary use of this function is when ThreadBase.getThis() must return a sensible value in, for example, TLS destructors. In other words, don't touch this unless you know what you're doing.
Returns the stack bottom of the currently active stack within the calling thread.
Returns the stack top of the currently active stack within the calling thread.
Terminates the thread module. No other thread routine may be called afterwards.
Search the list of all threads for a thread with the given thread identifier.
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
Distributed under the Boost Software License 1.0. (See accompanying file LICENSE)
Copyright Sean Kelly 2005 - 2012.
The threadbase module provides OS-independent code for thread storage and management.