All refer to memcpy, and only memcpy_fast is used, so there's no point
keeping them.
Also remove the _memset16_unaligned function prototype since there's no
function definition for it.
builds an Utilies_NO_TLS.a archive of the common Utilities code. It replaces native TLS by a slower reimplementation
Rational: number of TLS slot is very limited by the GLIBc on linux. I hope it doesn't impact performance.
* Zzogl don't requires TLS AFAIK
* spu2x will likely use it for assertions only.
TLS exhaustion creates issue to dlopen plugins
issue #384 : https://github.com/PCSX2/pcsx2/issues/384
But also for profiled build (-fprofile-generate)
http://forums.pcsx2.net/Thread-WORKAROUND-build-with-fprofile-generate
If someone have a better idea, please raise your hand!
Threading VU1 took a lot of rewrites and new code to make possible (MTGS, microVU, gifUnit...), but we finally got to the point where it was feasible, and now we've done it! (so now everyone can stop complaining that pcsx2 only takes advantages of 2 cores :p).
The speedups in the games that benefit from it are great if you have a cpu with 3+ cores (generally a 10~45% speedup), however games that are GS limited can be a slowdown (especially on dual core cpu's).
The option can be found in the speedhacks section as "MTVU (Multi-Threaded microVU1)". And when enabled it should should show the VU thread-time percentage on the title bar window (Like we currently do for EE/GS/UI threads).
It is listed as a speedhack because in order for threading VU1 to have been a speedup, we need to assume that games will not send gif packets containing Signal/Finish/Label commands from path 1 (vu1's xgkick). The good news is very-few games ever do this, so the compatibility of MTVU is very high (a game that does do this will likely hang).
Note: vs2010 builds and Linux builds need to be updated to include "MTVU.h" and "MTVU.cpp".
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4865 96395faa-99c1-11dd-bbfe-3dabce05a288
* Cleaned up trace logging and switched from C++ initializers to C-style const arrays. Kinda mixed on which I like better, but decided to go with the general rule of thumb that a bit less C++ weirdness is probably a good thing.
* Removed __assume() feature from pxFail and pxFailDev, due to the likeliness of unwanted/unexpected compiler behavior (MSVC only). To hint the compiler that code should be unreachable, explicitly use pxAssume(false).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3643 96395faa-99c1-11dd-bbfe-3dabce05a288
DevNotes: DevCon logs are now available in *Release* builds as well as Devel builds, and can be enabled from the Console window's "Sources" menu. They are disabled by default in Release builds, and are always enabled regardless of the ini setting in devel builds. Debug logs are still strictly available in debug builds only.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3609 96395faa-99c1-11dd-bbfe-3dabce05a288
I also re-implemented R5900 runtime exception handling for TLB Miss and such (devbuilds only, for now).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3335 96395faa-99c1-11dd-bbfe-3dabce05a288
* renamed PersistentThread to pxThread (shorter, sweeter, and the 'persistent' part is obsolete since its now a full blown thread manager since some while ago).
* Renamed a bunch of the PostMethodToMain stuff to Rpc_TryInvoke* (for remote procedure call). It's probably not a good use of the term, but I'm bummed I can't think of anything better/shorter.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3238 96395faa-99c1-11dd-bbfe-3dabce05a288
* Fixed some minor bugs when processing idle events.
* Plugin Load/Init/Shutdown/Unload are all called from the Main/UI thread again; this is important for plugins that issue popup warning/error messages.
DevNotes:
* Added ScopedPtrMT, a multithread-safe version of ScopedPtr.
* MTGS errors are still not handled as gracefully as they should be; namely the MTGS thread doesn't restart itself (it's on the TODO list).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2958 96395faa-99c1-11dd-bbfe-3dabce05a288
* Fixed several obscure deadlock issues.
* Savestate actions block; such that only one load or save is permitted at a time.
* Savestates now work through temp files, so that the existing file is not corrupted in case errors occur.
* Exiting the emu while a savestate is saving will still save the state before completely quitting.
* Plugin init errors are handled more gracefully.
Developer Notes:
* Added some event diagnostic trace logging stuff.
* More preliminary work on memorycards -- moved them to their own dialog box and started implementing things, but still a lot of work to do before it's ready for use.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2936 96395faa-99c1-11dd-bbfe-3dabce05a288
* Added versioning info to savestates! (along with some other bugfixes)
* Simplified the Boot and System menus -- removed the old Skip BIOS hack and replaced it with the new BOOT2 injection method (which is considered hack-free at this time).
* Removed lots of UI deadlock gotchas.
* Some new confirmation dialogs and better error handling.
* Implemented an exclusive SysExecutor thread, which serves the purpose of executing system/VM commands and events in uninterrupted order (including suspend, resume, savestates, etc.)
* ... and probably broke linux!
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2911 96395faa-99c1-11dd-bbfe-3dabce05a288
* Implemented TlsVariable, a nifty alternative to __threadlocal, suitable for archaic operating systems that don't have native TLS support (namely Mac OS/X).
* Added a forced reference to TLS in AppInit so that TLS is sure to be available to DLLs (otherwise windows doesn't init TLS by default).
* Disabled TLS support in the x86emitter by default, since it's looking increasingly like we won't find a use for multithreading PS2 sub-components (can be re-enabled later if spontaneous brilliance at a later date proves me wrong).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2396 96395faa-99c1-11dd-bbfe-3dabce05a288
* Configuration panels are all modal-less now, so that you can open the config panel and leave it open while running games.
* Handful of thread sync improvements.
* Fixed on-the-fly interpreter/recompiler configuration.
* Fixed plugin hotswapping (mostly works, but still a little funny at times)
* All new assertion dialogs and popup message handlers.
* RecentIsoList defaults to 12 instead of 6
Dev Notes:
* I had to create a new set of assertion functions called pxAssume*. Originally I hoped to avoid that complexity, and just use a single one-assert-fits-all case, but turned out blanketly using __assume() for all assertion cases wasn't reliable.
* wxGuiTools: Replaced the operator, with operator& -- the latter has proper order of precedence, the former required () to scope correctly. >_<
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2339 96395faa-99c1-11dd-bbfe-3dabce05a288
* Removed some hacks from cpuDetectInit's use of cpuId.
* Improved assertion checking for thread affinity.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2327 96395faa-99c1-11dd-bbfe-3dabce05a288
* ConsoleLogger Optimization: Improved performance considerably for when the log gets spammed by EEcore or MTGS threads.
DevNotes:
* Added a new pxYieldToMain() method (currently implemented in Win32 only). It provides a smart way to allow passive-task worker threads to yield time to the Main Thread when important messages are pending (keyboard or mouse clicks, primarily). It also replaces the wxGetApp().Ping() stuff, which never worked anyway due to wxCommandEvents having a higher priority than native system messages.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2253 96395faa-99c1-11dd-bbfe-3dabce05a288
Renamed a bunch of functions/methods in the Threading namespace that have been bugging me for a while. (MutexLock is renamed to Mutex, Lock() is renamed to Aquire(), etc)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2102 96395faa-99c1-11dd-bbfe-3dabce05a288
* Exception/Signal handling now uses an EventSource, so that multiple handlers can be registered. This is in preparation for (eventual) more complete MIPS TLB support in the VTLB memory model.
* Improved code isolation, so that recompiler-specific code is primarily in iR5900-32.cpp (cleans up Counters.cpp and SysCoreThread.cpp)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2063 96395faa-99c1-11dd-bbfe-3dabce05a288
* Added -fno-strict-aliasing to the ever growing list of gcc optimizations that can potentially cause perfectly good C code to generate entirely broken results.
* Removed the preferred-stack=2, since this branch *should* run fine without it now.
* Have Release builds in Linux SIGKILL when encountering an unexpected SIGSEGV.
* Fixed some deadlock issues with the new console logger (it introduced cancel points, which is a good thing! unless you're the EE recompiler and you swallow up any attempt by GCC to cancel a thread)
* Compilation error fixes.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/aligned_stack@2049 96395faa-99c1-11dd-bbfe-3dabce05a288
* Added timeBeginPeriod() to improve the Win32 kernel scheduler resolution (improves sleep accuracy and thread responsiveness)
* hackfixed some code that made exiting pcsx2 "slow" sometimes.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2041 96395faa-99c1-11dd-bbfe-3dabce05a288
* Added TimedLock to MutexLock
* Use MutexLock::TimedLock as a replacement for some sloppy semaphore use in SysCoreThread and PersistentThread.
* Minor fixes to thread cleanup when exiting the App
* Added some extra deadlock protection to the blocking Wait and Lock functions for Mutexes and Semaphores.
* Moved MutexLock and Semaphore implementations into their own files.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2022 96395faa-99c1-11dd-bbfe-3dabce05a288
* Fixed and added better Emulation/System menu updating. Suspend/Resume is more consistent, and Reset grays itself out after being used.
* Entering plugin configurations auto-suspends the emulator.
* Changing plugins in the Configuration PAnel takes effect now without a restart.
* Added preliminary support for an ExtensibleConfirmation Dialog box (contains a sizer you can add content to, and also has an optional "[x] Do not show this again" checkbox).
Bugfixes:
* Added some mutex protection to cdvdNewDiskCB; "just in case."
* Resolved several recursion and deadlock scenarios when (very!) rapidly suspending, resuming, and resetting the emu.
Developments / Code Cleanups:
* Renamed SysCoreThread ExecutionModes: Suspend/Resume are now Opened/Closed (which more accurately reflects the fact they opena nd close the plugins, and helps avoid ambiguity with the "Paused" state).
* Added Exception::ThreadTimedOut, which is now thrown from Semaphore::Wait when recursive wxApp::Yield() calls are detected, and a deadlock occurs (basically cancels the current action which, most of the time, allows for full recovery).
* Major Threading namespace cleanups, documentations, etc.
* Removed wxScopedArray (scopedarray.h) and replaced it with a better implemeneted ScopedArray class.
* Removed toUTF8 class, which I only added a couple weeks ago because I didn't realize wxCharBuffer had an implicit typecast to (char*).
* Implemented more Source/Listener events for Pcsx2App. CoreThread events are sourced properly now, and added SettingsApplied and SettingsLoadSave Sources.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2010 96395faa-99c1-11dd-bbfe-3dabce05a288
* Switched the SysCoreThread to a static (fully persistent) thread.
* Added some listeners for when the CoreThread status changes
* fixed some slowness in savestates, and the emu will now stall until savestates complete, if you try to exit too quick (avoids savestate corruption)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1993 96395faa-99c1-11dd-bbfe-3dabce05a288
* Completely new assertion macros: pxAssert, pxAssertMsg, and pxFail, pxAssertDev (both which default to using a message). These replace *all* wxASSERT, DevAssert, and jASSUME varieties of macros. New macros borrow the best of all assertion worlds: MSVCRT, wxASSERT, and AtlAssume. :)
* Rewrote the Console namespace as a structure called IConsoleWriter, and created several varieties of ConsoleWriters for handling different states of log and console availability (should help reduce overhead of console logging nicely).
* More improvements to the PersistentThread model, using safely interlocked "Do*" style callbacks for starting and cleaning up threads.
* Fixed console logs so that they're readable in Win32 notepad again (the log writer adds CRs to naked LFs).
* Added AppInit.cpp -- contains constructor, destructor, OnInit, and command line parsing mess.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1950 96395faa-99c1-11dd-bbfe-3dabce05a288
* Rewrote Savestate code, fixed lots of stuff in PersistentThread, and renamed most "Emu"s to "Sys".
* Removed wxScopedPtr and whipped up our own ScopedPtr that doesn't use boost's fail-style function names (and made it more thread-safe).
* Handling exceptions across threads: Added Clone() and Rethrow() methods to BaseException, and added a Rethrow() to PersistentThread.
* Go rid of AppInvoke macros (those were nasty!)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1929 96395faa-99c1-11dd-bbfe-3dabce05a288
PCSX2/Win32:
* Assigned names to the threads so that they show up nicely in the debugger.
* Added more error checking in the new stdout/stderr PipeRedirection code, hopefully fixing Issue 422 (but can't reproduce the error here to be sure).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1904 96395faa-99c1-11dd-bbfe-3dabce05a288