A simple workshop that trains attributes. A dwarf can run the training reactions on repeat to raise strength, agility, toughness, spatial sense, kinetic sense and willpower, all attributes that help fighting.
It works the same way as the old vanilla pump-operating trick.
Cutting logs into planks gives you 4 wooden blocks that can be used in constructions, but not in workshops. Good for walls and floors.
Campfire:
Using wood to build a little fire, you may burn items dropped on it; or you set grass or moss on fire, starting a brush fire on the surface or in the caverns. Great to flush out invisible thieves and necromancers, not so good for the local wildlife.
Carpet:
Decorative only, this workshop takes on the color of the cloth it is build from; use it to line your hallways.
Banner:
Decorative only, this workshops adds a little colorful banner.

Bedroom Set: => Bed, Box, Door, Cabinet.
Noble Bedroom Set: => Bed, 2 Boxes, Door, Cabinet, Weaponrack, Armorstand.
Diningroom Set: => 4 Tables, 4 Chairs
Office Set: => Table, Chair, Door.
Graveyard Set: => 4 Coffins, Door.
Storage Set: => 3 bins, 3 barrels.
You can make armor sets from leather, hardened leather, chitin, chitinplate, shell, shellplate, scale, scaleplate. This costs 5 units of leather and gives you 2 boots, 1 trouser, 1 armor and 1 helm.
You can also take cloth and unravel it back into thread, if you need thread for sutures or moods.
To make it simpler: Shape Item in Pottery=> Fire Item in Clay Oven.
The material progression is: Clay => Greenware => Ceramic.
Joining a guild costs 2500 gold. Dwarves can also switch guilds or leave them.
Joining a group costs 2500 gold. Dwarves can also switch groups or leave them.
The four groups are very distinctive, offensive (Legion), defensive (Guard), ranged (Marksman) and speed (Wrestlers) They are also the only dwarves that can enter martial trances and that get positive thoughts from fighting.
Fossils actually count as gems, but please do not cut them in the Jeweller, it makes them unusable to the Archeologist. All reactions are run automatically, your Archeologist will pick up the fossil and choose the right reaction for you.
Some rewards might have a peculiar material or item. Not all things you find are of a beneficial sort.
You can also creature artificial gems. Take green glass and gold to create emeralds, clear glass and gold for rubies and crystal glass and gold for diamond.
Last part is the transmutation of metals. Take a flux stone as catalyst and two metal bars, to create one bar of the next metal. It is a cycle that allows access to all base metals in the game. You can not create alloys this way, but all reagents needed for alloys.
Build labor |
Skill |
Buildmat |
Dimension |
Requirements |
|---|---|---|---|---|
Architect & Potter |
All Skills |
10 Books, 3 Cabinets |
6x3 |
Mason or Carpenter, Scriptorium |
Libraries train skills. Each of the 6 libraries trains fitting skills instantly to either level 4 to 6, depending on type. Mental skills go to level 6, normal skills to level 5, military skills to level 4.
Good students finish these reactions faster. Use workshop profiles to determine which dwarf you want to train in which library, or just use locked doors.
Writing books will allow you to build libraries. You will need ink and parchments and book bindings. 10 different books are needed for each library.
Ink => Craftsdwarf, from dye, graphite, blood or ash.
Parchment and book bindings are the normal vanilla DF items
Build from cabinets and statues, this simple workshop allows you to open legends mode while playing fortress mode.
Look up what that titan or megabeast has been up to before coming to town, or which migrant might be a vampire...
This buildings allows you to spawn caravans, diplomats and migrants. It needs dfhack to run and only works on civilizations that exist in your world. This means you can't force a kobold caravan if you play in a world without kobolds.
Ordering migrants or caravans costs gold coins.
Merchant Stalls exchange coins for items. Here you can buy items for coins, mostly gold coins. The better the item, the more coins you have to spend. All merchant stalls need a "trade-license" to be build, which you have to order from your liaison first. You will find it in the "misc" section of the tradescreen, next to the other custom tradegoods.
Ore Processor -Its very simple. You mine "gold ore". You "Process gold ore" and you get "pure gold ore" and some boulders or blocks. The gold ore can be used in the smelter. You could smelt the unprocessed ore, but it would result in less outcome. Brick Oven -This building is for megaprojects. You can create bricks of any color you like, just use a boulder to create 4 bricks. Or burn a boulder into 2 fine bricks, which are more valuable. Great for color coding your fortress.
Available Colors: Crematory -Great for cleaning up your fort. You can burn all kinds of different items, including body parts and remains, any sort of items and wooden furniture to get some ash or charcoal out of it. Wooden items produce coal for sure, body parts/remains might leave ash, and all smaller items have a small chance for either.
This is mostly done to reduce the amount of items, so it is nor very efficient in creating ash or coal. I advise to build one or two of these next to your refuse piles. NON-METAL FORGESGlassforge -You can create weapons, ammo and armor in this workshop. You need rough glass for the items. Prices range from one to four units of glass per item.
You have three sets: clear, crystal or green glass. Gemforge -You can create all weapons and armor with gems, as well as basic ammo. You need wood and gems for the ammo, and several gems for each of the bigger items. The created weapons are extremely sharp. The prices range from 1-4 gems.
Rockforge -You can create basic weapons and armor with stones, as well as basic ammo. You need several boulders for each of the bigger items. The created weapons are quite heavy. The prices range from 1-4 boulders.
Boneforge -You can create basic weapons and armor with bones, as well as basic ammo. You several bones for each of the bigger items. The created weapons are quite heavy. The prices range from 1-4 boulders.
METAL PRODUCTIONBlast Furnace & Magma Blast Furnace -
The blast furnace has one job and one job only, to make metal bars. You need a big selection of materials to build it, including leather for bellows. It will greatly shorten the amount of time needed for basic metal generation. It cannot handle the more advanced new metals.
Crucible & Magma Crucible -The crucible is a big melting pot to extract base minerals or purify metals. You can remove the rust from iron and steel, or melt blocks into obsidian and slade. Four blocks give your one obsidian, eight blocks for slade. The metals are chrome, cobalt, mithril, titanium and wolfram. Chrome is decorational only, cobalt around iron-grade, mithril around steel-grade but very light, titanium decorational only, and wolfram very heavy. The most important reaction is the more efficient making of both bronze and steel the crucible allows. You will get one additional bar, as well as a small chance for another one. It is about 65% more efficient then the smelter reactions.
You can coldhammer tin, copper and bronze here, bars as well as items. This means you can very quickly without the need for fuel create copper or bronze weapons and armors for an early milita. This is designed to bridge the gap between start and steel.
Metallurgist & Magma Metallurgist -All alloys, except bronze and steel, have been moved to the Metallurgist. I strongly advise to leave this building in the game, to have access to all the vanilla metals. METAL FORGESHeavy Siegeworks & Magma Heavy Siegeworks -The heavy siegeworks allow the creation of ballista ammo directly from metal. No need to make a wooden bolt and attach a head. You can take bars and smelt 3 ballista bolts in one go. You can also create catapult and ballista parts from metals. Weaponry/Armory & Magma Weaponry/Armory -
Allows to improve the quality of a non-improved weapon or armor by one step. For example a exceptional breastplate will be made into a masterpiece breastplate. Please do not try to improve masterpiece quality items, because they will lose their quality modifier, due to the game not expecting a higher quality level than the maximum. Magma-TechVolcanic Foundry -The great magma forge creates the third best material in the game. Only Adamantine is better. It is very, very costly however. To forge volcanic gear, which is warm to the touch, you need to combine obsidian, slade, steel and mithril. The result is the highest achievement of dwarven metalworkers.
You cannot create a Volcanic Foundry without magma. |


EAThread Changes
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 <IP_ADDRESS>-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


information-builders
Businessmodel of Information Builders
Customer Segments
Information Builders provides a broad range of business intelligence software solutions to commercial and institutional clients across multiple industries. The Company’s clients span the following industries:
- Construction and Manufacturing, including industrial contractors, construction firms, and original equipment manufacturers;
- Consumer Goods and Retail, comprising consumer goods producers and distributors, retailers across multiple sectors, retail wholesalers, and distributors;
- Education, comprising education providers such as universities, as well as education companies;
- Financial Services and Insurance, comprising various banking and financial service providers, and insurance companies;
- Government, comprising various state and federal government bodies and public institutions;
- Healthcare, comprising healthcare providers such as medical centres and hospitals, as well as health services providers such as healthcare product manufacturers and pharmaceutical companies;
- Media and Publishing, comprising various publishing houses and producers of media content;
- Technology, comprising technology companies, software companies, and producers of electronics and technological companies;
- Transport, comprising transportation providers such as airlines, logistics companies, and travel service providers; and
- Utilities, comprising producers and distributors of energy, telecommunications companies, and gas and water transmission providers. Information Builders includes a number of high-profile businesses among its clients, including well-known companies such as Petrobras, BT, Ford, MasterCard, Fuji Xerox Information Systems, and Bollore.
Information Builders serves a global client base, with its native US comprising its core market. The Company principally serves customers across the Americas, Europe, Asia Pacific, and Africa.
Value Propositions
Information builders provides value to its clients in the following ways:
- Its industry sanding and reputation, with the Company established as a leading provider of business intelligence solutions, having a positive reputation demonstrated by its ability to secure business from influential, market leading companies such as MasterCard, Ford, and BT;
- Its broad portfolio of products and services, with the Company offering a wide range of products, services and solutions to its clients, including technical support, data management, analytics, and professional services;
- Its proprietary technologies, with the Company able to provide unique software solutions using a range of proprietary technologies and intellectual properties;
- The flexibility of its solutions, with the Company’s various services and solutions able to be tailored to suit the needs of commercial enterprises across multiple business sectors, including the financial services, education, and transport industries; and
- Its international sales reach, with the Company serving a global client base spanning its native US, as well as other markets across the Americas, Europe, Asia Pacific, and Africa. ### Channels
Information Builders operates a website at www.informationbuilders.com, through which it provides information on its product, services and solutions, as well as its target industries, partners, and customers. The Company also operates a number of international websites that provide market-specific and local language information.
While Information Builders does not operate an online sales channel, it does allow potential clients to register an interest in products via an online contact form. Many of its solutions are also delivered through online software platforms.
Information Builders makes its sales primarily through its in-house sales force, the members of which deal directly with clients. The Company’s sales personnel operate out of the Company’s international network of sales and administrative offices across the Americas, Asia Pacific, Europe, and Africa, including in China, Australia, Morocco, Brazil, Germany, and South Korea.
Additionally, Information Builders make sales through a network of third party channel partners, including independent software vendors, value added resellers, referral partners, and other distributors. These partners offer products and solutions to clients in various international markets on the Company’s behalf.
Customer Relationships
Information Builders make its products available for sale on a self-service basis. The Company does have certain contact tools that allow clients to register an interest in products and solutions independently. Similarly, once purchased, the Company’s software solutions and platforms can be utilised independently.
The bulk of Information Builders’s sales are made through its in-house direct sales force, the members of which consult closely with clients to ensure that their individual needs are met and that, where possible, its services and solutions are tailored to fit their industry and circumstances. The Company seeks to establish long-term relationships with its commercial and institutional clients, often agreeing multi-year service contracts.
Information Builders provides ongoing support to its customers. The Company offers online channels where clients can request product information, and professional services assistance, and operates a dedicated technical support team that can be contacted over the phone. It also offers an online technical support centre that includes a range of resources such as technical documentation and case studies, as well as more general online resources such as ebooks, white papers, webinars, and videos.
Additionally, Information Builders operates a number of social networking accounts – including with Facebook, Google+, Twitter, LinkedIn, Instagram, YouTube, and Pinterest – through which it is able to provide corporate updates and interact directly with clients.
Key Activities
Information Builders is a business intelligence software provider. The Company develops and distributes software solutions for business intelligence and analytics, enterprise integration, data integrality, and performance management.
It also offers various functional solutions, including call centre management, customer relationship management, financial reporting, human capital management, logistics, marketing, sales, and supply chain management services, as well as solutions.
Information Builders serves a broad range of industries, including the banking and financial services, energy and utilities, government, healthcare, education, manufacturing, transport, retail, and technology sectors. The Company serves a global client base, maintaining an operational presence across markets in the Americas, Europe, Asia Pacific, and Africa.
Key Partners
Information Builders works in close collaboration with a broad range of partner companies and organisations that ensure the Company is able to develop and deliver solutions effectively. The Company organises its partners into three core categories:
- Technology Partners, comprising a range of technology companies, software companies and digital service providers that provide solutions that complement the Company’s platforms and solutions with a view to streamlining deployments and enhancing performance;
- Systems Integrator and Advisor Partners, comprising local and international systems integration and consulting companies that assist in design and develop applications that solve business challenges and improve business processes for Information Builders’s clients; and
- Independent Software Vendors, comprising various software developers and software platform operators that embed or integrate the Company’s software directly into their applications and products, offering Information Builders’s analytics, integration, and data quality available to their customers. Information Builders has a number of key strategic partnerships in place. The Company lists many of its partners on its website, including technology partners Cloudera, IBM, and Unisys; systems integrators New Light Technologies, Blue Ocean Global, and ATKINS; and independent software vendors Lean Logistics, Serena Software, and HealthEdge.
Key Resources
Information Builders’s key resources are its intellectual properties and proprietary technologies, its software solutions and platforms, its IT and communications infrastructure, its sales and distribution channels, its partnerships, and its personnel.
Information Builders uses a range of intellectual properties in the development and implementation of its solutions. Searches of records published by the US Patent and Trademark Office identified a number of patent applications in which the Company is named as assignee, including applications entitled ‘Framework for adapter used in enterprise application integration’, ‘Generating a file with integral dynamic reports from queries to an external database’ and ‘Method of producing electronically readable documents with updatable pie charts’.
Information Builders additionally owns and or leases a number of physical properties that provide an operational presence across multiple markets. This principally comprises its network of sales and administrative offices across the Americas, Asia Pacific, Europe, and Africa.
Cost Structure
Information Builders incurs costs in relation to the development of its technologies and solutions, the development and maintenance of its software platforms, the maintenance of its IT and communications infrastructure, the operation of its sales and marketing channels, the procurement of professional services, the management of its partnerships, and the retention of its personnel.
Revenue Streams
Information Builders generates revenue through the provision of various business intelligence software solutions – including data management and analytics products – as well as the provision of professional and technical services to clients across multiple industries. The Company derives its revenue under service contracts.
Information Builders remains privately-owned and as such is not obliged to disclose its financial results online. The Company’s recent revenue figures are unclear.


import copy
import sortedcontainers
import numbers
[docs]class Intervals:
"""
Class used to represent complex intervals
This class is used to represent periods of existence of nodes and edges. Nodes and edges can exist during
not continuous periods (e.g., from time 2 to 5, and from time 7 to 8). Those intervals are represent as
closed on the left and open on the right, i.e., [2,5[ and [2,8[. If we were to use closed intervals on the
right, we would be confronted to ponctual overlaps (without duration), which cause troubles. Furthermore,
intervals are often used to represent discrete time events. If we want to express that an edge exist
during one hour, from 8a.m. to 9a.m, representing it as [8,9[ gives the following results:
* Does the edge exist at 8a.m? -> answer YES
* Does the edge exist at 9a.m? -> answer NO
* Duration -> 1h
When intervals are added, overlapping ones are merged, i.e. if the current Intervals contains
[0,3[ and [4,5[
and we add the interval [2,4[,
The resulting Interval will be [0,5[
This class uses a sorted dictionary to maintain efficiently a proper complex interval,
key=start date, value=pair(start,end)
The attribute "interv" contains the interval (a SortedDict) and can be safely manipulated
"""
[docs] def __init__(self,initial=None):
"""
Instantiate intervals
Instanciate an intervals object. Can be initialized by a list of intervals
:param initial: a single interval as a pair (start, end), or a list of pair or an Interval object
"""
self.interv = sortedcontainers.SortedDict()
if initial!=None:
if isinstance(initial,Intervals):
for start,intv in initial.interv.items():
self.interv[start]=intv
else:
if isinstance(initial[0],numbers.Number):
initial = [initial]
for period in initial:
self.interv[period[0]]=period
[docs] def intersection(self, other_Intervals):
"""
Intersection with another Intervals
return the intersection between the current interval and the one provided as parameter, i.e. a new Interval
containing periods in common between them.
:param intervals: intervals provided as a Intervals object
:return: a new Intervals object
"""
to_return = copy.deepcopy(self)
start = self.start()
for interval in other_Intervals.periods():
to_return._substract_one_period((start, interval[0]))
start=interval[1]
to_return._substract_one_period((start, self.end()))
return to_return
[docs] def union(self,other_Intervals):
"""
Union with another Intervals
Return the union between the current interval and the one provided as parameter, i.e. a new interval containing
all sub-intervals of both. (if they overlap, it is handled)
:param intervals: intervals provided as a Intervals object
:return: a new Intervals object
"""
to_return = copy.deepcopy(self)
for interval in other_Intervals.periods():
to_return.add_interval(interval)
return to_return
[docs] def __add__(self, o):
"""
Add two Intervals using + operator
>>> a = Intervals((0,2))
>>> b = Intervals((1,6))
>>> c = a+b
:param o: other interval
:return:
"""
return self.union(o)
[docs] def __sub__(self, o):
"""
Substract an interval from other using - operator
>>> a = Intervals((0,6))
>>> b = Intervals((1,2))
>>> c = a-b
:param o: other interval
:return:
"""
return self.difference(o)
[docs] def __contains__(self, time):
"""
Defines the in operator
>>> a = Intervals((0,6))
>>> b = Intervals((1,2))
>>> if b in a:
>>> print("b is contained in a")
:param o: other interval
:return:
"""
if type(time) is Intervals:
return self.contains(time)
return self.contains_t(time)
def difference(self,other_Intervals):
"""
Current interval - other_Intervals
:param other_Intervals:
:return:
"""
to_return = Intervals(self)
for t_start,inter in other_Intervals.interv.items():
to_return._substract_one_period(inter)
return to_return
[docs] def contains(self,period):
"""
Is the period contained in this Interval
Check if the provided period is included in the (active time of the) current Interval
:param period: the period to test
:return: True or False
"""
t_start= period[0]
t_end=period[1]
iBefore = self.interv.bisect_right(t_start) - 1
if iBefore >= 0:
potentialInterval = self.interv.peekitem(iBefore)
if potentialInterval[1][0] <= t_start and t_end <= potentialInterval[1][1]:
return True
return False
[docs] def contains_t(self, t):
"""
Return True if the provided t is in the current Intervals
:param t: a time step to test
:return: True if the time is in the interval, False otherwise
"""
iBefore = self.interv.bisect_right(t) - 1
if iBefore >= 0:
potentialInterval = self.interv.peekitem(iBefore)
if potentialInterval[1][0] <= t < potentialInterval[1][1]:
return True
return False
def _add_interval_at_the_end(self, interval):
"""
Add the provided interval at the end.
The advantage of this function is that it is much faster than the normal addition of interval.
:param interval: the interval to add
"""
(last_t,last_period) = self.interv.peekitem(-1)
if last_period[-1]==interval[0]: #the period to add start at the point where ther previous stop
self.interv[last_t]=(last_t,interval[-1])
else:
self.interv[interval[0]]=interval
[docs] def add_interval(self, interval):
"""
Add the provided interval to the current interval object.
Note that the method is relatively slow since all cases need to be checked.
One could use a specific, optimized function to add specifically at the end: _add_interval_at_the_end
:param interval: provided as a pair (start, end)
"""
#if empty interval, simply add
if len(self.interv)==0:
self.interv[interval[0]]=interval
return
#if interval after the current time, add it at the end
start = interval[0]
last_current = self.interv.peekitem(-1)[1][1]
if start>=last_current:
self._add_interval_at_the_end(interval)
return
#if interval already included, do nothing
if self.contains(interval):
return
#get the index of element that is just before the point where we should insert the provided interval
toRemove=[]
mergedInterv=interval
iPotentialMergeLeft = self.interv.bisect_left(interval[0])-1
if iPotentialMergeLeft!=-1: # if not inserted at the beginning
previousInterv = self.interv.peekitem(iPotentialMergeLeft)[1]
if previousInterv[1]>=interval[0]: #if previous interval end after beggining of new
mergedInterv=self._merge_overlapping_intervals(previousInterv, interval) #merge
toRemove.append(iPotentialMergeLeft) #delete previous
#get the index of element just before (or exactly at) the end of the provided interval
iPotentialMergeAfter = self.interv.bisect_left(interval[1])
if iPotentialMergeAfter<len(self.interv): #if new interval not ending after last
succInterv = self.interv.peekitem(iPotentialMergeAfter)[1]
if succInterv[0]==mergedInterv[1] : #if start of element = end of new element
mergedInterv = self._merge_overlapping_intervals(mergedInterv, succInterv) #merge them
toRemove.append(iPotentialMergeAfter)
for i in range(iPotentialMergeLeft+1,iPotentialMergeAfter):
toRemove.append(i)
toRemove.sort()
toRemove.reverse()
for i in toRemove:
del self.interv.iloc[i]
self.interv[mergedInterv[0]]=mergedInterv
def _substract_one_period(self, interval):
"""
Remove the provided interval from the current periods
:param interval: the interval to remove provided as a tuple (start, stop) or an Interval object
"""
# get the index of element that is just before the interval we want to remove
toRemove = []
toAdd=[]
iMinToDelete = self.interv.bisect_left(interval[0])-1
iMaxToDelete = self.interv.bisect_left(interval[1])
for i in range(max(0,iMinToDelete),iMaxToDelete):
toRemove.append(i)
afterSubstraction = self._substract_tuple_from_tuple(self.interv.peekitem(i)[1], interval)
for interv in afterSubstraction:
if interv!=[]:
toAdd.append(interv)
toRemove.sort()
toRemove.reverse()
for i in toRemove:
del self.interv.iloc[i]
for newIntervs in toAdd:
self.interv[newIntervs[0]] = newIntervs
def _add_intervals(self, intervals):
"""
Add several periods to the current periods.
Note: inneficient if there is a lot of overlaps
:param intervals:
:return:
"""
for interv in intervals:
self.add_interval(interv)
[docs] def periods(self):
"""
Return the periods as a list of pairs (start, end)
:return: list of pairs
"""
return [tuple(a) for a in self.interv.values()]
def _merge_overlapping_intervals(self, interval1, interval2):
"""
merge overlapping periods provided as pairs (start, stop)
:param interval1: an interval
:param interval2: another interval
:return: a single interval, result of the merge
"""
return ((min([interval1[0],interval2[0]]),max([interval1[1],interval2[1]])))
def _substract_tuple_from_tuple(self, before, toSubstract):
"""
Remove interval toSubstract from interval before. Provided as pairs (start, stop)
:param before:
:param toSubstract:
:return:
"""
left=[]
right=[]
if toSubstract[0]>before[0]:
left=(before[0],min(before[1],toSubstract[0]))
if toSubstract[1]<before[1]:
right=(max(toSubstract[1],before[0]),before[1])
return(left,right)
[docs] def start(self):
"""
First date of the Intervals
:return: int
"""
return self.interv.peekitem(0)[0]
[docs] def end(self):
"""
Last date of the interval
:return: int
"""
return self.interv.peekitem(-1)[1][1]
[docs] def duration(self):
"""
Duration of the interval
Return the duration of this interval, i.e. the sum of the difference between end and start for all periods
in the current interval object.
:return:
"""
totalDuration = 0
for thisInterv in self.interv.values():
totalDuration+=thisInterv[1]-thisInterv[0]
return totalDuration
def _discretize(self, slices):
"""
Discretize the interval according to provided slices
:param slices:
:return:
"""
to_return={}
sorted_slices = sortedcontainers.SortedList(slices)
for period in self.periods(): # for each period of the current interval
bins = list(sorted_slices.irange(period[0],period[1],inclusive=(True,True))) #Get concerned slices
for i in range(len(bins)-1):
to_return[bins[i]]=bins[i+1]-bins[i]
if len(bins)>0 and period[0]<bins[0]:
i_bin_before = sorted_slices.bisect_left(period[0])
bin_before = sorted_slices[i_bin_before-1]
to_return[bin_before]=bins[0]-period[0]
if len(bins)>0 and period[1]>bins[-1]:
#i_bin_after = sorted_slices.bisect_right(period[1])
#bin_after = sorted_slices[i_bin_after]
#print(period[1],bins[-1],bin_after)
to_return[bins[-1]]=period[1]-bins[-1]
return to_return
def __str__(self):
toReturn=""
for interv in self.interv.values():
toReturn+="["+str(interv[0])+","+str(interv[1])+"[ "
return toReturn
[docs] def __eq__(self, other):
"""
Defines the = operator
Checks if two intervals cover the same periods
:param other:
:return:
"""
if not isinstance(other,Intervals):
return False
return [x for x in self.interv.values()]==[x for x in other.interv.values()]
__repr__ = __str__
@staticmethod
def from_time_list(atimelist,interval):
"""
:param timelist: list of sorted observation time
:param interval: duration between intervals
:return: an interval
"""
all_periods= []
current_interval=[atimelist[0],atimelist[0]+interval]
for t in atimelist:
if t==current_interval[1]:
current_interval[1]=t+interval
else:
all_periods.append(current_interval)
current_interval=[t,t+interval]
all_periods.append(current_interval)
return Intervals(all_periods)


This report summarizes newer versions that may be available for your project's various dependencies.
| # of dependencies using the latest version available | 2 | |
| # of dependencies where the next version available is smaller than an incremental version update | 1 | |
| # of dependencies where the next version available is an incremental version update | 0 | |
| # of dependencies where the next version available is a minor version update | 4 | |
| # of dependencies where the next version available is a major version update | 0 |
This project does not declare any dependencies in a dependencyManagement section.
| Status | Group Id | Artifact Id | Current Version | Scope | Classifier | Type | Next Version | Next Incremental | Next Minor | Next Major |
|---|---|---|---|---|---|---|---|---|---|---|
| com.typesafe.zinc | zinc | 0.3.0 | compile | jar | 0.3.1-M1 | |||||
| org.apache.maven | maven-artifact | 2.2.1 | compile | jar | 3.0-alpha-3 | 3.0 | ||||
| org.apache.maven | maven-model | 2.2.1 | compile | jar | 3.0-alpha-1 | 3.0 | ||||
| org.apache.maven | maven-plugin-api | 2.2.1 | compile | jar | 3.0-alpha-1 | 3.0 | ||||
| org.apache.maven | maven-project | 2.2.1 | compile | jar | 3.0-alpha-1 | |||||
| org.apache.maven.plugin-tools | maven-plugin-annotations | 3.2 | provided | jar | ||||||
| org.codehaus.plexus | plexus-utils | 3.0.15 | compile | jar | ||||||
| Status | Group Id | Artifact Id | Current Version | Scope | Classifier | Type | Next Version | Next Incremental | Next Minor | Next Major |
| Status | There is at least one newer version available. |
|---|---|
| Group Id | com.typesafe.zinc |
| Artifact Id | zinc |
| Current Version | 0.3.0 |
| Scope | compile |
| Classifier | |
| Type | jar |
| Newer versions | 0.3.1-M1 Next Version |
| Status | There is at least one newer minor version available. Minor updates are sometimes passive. |
|---|---|
| Group Id | org.apache.maven |
| Artifact Id | maven-artifact |
| Current Version | 2.2.1 |
| Scope | compile |
| Classifier | |
| Type | jar |
| Newer versions | 3.0-alpha-3 Next Minor 3.0-alpha-4 3.0-alpha-5 3.0-alpha-6 3.0-alpha-7 3.0-beta-1 3.0-beta-2 3.0-beta-3 Latest Minor 3.0 Next Major 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0-alpha-1 3.1.0 3.1.1 Latest Major |
| Status | There is at least one newer minor version available. Minor updates are sometimes passive. |
|---|---|
| Group Id | org.apache.maven |
| Artifact Id | maven-model |
| Current Version | 2.2.1 |
| Scope | compile |
| Classifier | |
| Type | jar |
| Newer versions | 3.0-alpha-1 Next Minor 3.0-alpha-2 3.0-alpha-3 3.0-alpha-4 3.0-alpha-5 3.0-alpha-6 3.0-alpha-7 3.0-beta-1 3.0-beta-2 3.0-beta-3 Latest Minor 3.0 Next Major 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0-alpha-1 3.1.0 3.1.1 Latest Major |
| Status | There is at least one newer minor version available. Minor updates are sometimes passive. |
|---|---|
| Group Id | org.apache.maven |
| Artifact Id | maven-plugin-api |
| Current Version | 2.2.1 |
| Scope | compile |
| Classifier | |
| Type | jar |
| Newer versions | 3.0-alpha-1 Next Minor 3.0-alpha-2 3.0-alpha-3 3.0-alpha-4 3.0-alpha-5 3.0-alpha-6 3.0-alpha-7 3.0-beta-1 3.0-beta-2 3.0-beta-3 Latest Minor 3.0 Next Major 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0-alpha-1 3.1.0 3.1.1 Latest Major |
| Status | There is at least one newer minor version available. Minor updates are sometimes passive. |
|---|---|
| Group Id | org.apache.maven |
| Artifact Id | maven-project |
| Current Version | 2.2.1 |
| Scope | compile |
| Classifier | |
| Type | jar |
| Newer versions | 3.0-alpha-1 Next Minor 3.0-alpha-2 Latest Minor |