EAThread Changes
Version 1.33.04 (Jul 07, 2020)
Changes
- Implemented SetProcessor for NX.
Version 1.33.03 (Apr 18, 2020)
Changes
- Updated to use gdk.enabled propery instead of gsdk.enabled property.
Version 1.33.02 (Apr 09, 2020)
Changes
- Updating EABase platform macros instead of vendor macros directly.
- Fixing futex data layout preprocessor macros
- Fixing non-bulk build compiler errors
- Resolving stadia compiler errors
Version 1.33.01 (Jan 24, 2020)
Changes
- Bug fix for user specified affinity masks containing invalid cpu cores causing threads to not start.
Version 1.33.00 (Jan 15, 2020)
Changes
- Xbsx support
- Add EA::Thread::GetAvailableCpuAffinityMask() API.
- Fix Unix version of SetThreadProcessor to skip over system CPU's.
- Added Assert to Unix version of SetPlatformThreadAffinity() to check if we are trying to set thread affinity to run on an unavailable processor.
- Added Assert to Unix version of SetThreadProcessor() to check if we are trying to set thread affinity to run on an unavailable processor.
- SetThreadAffinityMask() now sanitizes the affinity mask and asserts if unavailable processors are selected in the mask or if the sanitized mask ends up zero.
Version 1.32.17 (Oct 22, 2019)
Changes
- Fixed issue in EA::Thread::SetProcessor which caused an invalid affinity mask to be used.
Version 1.32.16 (Oct 08, 2019)
Changes
- Fixed issue in EA::Thread::SetThreadProcessor which incorrectly used a cpu index as an affinity mask.
Version 1.32.15 (Oct 01, 2019)
Changes
- Android callstack unwinding code for x64 now uses the x86 code path.
Version 1.32.14 (Sep 20, 2019)
Changes
Version 1.32.13 (Sep 06, 2019)
Changes
- Fixed compiler error in 32-bit _InterlockedExchange64X_INLINE fallback code.
Version 1.32.12 (Sep 06, 2019)
Changes
- Fixed callstack resolution taking a long time on NX.
- Implemented a fallback for _InterlockedExchange64X_INLINE as Microsoft removed support in VS2019.
Version 1.32.11 (Jul 04, 2019)
Changes
- Added thread local caches for to improve runtime performance of callstack generation on Win64.
You can control the size of the cache via the EATHREAD_CALLSTACK_CACHE_MAX define.
You can disable the cache entirely via EATHREAD_DISABLE_CALLSTACK_CACHE if legacy behaviour is desirable.
- EA_THREAD_LOCAL prefers the C++11 thread_local keyword before compiler specific alternatives.
- Removing eathread_sync_armgcc.h very old backwards compatibility header.
- Updated the android implementation of EA::Thread::GetProcessorCount() use the Android NDK's android_getCpuCount function.
This requires that EAThread compile the cpu-features code in the NDK. Be aware that you may get duplicate symbol linker errors and will need to stop compiling the cpu-features in your own code.
- Removing eathread_atomic_apple and eathread_atomic_gcc implementation files because the cpp11 code path is used instead.
- Removing old Android emulated atomics fallback code.
- Promoting memory barriers for Apple to use the cpp standard API.
- Affinity Masks now supported on Linux, Apple, and Android platforms.
Version 1.32.09 (May 30, 2019)
Changes
- Added support for EA_WINAPI_FAMILY_GAMES.
- Removed the EA_WINAPI_FAMILY, EA_WINAPI_PARTITION and EA_WINAPI_FAMILY_PARTITION backward compatible defines from Config.h.
- Removed deprecation infrastructure code.
- Updated copyright information.
- Adding 'pragma once' to more headers.
- Removing legacy PowerPC code paths.
- Removing OpenKode platform support.
- Removing old EABase backwards compatibility code.
- Migrating from KETTLE/CAPILANO to XBOXONE/PS4 platform defines.
- Minor code changes to route memory requests to global new when package is used open sourced.
Version 1.32.08 (Apr 24, 2019)
Changes
- Fixed a race condition when setting the thread name after the thread entry has been started.
Version 1.32.07 (Mar 18, 2019)
Changes
- Protect against exceptions that occur inside of RtlLookupFunctionEntry.
Version 1.32.06 (Feb 22, 2019)
Changes
- Adding self-assignment check for the resulting string copy when setting a thread name.
Version 1.32.05 (Nov 13, 2018)
Changes
- Resolving issue where an inactive 'ThreadDynamicThreadData' meta-data element was selected from the tracking array due to thread ids being recycled.
- Improved callstack resolution when not using a context for win32.
Version 1.32.04 (Aug 13, 2018)
Changes
- Add Code Coverage to EAThread Package.
Version 1.32.03 (Apr 17, 2018)
Changes
- Implemented EA::Thread::MakeThread to simplify using lambdas as thread entry points.
Version 1.32.02 (Mar 29, 2018)
Changes
- Fixed issues where the Android callstacks were off by 1.
Version 1.32.01 (Mar 23, 2018)
Changes
- Fixed GetInstructionPointer for arm/clang.
- Fully qualifying call to MS API 'SetThreadName' to prevent name lookup issues due to ADL.
Version 1.32.00 (Feb 15, 2018)
Changes
- Added the ability to get the callstack on ARM.
Version 1.31.11 (Jan 29, 2018)
Changes
- Removed use of _dyld_get_all_image_infos which is no longer avilable in osx 10.13 (send-back from Sims 4).
- EA::Thread::Mutex debug mechanism switched to use SysThreadID instead of ThreadId in order to prevent external thread registration which makes the primitive lower cost.
- Migrated EA::Thread::AtomicInt to use a platform agnostic atomics implementation. Platform specific implementations are still available via a backwards compatibility macro but by default the platform agnostic implementation is used. They will be removed in a future release.
-
- Removing legacy Gen3 headers:
- eathread_atomicstruct.h
- eathread_fiber.h
- eathread_lockfree.h
Version 1.31.10 (Dec 05, 2017)
Changes
- Added support for the NX platform.
Version 1.31.09 (Nov 23, 2017)
Changes
- Removed the deprecated ThreadParameter member mbSuspended.
Version 1.31.08 (September 22, 2017)
Changes
- Bug fix for Razor CPU captures not showing thread names when attached from the start of the process.
Version 1.31.07 (September 22, 2017)
Changes
- Improving non-member atomics to enable 64-bit integral type overloads on 32-bit platforms.
- Removing dead code paths for Xenon, and PS3/SPU.
- Allowing EA::Thread::SetDefaultProcessor to be configured to create floating threads.
- Allows PS4 named mutexes to fallback to unnamed mutexes when the system runs out of handles.
Version 1.31.06 (Jul 11, 2017)
Changes
- Resolving undefined behaviour on PS4 when calling EA::Thread::SetThreadProcessor with 'kProcessorAny' or 'kProcessorDefault' because it would generate shifts by negative values.
- EA::Thread::SetName fix on PS4 to check if the ThreadDynamicData pointer is not nullptr before using it.
Version 1.31.05 (Jun 19, 2017)
Changes
- On windows we removed the DynamicThreadArray destructor to support memory tracking systems running post main(). This leaks a Windows CRITICAL_SECTION for the operating system to clean up at process shutdown.
- Adding support for new Windows 10 thread naming API which resolves the numerous issues with the exceptions based solution previously used. The key feature this enables is viewing thread names in applications other then the debugger, like WPA.
- For more information: https://randomascii.wordpress.com/2015/10/26/thread-naming-in-windows-time-for-something-better/
- Removing the "GetModuleInfoApple" functionality but until the next release the code path is still available via a backwards compatibility preprocessor macro "EATHREAD_APPLE_GETMODULEINFO_ENABLED".
- Adding free-standing function to set thread names that are surfaced in debuggers. eg. EA::Thread::SetThreadName and EA::Thread::GetThreadName.
Version 1.31.04 (Mar 28, 2017)
Changes
- Fixed an indexing bug in EnumerateThreads which would allow for a higher number of threads found to be reported than actually stored in the return array.
- Adds support for generating a callstack on Kettle when a valid context is provided to EA::Thread::GetCallstack().
Version 1.31.03 (Mar 10, 2017)
Changes
- Added support to Kettle to allow users to specify sub-millisecond timers to ThreadSleep. Despite Sony sleep functions only offering millisecond resolution we offer an implementation which proved a 100 microsecond resolution instead. See https://ps4.scedev.net/support/issue/20041/_nanosecond_precision_for_sceKernelNanosleep for reference.
- Implemented a Reader/Writer Lock backed by a semaphore.
Version 1.31.02 (Jan 09, 2017)
Changes
- Fixing non-member signed/unsigned mismatch conversion warnings on Windows.
- Fix for Windows 'SetThreadAffinityMask' to mask out processors not included in the process affinity mask (processors that aren't available or that do not exist).
Version 1.31.01 (October 21st, 2016)
Changes
- Fixed GetCallstack() to handle cases when the instruction pointer is null which would prevent getting the callstack from being generated.
- Updated Build and Initialize scripts to remove warnings generated by Framework 3.
Version 1.31.00 (June 30th, 2016)
Changes
- Added a const overload of EA::Thread::AtomicGetValue.
- Added EA::Thread::AtomicFetchSub.
- Fixed EA::Thread::AtomicInt template parameter mismatch in Android C11 atomics.
Version 1.30.01 (May 27, 2016)
Changes
- Added an assert to surface Microsoft "SetThreadAffinityMask" failures.
- Updated build scripts.
Version 1.30.00 (Apr 04, 2016)
Changes
- Fixed EA::Thread::ThreadID on PS4. NOTE: This is a breaking change, if code assumed the backing type of EA::Thread::ThreadId was a 'ScePthread' structure.
- EA::Thread::ThreadID is now an integral value matching the debugger.
- EA::Thread::SysThreadID was introduced to PS4 as a mechanism to retrieve the scePthread object.
- Porting over fixes in GetModuleFromAddress and GetModuleHandleFromAddress from EACallstack for apple platform.
- Adding EATHREADLIB_API to FindThreadDynamicData as requested by FIFA.
Version 1.26.02 (Feb 19, 2016)
Changes
- Updated PS4 GetProcessorCount to check if the 7th core is available for use.
Version 1.26.01 (Jan 20, 2016)
Changes
- Updated the XB1 processor count since Microsoft allowed access to (10% - 50%) of the 7th core. Check the platform documentation for more details.
- Migrating ThreadSleep on PS4 from sched_yield to scePthreadYield.
- Workaround for scePthreadMutex on PS4 allocating memory for empty strings which reduced the number of allowable mutexes.
- Minor fix for asymmetric warning push without a pop in a cpp.
Version 1.26.00 (Oct 21, 2015)
Changes
- Optimizing non-member atomics on x86 processors.
- Minor VS2015 fixes for warnings.
- Added support for disabling the priority boost mechanism on Microsoft platforms.
- Minor fix to mutex name on PS4, enforced 32 byte limitation.
- Fixed a bug on PS4 where round robbin scheduling was not being specified on threads that didn't have custom thread parameters. This problem caused a deadlock in unit tests after updating to PS3 SDK 3.x.
Version 1.25.01 (Sep 23, 2015)
Changes
- Fix for standalone atomics on compilers that do not specify a unique char32_t type.
- Add runtime warnings for use of deprecated code.
- Add build controls for deprecate culling.
- Enable atomic64 testing for eathread.
- Android thread names initial change submitted by Andre Pham. Verified to show thread names in visual gdb.
Version 1.25.00 (July 3, 2015)
Changes
- Minor fix for padding warning of 16 byte aligned ContextARM64 structure.
- Deprecated data member 'mbSuspended' of ThreadParameters.
Version 1.24.00 (June 3, 2015)
Changes
- Minor fix for win64 get callstack functionality on a different thread. (bug would result in crash)
- Adding asserts when ThreadParameters mbSuspended is set to true. Starting a thread in a suspended state is no longer supported and is marked for removal in a future version of EAThread.
- Added SetThreadName calls for XB1 to marshall thread names to PIX captures. Preprocessor macro EA_CAPILANO_DBG_ENABLED is used to enable/disable the feature.
- Added non-member atomic functions for use on common non-atomic integral types.
Version 1.23.01 (March 5, 2015)
Changes
- Android C11 atomics macro fixes.
Version 1.23.00 (January 28, 2015)
Changes
- Fixed futex memory barriers due to problems seen on iPhone 5c
- Fixed ThreadAffinityMask typedef to be unsigned.
- Fixed memory barriers on ARM platforms (previously only compiler barriers were used.)
- Added support for Android API 21. Removed simulated 64-bit atomics.
- Fixed bug on capilano related to erroneous assert firing for GetThreadTime being less than EATHREAD_MIN_ABSOLUTE_TIME.
- Removed support for Gen 3 platforms (PS3, Xbox 360), as well as some lingering older code.
- Corrected the definition of the callstack context class for ARM64.
- Removed Affinity from the debugger thread name generated from SetName as requested by Luc Isaak.
- Fixed a warning on VS2015 when building a DLL configuration of the library.
Version 1.22.05 (September 15, 2014)
Changes
- Update callstack generation to support ARM64
- Fixed EAThread assert handler to output assert messages on Unix platforms.
Version 1.22.04 (July 14, 2014)
Changes
- GetThreadTime (milliseconds) on Kettle to use system up time rather than unix epoch to avoid rollover and precision loss.
- ThreadTime typedef on kettle to be a double so that we can specify down to nanosecond sleep times.
- Increasing Mutex name size from 16 bytes to 128 bytes as requested by Frostbite.
- EA::Thread::GetCallstack implementation on Kettle switched to use __builtin_frame_address based on Sony guidance.
Version 1.22.03 (June 9, 2014)
Changes
- Futex performance improvements on Kettle by introducing an atomic spin lock before hitting the OS mutex.
- Fixed preprocessor macro definitions for Windows/WinPRT platforms in eathread_fiber.h file.
- Preprocessor fixes for OSX requested by Maxis.
- Added documentation to solution generated for Visual Studio.
Version 1.22.02 (April 3, 2014)
Changes
- Updated Kettle kTimeoutYield to 1ms due to Sony rounding to the nearest millisecond.
- Added more error checking in Kettle code path for Sony API's.
- Fixed build script 'publicdata' exporting SPU libs in non-PS3 builds.
Version 1.22.01 (March 10, 2014)
Changes
- Disabled EATHREAD_PTHREAD_SIGACTION_SUPPORTED=0 on Kettle since it relies on the 'syscall' instruction which has been disabled in Kettle SDK 1.600+
Version 1.22.00 (Feburary 14, 2014)
Changes
- Removed code for the following deprecated plaforms:
- Bada
- BlackBerry 10 / Playbook
- Cafe
- GameCube
- Marmalade (formerly Airplay)
- Palm
- PlayStation 1
- PlayStation 2
- Samsung TV
- Windows CE
- Added a __try/__except statement to GetCallstack for some Microsoft platforms.
- Added a GetThreadId(SysThreadId) utility function that allows you great the ThreadId from a provided SysThreadId.
- Preprocessor macro EA_SCEDBG_ENABLED will suppress the addition of Sony debug libraries on PS3 and PS4 (liblv2dbg_stub and libSceDbg_stub_weak).
Version 1.21.00 (December 2, 2013)
Changes
- Added support for PS4 (Kettle) and Xbox One (Capilano).
- Initialized a variable to 0 so that the atomic function that subsequently atomically sets it to a user-specified value doesn't read unintialized memory. It has not been determined if having an uninitialized value was signficant, but in any case this change causes analysis warnings about it to go away.
- Migrated ThreadTime on PS4 to use SceKernelUseconds instead of our timespec class used in the Unix codepath.
- Implemented an opt-in DLL safety mechanism for static globals used for tracking created threads. This introduces a dependency on EAStdC's EAGlobal. Add -G:EAThread.EATHREAD_GLOBAL_VARIABLE_DLL_SAFETY=1 to enable this feature.
Version 1.20.09 (August 30, 2013)
Changes
- Augmented ThreadPool to allow the user to set ThreadParameters::mnProcessor to kProcessorAny and thus prevent ThreadPool from doing any of its own thread CPU affinity control. Suggested by Brian Hixon.
- Added support for thread affinity masks. This setting will be a noop on platforms that do not support thread affinities (eg. PS3).
- Disabled C++11 atomics at the request of EAMT due to poor performance.
- Fixed Semaphore blocking for 1ms on Kettle.
Version 1.20.08 (July 11, 2013)
Changes
- Added the base stack address to the ThreadDynamicData structure. Depending on platform this value maybe NULL for discovered system (not EAThread spawned) threads. This will be resolved in a future release.
- Fixed condition variables on OSX/iPhones.
- Added unit tests for condition variable timeouts.
- Fixed GetStackBase, GetStackLimit on iOS.
- Fixed incorrect thread names from being reported.
Version 1.20.07 (May 23, 2013)
Changes
- Revised Android AtomicInt::Add to use __sync_fetch_and_add instead of an __atomic_cmpxchg loop. The new code should be more efficient and more portable.
- Fixed GetCallstackContext for WinRT.
Version 1.20.06 (April 26, 2013)
Changes
- Added EnumerateThreads which reports all threads created by the EAThreads system.
- Fixed problems with Android GetCallstack; it should be working OK now.
- Fixed GetCallstackContext(CallstackContext& context, intptr_t threadId) so that it consistently accepts kThreadIdInvalid and kThreadIdCurrent across platforms. Previously, passing one of those to some platforms (e.g. Xenon) could result in a crash.
Version 1.20.05 (April 15, 2013)
Changes
- Implemented InitializeCriticalSectionAndSpinCount usage on Microsoft platforms instead of InitializeCriticalSection, as that improves performance in practice with our test cases (Job Manager, EAThread).
Version 1.20.04 (March 1, 2013)
Changes
- Added EATHREAD_NAMING, which allows for explicit control over debug thread naming. It also changes the default behavior to not check for a debugger before enabling naming.
Version 1.20.03 (February 4, 2013)
Changes
- Integrated a bug fix that was missing from version 1.20.02.
Version 1.20.02 (January 16, 2013)
Changes
- Fixed a bug in the manual futex implementation that could result in lock hangs on some platforms with certain unusual use patterns.
- Added support for memory barriers (e.g. eareadbarrier) on ios platforms.
- Added eathread_min_absolute_time, which defines a minimum valid value for timeouts in absolute time.
Version 1.20.01 (January 7, 2013)
Release Notes
- The Apple 64 bit atomic change below results in 64 bit atomics that don't work properly on iOS 3 and earlier, due to a bug in iOS. You should use an earlier version of EAThread or discuss a workaround if you need to work on these earlier iOS versions.
Changes
- Disabled atomic 64 bit emulation for Apple platforms. This change was due to the emulation not working as desired on recent iOS versions. See the release notes above for a caveat regarding this.
- Implemented Thread::SetName fix for Linux/Apple in which a user's call to rename the thread could be cancelled out by the created thread renaming itself.
- Fixed a missing header include.
Version 1.20.00 (December 10th, 2012)
Changes
Version 1.19.02 (November 5, 2012)
Changes
Version 1.19.01 (September 21, 2012)
Changes
-
Fixed Unix thread exit coordination problem in WaitForEnd (eathread_thread_unix.cpp). The problem is that WaitForEnd was returning just before the thread exited, but not just after the thread exited. 99% of the time this doesn't make a difference, but if you delete the thread's stack memory right after WaitForEnd returns, then the difference will be pronounced. Reported by Ben Sze, found by Valgrind.
- Removed a couple asserts in the eathread_thread_unix.cpp which could theoretically mistakenly trigger in an unusual execution case (created thread instantly exits after it starts, while the main thread gets blocked).
- Moved a thread priority setting under BSD and Cygwin to handle them better.
Version 1.19.00 (August 6, 2012)
Changes
- Added GetSysThreadId(), which returns the current SysThreadId. This complements the GetThreadId() function which returns the current ThreadId. Suggested by Avery Lee.
- Added backwards support for EABase's EA_WINAPI functionality.
- Fixed an unintialized thread name variable in the Unix version of the Thread class. Reported by Ben Sze.
- Added Apple callstack functionality, which was missed in the previous release. Recall that this is part of the move of the GetCallstack function from EACallstack to EAThread.
Version 1.18.00 (July 3, 2012)
Changes
- Added Thread::SetProcessor and GetThreadProcessor support for Linux-based platforms.
- Added GetCallstack() which has been brought over from EACallstack as part of inter-package refactoring.
- Made it so that the Thread::~Thread doesn't wait for the created thread to exit. This makes it work the same as other platforms.
- Added support for WinRT.
- Added preliminary support for Windows Phone 8.
Version 1.17.02 (June 4, 2012)
Changes
- Added support for Thread::SetProcessor under Linux-based operating systems.
- Made Futex have a fallback to just use Mutex for platforms where that's necessary.
- Made Semaphore have a fallback implementation for platforms whose operating systems don't provide semaphore support. Added a new config option EATHREAD_USE_SYNTHESIZED_SEMAPHORE for this.
- Added C++11-based threading library implementation.
- Added support for FreeBSD.
Version 1.17.01 (May 7, 2012)
Changes
- Altered EAProcessorPause for PSVita to use __builtin_yield() instead of sceKerneldelayThread().
- Updated Thread::Begin to add a ref-count for itself. This allows certain kinds of unusual thread usage patterns. Suggested by Devin Doucette.
- Added EAT_ASSERT_FORMATTED as a new macro for use alongside EAT_ASSERT, EAT_ASSERT_MSG, and EAT_FAIL.
- Permit switching between emulated and native 64-bit atomics on iOS as older versions (iOS 3) do not support 64-bit atomics properly. By default this platform uses emulated 64-bit atomics but native versions can be selected by calling EA::Thread::SetAtomic64Implementation(EA::Thread::kAtomic64Native).
- Changed simple_list::iterator friend declaration to be more compliant with the C++ Standard.
- Updated the declaration of Xenon (XBox 360) atomics to consistently use __stdcall.
- Revised the Windows version of EA::Thread::ThreadSleep to call SwitchToThread when the time was 0. This often results in smoother performance.
- Added SysThreadId and GetSysThreadId support for Apple OSs.
- Added support for the clang compiler under unix64 configurations.
- Fixed a few build issues when compiling EAThread with MinGW/GCC 4.6.2.
Version 1.17.00 (February 28, 2012)
Additions
- Added PSVita platform support (EA_PLATFORM_PSP2).
Bug Fixes
- Fixed a Unix bug which was regressed for getName/SetName.
- Fixed a bug on Unix systems so thread names may be set and stored internally in an EAThread.
- Fixed a potential race condition in AtomicInt::SetValue on Mac where another thread could have altered the atomic's value, causing the CAS operation to spin indefinitely. The fix re-reads the atomic's value if the operation fails.
Changes
- Added build variable EAT_ASSERT_ENABLED to give more flexibility when Asserts needs to be enabled.
- PS3: Added additional EAT_ASSERT usage on returned values by the PS3 API.
- PS3: Added detection for Mutex::Init in case it is called more than once.
- Removed PS2 support, as it's a dead platform.
- Updated the documentation in EAThread.cpp to make the usage of Allocator more clear.
- Disabled manual futex use for the PSP2 (PSVita) since it has built-in support for lightweight mutexes.
- Removed old, unused template declarations.
Version 1.16.07 (February 6, 2012)
Bug Fixes
- Added specializations of AtomicInt<T> for uint64_t and int64_t that use __attributed__((aligned(8))) to ensure correct alignment on iPhone.
Changes
- Added code to set thread policy, but disabled any policy other than SCHED_OTHER by default.
Version 1.16.06 (January 11, 2012)
Additions
- This version explicitly supports the Freebox platform.
- The max thread count has been bumped up to 40 for XBox 360.
Version 1.16.05 (December 21, 2011)
Bug Fixes
- Fixed bug in Windows version of EAThreadGetUniqueId. Reported by James Ding.
- Enabled 64-bit atomics on iOS and removed all simulated atomic operations.
Version 1.16.04 (October 19, 2011)
Additions
- Added CTR support.
- Added Futex::Lock(timeout). Provided by Brian Hixon.
Bug Fixes
Changes
- The Semaphore implementation for Unix-like OSs now waits for any busy users of it on its shutdown.
- Made atomic casting operators return GetValue() instead of directly returning the underlying value in the code. This is useful for the case that a future version of GetValue might do something alternative.
Version 1.16.03 (May 4, 2011)
Additions
- Added thread SetName support for Unix (Linux, OS X, and BSD).
- Added initial Playbook support.
- Added codestripper support.
Bug Fixes
- Fixed bug in PS3 definition of kTimeoutNone; changed it from UINT_MAX to DOUBLE_MAX. Previoiusly it could cause synchronization primitive timeouts to trigger immediately instead of after some time in the case that the system has been running for a few weeks straight.
Changes
- Revised GetSysThreadId to use static variables on Windows, since otherwise it generates lots of calls to GetProcAddress, etc. Suggested by Avery Lee.
- Changed Unix Semaphore implementation to loop during destruction if the semaphore is in use. This prevents leaking semaphores when a semaphore in use is asked to be destroyed.
Version 1.16.02 (November 5, 2010)
Additions
- Added support for specifying EA::Thread::kProcessorAny for the thread's CPU. Provided by Andy Younger.
Bug Fixes
- Changed thread naming so it occurs only if a debugger is present. Apparently this function misbehaves when a debugger is not present. A downside to this change is that it's sometimes useful to have thread names in the absence of a debugger, as in the case of exception handling and reporting. Reported by Andy Eakins.
- Fixed bug in FreeThreadDynamicData for Microsoft platforms. Reported by Toan Pham.
- Fixed typo in Futex for PS3 platform name. The typo had no effect on the code in practice. Reported by Darryl Gates.
Changes
- Made it so that EAThread headers can be #included from SPU code without error. This involved defining EA_THREADS_AVAILABLE when EA_PLATFORM_PS3_SPU was defined.
Version 1.16.01 (May 25, 2010)
Release notes
- This version has been updated to be compatible with PS3 SN 330, CodeWarrior 1.3, and Android platform.
Additions
Bug Fixes
- Fixed a bug in Microsoft threading support regarding processor selection. Reported by Brian Hixon.
- Fixed a PS3 thread destructor leak that can occur in the presence of many simultaneous threads. Reported by Jose Caban.
- Fixed some Android support.
Changes
- Exposed the FindThreadDynamicData function for public use. Previously it was internal.
Version 1.16.00 (April 5, 2010)
Additions
- Added Mobile support: iPhone, Palm Pre, and Android. More mobile platforms to follow.
- Semaphore now supports a max count. However, the behavior of max count is not guaranteed to be consistent between platforms, since platforms have a different view of how to interpret it. You will get more consistent behavior if you set EATHREAD_FAST_MS_SEMAPHORE_ENABLED = 1 and EATHREAD_USE_NATIVE_PS3_SEMAPHORE = 1.
Bug Fixes
- Fixed PS3 thread Release bug. pTDD->Release was being called before pTDD->mThreadEndSignal.Post(). Reported by Jeff Howell.
- Fixed nant eaconfig compatibility problem that arose with eaconfig 1.32.06.
Changes
- Added PS3 SN compiler v320 and later compatibility. The new compiler was generating some new warnings.
- The SP3 Semaphore::Post function was changed to execute in O(1) instead of O(n). Submitted by Jeff Howell.
- Added a EATHREAD_FAST_MS_SEMAPHORE_ENABLED configuration option.
Version 1.15.02 (January 15, 2010)
Additions
- Added RWMutexIP (eathread_rwmutex_ip.h/cpp) for initial testing as an interprocess read/write mutex. This is currently provisional and is subject to folding into the existing RWMutex class.
- Added the EATHREAD_MULTIPROCESSING_OS define, which indicates if the platform supports multiple concurrent processes. This value is always defined, either as 0 or 1.
- Added the EATHREAD_ATOMIC_128_SUPPORTED define, which indicates if 128 bit atomics are supported. This value is always defined, either as 0 or 1.
- Added OS X support for the GetProcessorCount function.
Bug Fixes
- Fixed debug-build-only bug in Futex::HasLock on XBox 360 which could cause a crash instead of the intended false return value. This could happen if the user called HasLock when not having the lock.
- Fixed some #ifdef EAT_ASSERT_ENABLED to be #if EAT_ASSERT_ENABLED. This results in the savings of a few bytes in mutexes in release builds. Reported by Jeff Qifeng Shen.
Changes
- Added AtomicScratch::sBuffer[128] to the SPU build. Previously this variable was declared but not defined, which meant the user needed to manually define it.
- Added an assertion to RWMutex if it's initialized for use in inter-process mode but doesn't support this mode. A future version of EAThread will have RWMutex inter-process support and will have this assertion removed. Prompted by Brian Berry.
- Made the code compile without warning on GCC with -Wextra and -Winline enabled.
- Adjusted the code to avoid some 'remark' output from SNC when compiling with SNC's -Xdiag=2 option.
- The package now builds under SNC for PS3 with the -Xfastmath=1 options. In practice these probably won't make much difference for this package.
- Added EATHREAD_XTL_H_ENABLED config define, which defaults to 1 for the time being. When enabled, eathread_atomic_powerpc.h #includes <xtl.h> under XBox 360. This is solely for backwards compatibility, as it isn't needed by eathread_atomic_powerpc.h but there may be existing user code that is dependent on this include being present. At some point in the future this option will default to 0.
- Made it so that Futex on PS3 can use the PS3's lwmutex instead of our custom implementation. It's not clear which one is better, but it probably doesn't matter much either way. See EATHREAD_MANUAL_FUTEX_ENABLED.
Version 1.15.01 (July 10, 2009)
Additions
Bug Fixes
- Fixed bug/weakness in atomic integer support for Wii whereby the code was disabling and re-enabling interrupts (a common approach), but wouldn't do the right thing if the user already had interrupts disabled, as the atomic code was unilaterally re-enabling them. Now it only re-enables interrupts if they were initially enabled. Found by Irene Wong and Bela Kiss.
- Fixed Win32 VC++ warning C4731 regarding ebx register usage which happens in the case of some kinds of optimized builds. Reported by Dave Cope.
- Fixed PS3 compile error with recent SDKs related to __db16cyc. Reported by Rashin Arab.
Changes
- eathread_pc now frees its per-thread TLS id on module shutdown. This should make a difference for users only if DLLs were initialized and shutdown repeatedly during an application run.
- The Thread class copy ctor and operator= now are more permissive in how they can be used. Primarily, previously it wouldn't allow copying from an unused thread, but now it does. The copy ctor and operator= are still not arbitrarily thread-safe, however. Suggested by Cyril Saint Girons.
- Added PS3 support for Thread::SetName. Sony added the ability to set the name of a thread at some point after the introduction of their initial threading API. However, as of SDK 270 it appears that this functionality doesn't work; the name doesn't appear in the debugger. Suggested by James Fairweather.
- eathread_atomic_struct now supports Wii. Implemented by Tom Van Dijck.
Version 1.15.00 (April 6, 2009)
Additions
Bug Fixes
- Fixed a race condition in ThreadPool::WaitForJobCompletion that could result in the function returning earlier than it should. Reported by Patrick McMorris.
- Fixed bug in Wii,PS3,PS2 ~EAThreadDynamicData whereby it wouldn't use the user-assigned allocator to free a custom-allocated thread stack. Submitted by Dave Cope.
Changes
- Implemented Wii version of GetThreadStackBase.
- Changed ThreadPool::Begin to automatically create another thread as needed under conditions that it wouldn't previously. This results in the behavior being a tad "smarter" than previously.
- Revised Semaphore::Post on PC and XBox 360 to not access member data after releasing waiting threads. This makes the class a little more flexible by allowing a waiting thread to destroy the Semaphore object upon completion of Wait. This will be implemented in other platforms next.
- SpinLockRW::IsReadLocked and IsWriteLocked are now const functions. Suggested by Nate Jones.
- Revised the definition of EAProcessorPause on 360 to use the YieldProcessor intrinsic.
Version 1.14.07 (January 19, 2009)
Additions
Bug Fixes
- Fixed 360 Futex bug that could cause crashes in debug builds with recent 360 SDKs.
- Fixed missing critical section delete in 360 Futex.
- Fixed bug in RWMutex whereby its internal Mutex would be doubly initialized.
- Fixed bug in PC GetThreadProcessor which resulted in the possibility of a wrong return value on older versions of Windows.
Changes
Version 1.14.06 (December 5, 2008)
Additions
- Added SetDefaultProcessorMask / GetDefaultProcessorMask, which allow for controlling what processors threads are created on. This is independent of the similar functionality added to ThreadPool in EAThread 1.14.05.
Bug Fixes
- Fixed bug that would result in libEAThreadSpu.a: could not read symbols errors. Submitted by Jon Sewell.
Changes
- Revised Wii Thread::SetPriority to check that the OS thinks the thread is valid, as otherwise the OS could assert if the thread recently exited.
- AtomicInt classes now have a copy ctor and operator= that uses GetValue to read the copied value. This results in synchronization upon copy.
Version 1.14.05 (October 28, 2008)
Additions
- Added GetAllocator/SetAllocator. This allows the user to specify an allocator to use for cases where memory is allocated. Most parts of EAThread don't allocate memory, but places that do so include the optional factory functions, dynamically allocated stacks, and ThreadPool.
- Added features to ThreadPool to more finely control thread execution. In particular there is now a processor usage mask and an ability to manually add a thread to the thread pool.
- Added the GetThreadStackBase function, which returns the base stack address for the current thread.
Bug Fixes
- Fixed bug in return value of Condition::Wait on Wii/Xenon/PC whereby it should return kResultOK but could return an alternative >= 0 value. Submitted by Jun Wang.
- Fixed bug in Wii Thread class whereby a user-supplied stack would be mistakenly deleted by the Thread class. Reported by Gil Colgate and Bob Flanagan.
- Fixed VC++ warning C4996 (deprecated strcpy) that shows up in some user's configurations.
- Fixed
Win64 GetThreadId compile error for older versions of VC++.
Changes
- Implemented workaround for VS2008 bug which mistakenly generates warning C4985 for standard library headers.
- Revised an assertion in Mutex on PC in order to deal with the case of two DLLs using a different ThreadId to refer to the same thread.
- Removed references to EA_PLATFORM_XBOX (the original XBox, as opposed to XBox 360/EA_PLATFORM_XENON).
- Added, but left commented out, some code to EAThread.build to implement an SPU ranlib post-build step to deal with the following debugger error: libEAThreadSpu.a: could not read symbols: Archive has no index; run ranlib to add one. It is left disabled while the necessity of providing this is unclear.
- EAProcessorPause now uses dbcyc16 on PS3 and XBox 360. Recall that dbcyc16 is a pseudo-instruction which is a hint to the hyperthreaded CPU to let the other hyperthread own the instruction pipeline for 16 cycles.
Version 1.14.04 (June 6, 2008)
Additions
Bug Fixes
- Fixed eathread_pool compile error in non-bulk-builds introduced in the previous release.
Changes
Version 1.14.03 (May 29, 2008)
Additions
- Added EAT_ASSRERT_MSG and EAT_FAIL_MSG assertion macros. Suggested by Ashton Mason.
- Added RWSpinLockW to complement RWSpinLock. It provides writer-priority, but removes recursive reading and can spin more in the presence of heavy reader activity. Suggested and partially implemented by Ryan Butterfoss; completed by Stuart Riffle and Paul Pedriana.
Bug Fixes
- Fixed AtomicInt::operator=() whereby the return value was the old value but should follow C++ operator convention and return the new value.
- Fixed definition of EATHREAD_LIKEL / EATHREAD_UNLIKELY. Reported by David Galeano.
- Fixed assertion failure in ThreadPool destructor. Reported by Patrick McMorris.
Changes
Version 1.14.02 (April 11, 2008)
Additions
- Added GetThreadProcessor and GetProcessorCount functions.
- Added kTimeoutYield to eathread.h. This is used with ThreadSleep to minimally yield to threads of equivalent priority.
Bug Fixes
- Fix for RTL_CRITICAL_SECTION name collision in eathread_futex.h on Windows. Reported by Bob Summerwill.
- Fix for potential false negative return value in RWSpinLock::IsWriteLocked. Reported by
Ryan Butterfoss.
Changes
- Revised eathread_sync to handle changes in the SNC PS3 compiler. In particular, the EACompilerMemoryBarrier definition was modified.
Version 1.14.01 (March 6, 2008)
Additions
- Added SetFiberLimit. Implemented by Stuart Riffle.
Bug Fixes
- Changed Wii kTimeoutNone from UINT_MAX to UINT64_MAX. The latter is what had been intended since Wii ThreadTime was changed to uint64_t in v1.14.00.
Changes
Version 1.14.00 (February 12, 2008)
Release Notes
- This release introduces a lock-free queue and stack and a fiber system created by Stuart Riffle. See eathread_lockfree.h and eathread_fiber.h. These are of beta status at this time and more documentation will be forthcoming in a future release. Feel free to discuss this on this on the UTF Users mailing list.
Additions
- Added eathread_lockfree.h. This implements a lock-free queue and stack created by Stuart Riffle.
- Added eathread_fiber.h. This implements a fiber system created by Stuart Riffle.
Bug Fixes
- Fixed SN compiler on PS3 implementation of Atomic::Decrement. Reported by Cliff Hammerschmidt.
Changes
- Wii definition of ThreadTime changed from unsigned to uint64_t. Suggested by Jun Wang.
- Removed reference to eathread_atomic_ps3_spu.h, as it doesn't exist. Suggested by Jon Sewell.
- Added EALOCALE_VERSION / EALOCALE_VERSION_N to the definition set. This allows for determining the version at compile time.
- Added printf("\32") to end of unit test under PS3 and PS2. This indicates to the SN tools that the app is done.
Version 1.13.01 (December 3, 2007)
Additions
Bug Fixes
- Fixed compile error under MacOSX in the thread and atomic modules. Submitted by Max Burke.
- Changed .build file to work around recently introduced bug in NantToVSTools. Reported by Mark Final.
Changes
- Changed __SN_VER__ usage to __SNC__. SN (compiler vendor) has stated that the former is deprecated.
Version 1.13.00 (December 2, 2007)
Additions
- Added support for the SN PS3 compiler.
- Added support for 64 bit Linux. This is primarily driven by the EA Global Online Services team. Thanks to Dave
O'Neill for making the test machine account available.
Bug Fixes
- Fixed bug in Linux version of GetStatus whereby it could return that a thread has completed execution before it has actually done so.
Changes
- Reverted the PowerPC atomic GetValue behavior to that in EAThread 1.10.00. This has the effect of implementing a read/write memory barrier with GetValue.
Version 1.12.01 (November 5, 2007)
Additions
Bug Fixes
- Fixed a potential pointer double-delete on Wii and Unix when there were more than 32 threads. Submitted by Ted (Tetsuya) Sakashita.
- Fixed linker warning LNK4049 under Xenon optimized builds. Found by Irene Wong.
Changes
Version 1.12.00 (September 6, 2007)
Release Notes
- This release implements important bug fixes for Wii. The EAThread unit tests now completely succeed on Wii.
Additions
Bug Fixes
- Wii (Revolution): Thread::Begin() now accounts for the thread priority that is passed in ThreadParameters. Thread::ThreadSleep() implementation now accounts for the time parameter. This was submitted by Irene Wong.
- Wii (Revolution): Thread leak fixed whereby threads weren't being joined in the Thread::WaitForEnd function. This fixes errors that you might see which result in a Wii kernel trace such as "OSCreateThread(): thread 0x8005f330 is still active. in OSThread.c on line 958."
- Wii (Revolution): Mutex::Lock calls with non-zero timeouts are now looped on instead of returning immediately. This is a compromise; it's best if users don't use lock timeouts, at least on this platform.
- Wii (Revolution): Semaphore::Lock calls with non-zero timeouts and with (timeout == 0) fixed. They would previously give erroneous return values. Semaphore::Lock was also used by RWMutex and Condition and thus this by extension fixes bugs in those primitives as well.
Changes
- Disabled a compiler warning that can occur when compiling as Managed C++.
Version 1.11.02 (July 9, 2007)
Additions
Bug Fixes
- Fixed GCC 3.4 shared_ptr_mt copy ctor compiler error with respect to const-ness. This was found by Dave O'Neill during Linux testing.
- Fixed bug in AtomicInt64 under Win64 in the use of large integers.
Changes
- Changed the way the PS3 branch does thread join, based on a patch sent by Toan Pham. The problem is that previously it was easy to leak threads on PS3 in the caes that you didn't join threads or create multiple threads with a Thread object. This change has the side effect of being incompatible with the use of sys_ppu_thread_exit() calls by the user instead of EAThread ExitThread calls. This was something that wasn't allowed previously anyway.
- Implemented the shared_ptr_mt unit test. Previously the test was little more than a stub.
- Updated the FAQ.
Version 1.11.01 (May 4, 2007)
Release Notes:
- This version implements completely tested support for Linux on x86.
Additions
- Added PlatformBehavior.html to document basic threading behaviour of platforms of significance to us.
Bug Fixes
- Fixed Linux/GCC 3.4 signal handling in Semaphore and Futex. Previously, the Semaphore would return kResultError if a wait was interrupted by a signal, where as now it retries the wait. It is debateable whether this should be the behaviour, but for the time being the rationale is that cross-platform users most likely want their semaphores to act like other platforms that don't need signal handling. Previously, Futex would mis-lock the futex in the presence of an un-handled signal.
- Fixed bug in EAThread::Futex::HasLock on Xenon whereby it could return the wrong answer. Fix submitted by Jon Parise.
Changes
- Revised some individual unit tests to quit upon error instead of repeatedly generating the same error.
- Revised the documentation to use cleaner HTML.
Version 1.11.00 (April 11, 2007)
Additions
- Added support for AtomicInt under GCC 3.4/Linux/Cygwin. Without this much of EAThread couldn't have been used on Linux.
- Added support for Cygwin. Recall that Cygwin is a Unix-like environment that runs on Windows.
Bug Fixes
- Fixed Linux/GCC 3.4 bugs regarding thread priority.
- Fixed CodeWarrior/Wii support for the latest compiler and platform SDK.
Changes
- The PS3 ThreadLocalStorage class has been switched to be implemented via the relatively recently introduced built-in TLS functionality in the PS3 SDK. ThreadLocalStorage is nothing but a thin portability wrapper around the SDK functionality.
- Masterconfig.xml: Reordered sections to match the sections used for the other UTF packages, added snvsi and sndbs entries, added missing IncrediBuild entry, updated PS3 package to 154, updated CodeWarrior to 3.0.5.2-2. Change done by Bob Summerwill.
- EASTL.build: Removed 'supportps3' property, which hasn't been respected by eaconfig for the best part of a year. Added 'test.runtime.moduledependencies' property, to mark the test module as depending on the runtime module. You get that for free in NAnt builds, but not in SLN builds. This adds a project-dependency in the generated SLN. Support for single-module (test, example or tool) onto single-module (runtime) dependencies was added for NAnt in eaconfig-1.21.00, and is in the process of being added for SLN builds in nantToVSTools-3.07.00. In the meantime, this extra property will just ignored for SLN builds. Change done by Bob Summerwill.
- Simplified the AtomicInt::GetValue function on PowerPC.
- Bumped up the thread id tracking storage by a small amount. A more comprehensive solution to the issue of users wanting to create very many threads still needs to be resolved.
Version 1.10.00 (Feb 8, 2007)
Additions
- Added recognition of EATHREAD_DLL in addition to EA_DLL in order to use EAThread as a DLL. EA_DLL is a global define that causes everything to be built and used as DLLs. However, the user may want to set just EAThread to be built and used as a DLL.
- EAThread build file now includes the standard vcproj and vcprojall targets from eaconfig.
Bug Fixes
- Fixed compiler error on Mac OSX with GCC 3.4 with respect to casting function pointers to (void*), plus similar fix with respect to casting pthread_t to Uint.
- Fixed bug in Wii/Gamecube version of ThreadBegin.
- When waiting on a specified job, ThreadPool::WaitForJobCompletion() indicated completion as soon as the job began actively executing instead of waiting for execution to complete.
- Fixed compiler error in Futex with CodeWarrior on the Wii platform: illegal implicit conversion from 'OSThread *' to 'unsigned long'.
Changes
- eathread_pool modified to inherit from IRunnable instead of creating a member static thread function. This gives some additional flexibility.
Version 1.09.00 (June 27, 2006)
Release Notes
- This version primarily adds an initial Futex class.
- This removes support for PS3 SDKs prior to v040.
- There is a known code generation problem with CodeWarrior for Revolution (Wii) whereby it sometimes generates incorrect code for the Atomic primitives. There is no known workaround at present but to rearrange code or disable optimizations.
Additions
- Added an initially experimental Futex class.
- Added kSysThreadPriorityDefault, which defines the platform-specific default thread priority.
- Added the following:
- typedef <platform-specific> SysThreadId;
- SysThreadId GetSysThreadId(ThreadId id);
- Added the following:
- typedef <platform-specific> ThreadUniqueId;
- void EAThreadGetUniqueId(ThreadUniqueId& result);
- Added Mutex::HasLock for use in debug build assertion testing.
Bug Fixes
- Changed PS3 default priority from 256 to 1001 in order to match what the
PS3 OS uses as a default priority for new processes.
- Removed debug code from Thread::SetName().
- Fixed a race-condidion bug in eathread_condition.cpp.
- Fixed compiler error in eathread_atomic_x86.h for VC8 (VS 2005).
Changes
- Converted use of #include "" to #include <>. This allows for faster header access on some platforms.
- Made source code more consistent with respect to how tabs are used. They are now set to always use spaces instead of \t. Much of the code was migrated to use four spaces per indent instead of three.
- Support for PS3 SDKs prior to v040 have been removed. This should not affect any users, as SDKs prior to v040 are virtually useless as of this writing.
- PS3 has been modified to implement a minimum thread stack size of 8192.
Version 1.08.00 (April 10, 2006)
Release Notes
- This version primarily addresses PS3 changes, the Revolution platform, and the Win64 platfom.
Additions
- Added in-code documentation to eathread_pc.cpp and eathread_thread_pc.cpp documenting the potential pitfall of the user using a thread return value of 259. Also suggested a fix for these files that we can choose to use.
- Added assert to eathread_thread_pc.cpp to verify that the user didn't waste any memory trying to supply a stack pointer manually. Such functionality is not possible on Win32-like systems.
- Added an additional paragraph to the FAQ item regarding volatile variables
- Added comments for Wait functions reminding users that timeouts are absolute.
- Added support for EA_PLATFORM_REVOLUTION, the new Nintendo successor to GameCube. As of this writing (2/2006), the GameCube and Revolution thread APIs are identical, thus we fold our Revolution support into our existing GameCube support. EABase 1.0.12 or later recognizes the existence of EA_PLATFORM_REVOLUTION.
- Added support for thread-local storage on PS3. Previous PS3 SDKs didn't support thread-local storage (the __thread identifier) previous to 080. But 080 is here now and supposedly the __thread declaration works.
- Added copy constructor to the Thread class which does what we want instead of what would happen if the compiler generated the copy ctor. Ditto for operator=.
- Added three FAQ entries to FAQ.html.
- Added Win64 / x86-64 support, including a unit test project.
Bug Fixes
- PS2 Thread::Begin() now respects the priority passed in.
- Bug fix for PS2 Thread where it will crash when it's being terminated.
- PS3 RWMutex (read/write mutex) Lock bug fixed; it was ignoring write lock requests, among other things.
- Fixed potential compiler warning in eathread_atomic_powerpc.h and eathread_atomic_x86.h.
- Removal of some "stray" UTF8 binary bytes from a couple files that tripped up the GCC PS3 compiler.
- Modified eathread_pc.cpp's SetCurrentThreadHandle to always call CheckDynamicThreadArray instead of just sometimes. There are cases where thread handles could be exhausted otherwise.
- Fixed bug on GameCube/Revolution whereby the thread Begin function was potenially using the wrong stack space.
- Modified eathread_storage to correctly deal with the fact that Metrowerks doesn't support thread-local storage on console platforms.
- The PS3 080 SDK (with GCC 4.0) changed how 64 bit integers are interpreted and resulted in compiler errors. This has been fixed.
- Removed compiler warning from eathread_pool.cpp when using the CodeWarrior compiler.
Changes
- Updated the UserGuide.html document to reflect dependencies in a recursive way. This was requested by EAU in order to help users know just what they need to build test apps.
- Changed header files that were #including internal header via relative locations to instead #include by 'absolute' location relative to "eathread". This resolves conflicts that occur with compilers (e.g. Metrowerks) that don't support the concept of relative include locations.
- Provided support for the PS3 SDK up to at least v0.82.012, whereas the previously published version of EAThread fully supported only up to 0.50.013. Numerous things have changed in both the compiler and SDK since 0.50. The most signficant of this is the move to 32 bit pointers. This also resulted in changes to usage of the sys_cond_wait function.
- Changed eastl_list.h to use "EAThread/internal/dllinfo.h" instead of "internal.dllinfo."
- Changed copyright symbol from © to (c). The problem is that some editors see the former and assume the file is Unicode and save it as a UTF8 Unicode file. Then GCC fails to compile the file.
- Changed default PS3 thread stack size from 16K to 64K.
- Added empty virtual destructor to the IRunnable thread class. This is considered a benign change, as the class is saddled with a vtable whether the destructor is declared or not.
Version 1.07.00 (November 07, 2005)
Additions
- Added an assert to Mutex::Lock to verify that the lock count isn't some very
high value and thus that the user isn't using mismatched lock/unlock pairs.
- Added PS3 test vcproj file. This makes for easy use with the SN integrated compiler.
- Added ThreadLocalStorage multi-thread test
Bug Fixes
- Bug fix for linked list code. This could fix a crash that could occur in ThreadPool under some circumstances.
- Bug fix for thread_pool::WaitForJobCompletion. The wait loop previously might never exit.
- Bug fix for the Xenon version of Semaphore: Users expect a system memory barrier to occur upon post or wait completion. This was added. It results in slower execution but will be safer for most users. Note that this "fast semaphore" implementation with this change is still much faster than the built-in system semaphore mechanism.
- GameCube: Modified eathread_atomic_powerpc.h to make it not use the specialized asm for atomic operations don't get used under GameCube. The GameCube seems to sometimes crash when the asm versions are executed.
- Xenon Thread::Begin: One of the versions wasn't calling SetThreadProcessor, while the other version was. They have been consistent and both call SetThreadProcessor. Question: Should perhaps neither of them call SetThreadProcessor?
- Modified TestThreadThread.cpp to not generate a warning from the PS2 kernel in PS3 SDKs >= v3.0.
- Added an alignment specification to gThreadDynamicData in order to be safe. This hasn't caused any problems, but in theory it could, so we are playing it safe.
- GameCube: Semaphore timeout calculations were incorrect and were fixed.
- Bug fix for EAThreadLocalStorageData::GetTLSEntry. This fixes the crash happening when ThreadLocalStorage is run in multi-thread environment
Changes
- Disabled warnings that recent versions of XBox 360 xtl.h cause.
- Changed the Mutex implementation for PC/XBox/Xenon to put a sleep call later, resulting in code that doesn't sleep when it doesn't need to in some cases.
The same thing was done to thread pool in the WaitForJob function.
- Made it so that Xenon thread naming works again on release builds. It was (probably) accidentally disabled during a previous modification.
- Bumped up EATHREAD_NAME_SIZE from 20 to 32 on all platforms and to 64 on desktop/server platforms.
- Windows: Changed SetThreadProcessor to use SetThreadIdealProcessor instead of SetThreadAffinityMask. The former is more friendly.
- Mutex::mThreadId is only available if EAT_ASSERT is enabled.
Version 1.06.00 (September 23, 2005)
Additions
- Added operator <= and >= for struct ThreadTime under Unix/Posix. This allows you to compare thread times with <= and >= in addition to <, >, ==, etc.
Bug Fixes
- eathread_thread.cpp for each platform modified to use the constant kThreadIdInvalid instead of using its literal value (0). This has no functional effect; it's purpose is to increase readability and maintainability.
- On PS3, modified GetThreadTime() to return the correct value.
- On PS3, fixed interprocess semaphore so that it does not assert.
- On PS2, changed RunnableFunctionInternal() to release thread ID resource.
- On PC, XBOX and XENON, added \0 when copying strings for mName in various Parameter classes.
Changes
- SetThreadPriority() and Thread::SetPriority() for Windows now automatically adjust the input priority
to a valid priority for Windows.
- PS3 is now assumed to be cooperative scheduling.
- On PS3, added mName to EAConditionData for interprocess condition.
Version 1.05.00 (June 22, 2005)
Additions
- EAThread now fully supports the PS3 PU (primary processor). The unit tests have been updated to be more critical.
- Implemented EA::Thread::Thread::SetName() for Xenon, the same as the existing Windows implementation.
- A number of new FAQ entries were added, based on user questions.
Bug Fixes
- Added #include <string.h> to *_unix.cpp files to be compatible with Mac OSX.
- Fixed Mutex::Lock() for xenon and pc so that it respects the timeout value passed in
- Fixed Semaphore::Post() for pc to prevent Semaphore::Wait() returning incorrect semaphore count
Changes
- AtomicInt operators have been modified to return ValueType instead of return AtomicInt&. This change prevents the possibility that the user mistakenly assumes that the int value of the AtomicInt reference returned by operators stay constant, whereas it can be changed by another thread at any time. The return value is the value of AtomicInt at the time when operator function is performed. The previous behaviour was correct to the C++ standard but introduced the possibility for mistakes and so was deemed unsafe. This is a change that can break user code. However, in many
(or even most) cases where it breaks user code, it reveals a problem with the user code that could easily have gone undetected.
- kThreadPriorityDefault changed from 127 to 0. Documentation regarding the thread priority system has been heavily updated both in code and in the standalone HTML documentation.
- Updated the internal identifier 'kProcessorCount' for Xenon in eathread_pc.cppand eathread_thread.cpp. Note that Xenon thread support is in '_pc.cpp' files and not Xenon-specific files. It turns out that some teams have made build systems whereby they concatenate all .cpp files together into a single .cpp file. While it is not considered very safe to do such .cpp concatenation, the kProcessorCount identifier usage is the only thing in the way of being able to do this with EAThread.
- Bogus assert fixed in eathread.h/cpp for PC/XBox/Xenon whereby Mutex would think that the thread id is an unexpected value. There was a race condition in eathread_pc.cpp whereby two threads could start the thread id identification system at the same time. It wouldn't result in incorrect behaviour at runtime, but could cause the asserts to think they were a different thread id than expected.
- Xenon threading code modified to reference the MAXIMUM_PROCESSORS identifier in the XDK (winnt.h). EAThread previous used a custom constant called kProcessorCount, but the MAXIMUM_PROCESSORS define has become available recently and so we now use it.
Version 1.04.01 (June 8, 2005)
Additions
Bug Fixes
Changes
- Converted to Framework 2 package
Version 1.04.00 (March 17, 2005)
Additions
- Add ability to allow user function wrapper around Thread::begin() function call, as well a global method to set a wrapper for all Thread::begin() from EA::Thread. For detail, see
- EA::Thread::RunnableFunctionUserWrapper
- EA::Thread::RunnableClassUserWrapper
- EA::Thread::Thread::Begin(...)
- EA::Thread::Thread::GetGlobalRunnableFunctionUserWrapper()
- EA::Thread::Thread::SetGlobalRunnableFunctionUserWrapper()
- EA::Thread::Thread::GetGlobalRunnableClassUserWrapper(...)
- EA::Thread::Thread::SetGlobalRunnableClassUserWrapper(..
Bug Fixes
- Xenon: disabled warning 4365 (signed/unsigned mismatch).
Changes
Version 1.3.0 (January 14, 2005)
Additions
- Documentation updated and extended. This includes both the FAQ and the class documentation. Paul Pedriana
- 64 bit atomic operations are now supported on Xenon, as the Xenon SDK is now savvy to such things. Paul Pedriana
- Thread::SetName and Thread::GetName functions added, as per previously agreed upon. Additionally, under the VC++ debugger these name will be reflected in the thread list. Paul Pedriana
Bug Fixes
- ThreadPool changed to use atomic_integer::Decrement instead of preincrement operator--.
This is a bug fix as the preincrement operator was being used in an 'if' statement and this created a race condition. Paul Pedriana
Changes
- Barrier changed to use atomic_integer::Decrement instead of operator--. It's not clear whether this should be considered a bug fix or a increase in robustness. But the code is probably better having it this way.
- Macro for determining whether to create export symbols has been changed from _DLL to EA_DLL. This macro is supplied by tlconfig when a DLL is being built. _DLL is defined by the compiler when /MD or /MDd is passed on the compiler command line.
Version 1.2.0 (November 3, 2004)
Additions
- EA Thread is now available as a DLL. The import library is in lib/pcdll and the DLL and PDB are in bin/pc. Make sure bin/pc is in your path, or copy the DLL to the location of the executable when the program is run so the O/S can find the DLL.
Bug Fixes
Changes
- Removed all references to windows.h and xtl.h for Windows, XBox, and Xenon platforms. This should improve compile speed with no effect on functionality, but some client code may need to be changed to include these headers now. Paul Pedriana
- Implemented fast semaphore for Windows/XBox/Xenon. This allows semaphores and things built upon semaphores to go much faster. A post is now 60x faster than a built-in OS semaphore and a successful wait is about 50x faster. Unit tests pass but I will be keeping an eye on this to make sure it is proper. Paul Pedriana
Version 1.1.1 (December 12, 2004)
Additions
Bug Fixes
Changes
- Default tlconfig updated to 1.00.11.
- Some 64-bit portability warnings fixed.
Version 1.1.0 (August 24, 2004)
Additions
- Factories now allow user-supplied memory.
- Semaphore and Barrier now have a constructor for the most common case.
- The return value of a thread is not retrievable from Thread objects.
Bug Fixes
- EA::Thread::Begin on PS2 was possibly passing in a thread stack size which was not a multiple of 16. Fixed.
- Posix semaphore under Windows now makes workaround for dll issue.
- Bug fix for when WaitForEnd is called when thread was never started on some platforms.
- GetThreadId will always return a unique and consistent true thread id for every thread, including the main thread and threads created by third paries. Previously, GetThreadId would only work for the main thread and threads created by EAThread.
Changes
- Default tlconfig updated to 1.00.10.
- Argument bDefaultParameters has been changed to default to true instead of false. This increases the safety of the system. This change will only affect you if you had previously relied on default construction. The change will not result in surprise behaviour for those that neglect to respond to the change.
- Monitor renamed to Condition by popular demand.
- #include <memory> changed to #include <new> in various places.
- Thread creation no longer uses memory from the heap (malloc/new) but instead uses fixed memory set aside on startup.
- Adjusted code to stop a bogus assert from triggering.
- Assertions now go through a user-suppliable output function instead of the standard C assert function. A problem with the standard C assert function is that it is defined/enabled by default for some plaforms, such as XBox/Xenon (XBox2).
Version 1.0.0 (June 8, 2004)
Release Notes
End of document