Compare commits

..
944 Commits
Author SHA1 Message Date
Stenzek 3cae728aba Qt: Recreate new window immediately when switching APIs 2023-04-08 12:42:34 +02:00
Stenzek 7f24a5cf82 GS: Fix crash when resizing window 2023-04-08 04:05:45 +01:00
refractionpcsx2 1b8f5f232a GS-HW: Fix bug with looping invalidation 2023-04-08 00:08:08 +01:00
refractionpcsx2 77d37de18c GameDB: Add mipmapping to Hasbro Family Game Night 2023-04-07 20:34:03 +01:00
Mrlinkwii 5ea3fb8e1e Github: Update issue template 2023-04-07 19:52:50 +01:00
refractionpcsx2 d683aa43d8 GS: Clean up Host->Local code 2023-04-07 17:18:33 +01:00
refractionpcsx2 d4c3501bb8 GS: Retool downloads to buffer full read 2023-04-07 17:18:33 +01:00
Stenzek f2229a0007 GS/OGL: Don't leak shader objects when compiling 2023-04-07 17:18:21 +01:00
Stenzek 2a06bb6e2c GS/OGL: Use VS/GS selectors from base class 2023-04-07 17:18:21 +01:00
lightningterror a06f890ab9 GS: Fix Wunused-variable warning. 2023-04-07 01:26:00 +02:00
refractionpcsx2 bbe22f95d1 GS: Avoid modifying single QW downloads as they go to a register
Also avoid downloading more than requested
2023-04-06 23:26:59 +01:00
Stenzek 631f75a79c GS/HW: Don't break out of target search loop on dirty target 2023-04-06 14:28:19 +01:00
Stenzek c121aae8f1 GS: Add VS natvis files for FastList and TC Targets 2023-04-06 14:27:36 +01:00
refractionpcsx2 fed7629632 GS: Fix typo in ResizeTexture which was causing a crash 2023-04-06 14:27:08 +01:00
Stenzek 0825ca736f GS/HW: Add other StretchRect() calls to texture copies counter
Better reflects GPU work.
2023-04-06 14:20:20 +01:00
Stenzek 660974c9d1 GS/HW: Update target in new format when reinterpreting
Fixes block scrambling in Budokai 3 during screen transitions.
2023-04-06 14:20:20 +01:00
Stenzek 4404b06d2a Qt: Fix lockup when cancelling shutdown and fullscreen 2023-04-06 08:48:07 +01:00
Stenzek daef69099b Qt: Fix improper shutdown with CTRL+C 2023-04-06 08:48:07 +01:00
Stenzek 6362994fd8 GS: Default to Vulkan for suitable GPUs on Linux 2023-04-06 08:48:07 +01:00
Stenzek 398cf43782 GS: Combine HostDisplay with GSDevice
GS/DX11: Don't throw bad_alloc on surface creation fail

GS: Link device and host display construction/destruction

FullscreenUI: Replace HostDisplayTexture with GSTexture

GS: Purge HostDisplayTexture

GS: Move everything in HostDisplay to GSDevice

GS: Move ImGui rendering to GSDevice

GS: Get rid of reset/store API state
2023-04-06 08:48:07 +01:00
refractionpcsx2 77f8a0f5f6 Counters: Retool UpdateVSyncRate 2023-04-06 08:47:35 +01:00
lightningterror d7e54ccbed CDVD: Fix struct member variables not used.
Codacy.
2023-04-05 20:15:18 +02:00
lightningterror 53a8855696 INISettingsInterface: Fix scope of variable warning.
Codacy.
2023-04-05 20:15:18 +02:00
lightningterror bd16ed1340 iR5900: Fix scope of variable warning.
Codacy.
2023-04-05 20:15:18 +02:00
lightningterror dd365fe334 GS-hw/tc: Fix Wsign-compare warnings. 2023-04-05 20:15:18 +02:00
refractionpcsx2 2a6ba739bc GS-HW: Fix stretch rects errantly discarding data 2023-04-05 16:29:36 +01:00
refractionpcsx2 a863466f70 GS-HW: Better handle double half clears + masked channels + invalidate
Also add Auto Flush to Power Drome US, apparently it wasn't there.
2023-04-05 16:29:36 +01:00
refractionpcsx2 32f07f4aae GS-HW: Read back TC on GS CSR Reset 2023-04-05 16:29:36 +01:00
refractionpcsx2 3ed0e010be GS-TC: Improve handing of wrapping targets in tex in rt 2023-04-05 16:29:36 +01:00
GiladNir fb3c0c8138 GameDB: Added fixes for Fatal Frame and Siren 2023-04-05 15:10:48 +01:00
Stenzek 58ded2e0d0 GS/HW: Fix incorrect hashing of non-palette textures 2023-04-05 15:01:42 +01:00
Stenzek 369b9a4808 Misc: Fix up a few recent clang warnings 2023-04-05 12:43:45 +01:00
Stenzek 0bd57986a9 GS/HW: Don't try to use forced trilinear on shuffles 2023-04-05 12:43:45 +01:00
refractionpcsx2 559b88438b GS: Fix some Scanmask situations in PCRTC 2023-04-04 17:33:32 +01:00
refractionpcsx2 5d140f7db3 GS: Fix missing PSM references. 2023-04-04 17:32:59 +01:00
Stenzek 7b512ce296 GS/HW: Fix Final Fantasy XII CRC hack 2023-04-04 17:27:57 +01:00
refractionpcsx2 ada291c0f6 GS: Remove redundant PSM enum naming 2023-04-04 13:56:44 +01:00
refractionpcsx2 857cb36707 GS-HW: Add CRC hack for NFS Undercover to handle weird shuffle 2023-04-04 13:56:44 +01:00
refractionpcsx2 4a702e0585 EE: Clear reset required status on JIT overflow reset 2023-04-04 11:16:31 +01:00
refractionpcsx2 eac420f205 GameDB: Replace Tex in RT with Partial Target Invalidation, Dark Cloud 2 2023-04-03 21:54:31 +01:00
TellowKrinkle 23d4fa9d9e GS:MTL: Process uv in place
The separate uv_out made it easy to make mistakes, especially when copying code from other renderers
2023-04-03 20:21:15 +01:00
From: TellowKrinkle f6523f34d8 GS:MTL: Implement region rect 2023-04-03 20:21:15 +01:00
TellowKrinkle 82971d3ef7 GS:MTL: Test and sample depth should be supported
Untested, but we restart the render pass if it's detected, which should be accurate, even if it's not the most efficient.
2023-04-03 20:21:15 +01:00
PCSX2 Bot 8d9a5111a1 PAD: Update to latest controller database. 2023-04-03 18:10:16 +02:00
Stenzek e8dac0051c GS: Move expanded dither storage to software renderer
Hardware doesn't use it.
2023-04-03 14:19:46 +01:00
Stenzek 72802aa125 GS/HW: Move channel shuffle test to top of Draw() 2023-04-03 14:19:46 +01:00
Stenzek f77a5c23fc GS/HW: Get rid of GSFrameInfo 2023-04-03 14:19:46 +01:00
Stenzek cf772fcdd6 GS: Reuse backup environment instead of copying 2023-04-03 14:19:46 +01:00
Stenzek 4313c64d9d GS: Remove unused offsets (tex/fzb) 2023-04-03 14:19:46 +01:00
refractionpcsx2 38bf916231 GS: Update fixes for Sacred Blaze 2023-04-02 19:44:11 +01:00
refractionpcsx2 cf59c0b854 GS/Counters: Catch SMODE changes and update VSync rate 2023-04-02 16:19:11 +01:00
refractionpcsx2 10e192deed GS/Counters: Use progressive check, not GSSetCRT for interlace mode 2023-04-02 16:19:11 +01:00
refractionpcsx2 b3fb6e7822 GS: Don't reset CRT mode on reset 2023-04-02 13:11:27 +02:00
Stenzek 3f640ed7eb GS/HW: Fix blue screen in GT4 transitions 2023-04-02 13:10:08 +02:00
Stenzek cc814585ee GS/OGL: Fix incorrect binding in multi stretch rect 2023-04-02 04:29:56 +01:00
refractionpcsx2 b0d26c8242 EE: Correct FPU_MUL_HACK result value 2023-04-02 04:09:47 +01:00
Stuart Kenny 4133be28c6 USB: Remove force feedback logspam 2023-04-02 01:56:00 +01:00
JordanTheToaster 6e81879436 GameDB: Various fixes
Fixes for Driv3r and VP2.
2023-04-01 23:45:10 +01:00
refractionpcsx2 5ea670ece4 GS-HW: Handle triangle memory clears 2023-04-01 16:47:29 +01:00
Stenzek e8e9702d7e GS/HW: Swap Crash WoC CRC hack for native palette draws 2023-04-01 15:45:14 +01:00
Stenzek 4cbdbaabdb GS/HW: Add NativePaletteDraw upscaling fix 2023-04-01 15:45:14 +01:00
Stenzek f332d4f880 GS/HW: Set no_ds if Z tests are disabled and masked 2023-04-01 15:45:14 +01:00
Stenzek 5ce418cdaf GS/HW: Set m_channel_shuffle if late tests succeed 2023-04-01 15:45:14 +01:00
Stenzek 81ab2b9cd1 GS/HW: Minor texture cache cleanups 2023-04-01 15:45:14 +01:00
Stenzek c441d76b7b GS/HW: Fix some asserts tripping in debug builds 2023-04-01 15:45:14 +01:00
Stenzek fcbc027abc GS: Unify D3D device creation paths
Also makes Vulkan the device for Intel Arc GPUs.
2023-04-01 14:15:18 +01:00
Stenzek 8989b69ce8 GS: Fix crash on shutdown when using software renderer 2023-04-01 14:14:19 +01:00
Stenzek e9a624ab54 Qt: Fix main window closing on fullscreen shutdown 2023-04-01 14:14:00 +01:00
Stuart Kenny 8a9df89bf6 SDLInputSource: SDL raw input as config option. 2023-04-01 02:32:01 +01:00
JordanTheToaster e95d75e01f GameDB: Fix missing Tekken 5 demo
Fixes for missing Tekken 5 demo that caused camera issues.
2023-04-01 01:44:17 +01:00
Mrlinkwii bbe58b07a8 GameDB: fixes for Super Trucks Racing 2023-03-31 21:29:46 +01:00
tangomike99 7886c9ea27 GameDB: Fix fog line in Over the Hedge 2023-03-31 21:29:34 +01:00
tangomike99 1c072f38bb GameDB: Fix blurriness in Sitting Ducks 2023-03-31 21:29:34 +01:00
KamFretoZ 6c2bbdef1f Qt: Theme Polishes for Pizza and Cobalt 2023-03-31 20:16:33 +01:00
Stenzek a5ebb388a0 CMake: Enable RAIntegration on Windows builds 2023-03-31 15:46:33 +01:00
Buzzardsoul 9c91c700ac GameDB: Add roundsprite 2 to Samurai Warriors 2 2023-03-31 11:59:44 +01:00
Stenzek 28b111b669 x86/iFPU: Inline FPU_MUL_HACK to dynarec
Fixes Tales of Destiny crashing on clang builds (clang was using r8,
which was allocated by a caller, msvc was not).
2023-03-31 11:39:46 +01:00
Stenzek 1be6e1f374 Misc: Fix a bunch of warnings 2023-03-31 11:39:46 +01:00
Stenzek fff8592b4e GS/HW: Fix GT4/T5 CRC hacks in DirectX renderers 2023-03-31 11:24:31 +01:00
lightningterror 4af3856d15 GS: Bump shader cache version. 2023-03-31 10:18:27 +01:00
lightningterror 8a06fb1840 GS: Fix fxaa bad shader on opengl. 2023-03-31 10:18:27 +01:00
Stuart Kenny e2e2ab62f4 MSBuild: Enable DirectX in cmake SDL build 2023-03-31 10:12:14 +01:00
Ty Lamontagne e7e3f30fce 3rdparty: Update SDL2 2023-03-31 02:06:32 +01:00
Stenzek affc45e752 GSDumpReplayer: Fix crash when downloading Z24 targets
e.g. Lego Racers 2
2023-03-30 21:55:50 +01:00
Stenzek d70334ee57 GS/HW: Slight shader simplification
- Don't declare texture if it's not read from. Stops Vulkan validation
   layers whinging.

 - Get rid of OpenGL common_header.glsl, and use name linking instead of
   leftovers from separate shader objects.
2023-03-30 21:55:50 +01:00
Stenzek 1c600c7068 GS/HW: Remove m_used from SourceMap
Not used anymore, since we don't age the TC when there's no draws.
2023-03-30 21:55:50 +01:00
Stenzek 7a93f1fc23 GS/HW: Remove KOF2002/SVCChaos CRC hacks
10 Pin - Champions Alley needs texture-inside-RT in LookupDepthSource(),
but otherwise nothing else appears to break if we fall back to normal
lookup for Z sources.

Relaxes the page alignment requirement for split texture shuffle
detection, Psi-Ops does an A->A copy with coordinates offset by +8.
2023-03-30 21:55:50 +01:00
Stenzek 9c2f7aeb6a GS/HW: Get rid of reset-32bits-fmt flag hack
Doesn't appear to be needed anymore.
2023-03-30 21:55:50 +01:00
Stenzek 8af2d17d1f GS/HW: Cache target widths as well as heights
Avoids redundant resizes.

Also align widths to page sizes, like heights.
2023-03-30 21:55:50 +01:00
Stenzek 65d78eff57 GS/HW: Sample depth buffer instead copying when safe
OpenGL and Vulkan only.
2023-03-30 21:55:50 +01:00
Stenzek 8be9e2dc71 GameDB: Remove preload/CPU FB for Crash WoC
Fog effect works correctly now (at least at 1x).
2023-03-30 21:55:50 +01:00
Stenzek faecc6913b GS/HW: Texture cache improvements
GS/HW: Only use temporary source for recursive draw

.. and don't insert it into the page map.

GS/HW: Lookup page list for depth sources

GS/HW: Avoid target copies by using shader sampling

GS/HW: Make texture cache a global pointer

GS/HW: Remove GetID() from GSTexture

It only made sense for OpenGL, was always zero in Vulkan.

GS/HW: Rewrite texture sampling hazard detection

Also avoid redundant channel shuffle setup.

GS/HW: Turn Haunting Ground CRC into an OI fix
2023-03-30 21:55:50 +01:00
Stenzek ed90c8868f GS/HW: Don't leave ZBUF_TEX0 partially uninitialized 2023-03-30 21:55:50 +01:00
Stenzek 71edce43ca GS/HW: Fix incorrect condition for continuing channel shuffle 2023-03-30 21:55:50 +01:00
Stenzek 4e9ef34f58 GS/HW: Fix incorrect end block computation in Overlaps() 2023-03-30 21:55:50 +01:00
Stenzek de55596926 GS/Vulkan: Include source code in shader debug info 2023-03-30 21:55:50 +01:00
JordanTheToaster 316bc422bc GameDB: Various fixes
Fixes lack of sun intensity in WRC texture distortion in Ultimate Spiderman and missing serials and fixes for those serials for Sakura Taisen.
2023-03-30 20:40:03 +01:00
Stenzek c73ae3dfb3 x86/iR5900: Get rid of eeRecIsReset
It was preventing the rec being reset inbetween launching different games.
2023-03-30 19:45:11 +01:00
Stenzek 27b45276ae SPU2: Remove GetLongName() from SndOutModule
Unused since WX.
2023-03-30 16:55:17 +01:00
JordanTheToaster b00852fada GameDB: More WWE text fixes
Adds the text fix to WWE 2007 to 2010
2023-03-30 11:03:29 +01:00
refractionpcsx2 663f61f4e1 GS-TC: only escape Local Mem Invalidate early on exact BP match 2023-03-30 11:03:10 +01:00
refractionpcsx2 110bc64ee4 GS-TC: Fix up page translation logic, clean up variables 2023-03-30 11:03:10 +01:00
refractionpcsx2 3764e773b3 GS-HW: Check what channel is being read during a possible split shuffle 2023-03-30 11:03:01 +01:00
icup321 682f0c7984 GameDB: Add Mipmap/Trilinear to SpongeBob Movie & Incredibles
Update settings for The Incredibles + ROTU and The SpongeBob Movie Game
2023-03-30 09:46:43 +01:00
JordanTheToaster 93014bfede CI: Switch Windows Qt builds to Clang
Switches the Qt builds over to using Clang by default which should be a bit faster overall.
2023-03-30 09:27:10 +01:00
JordanTheToaster 4dd946bc8a CI: Remove separate Windows builds
Removes the AVX2 and SSE4 builds in favour of the unified Qt build.
2023-03-29 20:00:51 -05:00
JordanTheToaster 2222007516 GameDB: WWE 2011 Text fixes
Fixes for the broken text in WWE 2011.
2023-03-29 17:28:55 +01:00
refractionpcsx2 b09e3b0613 GS: Split ModXY in to its own function 2023-03-29 17:08:41 +01:00
refractionpcsx2 3a193956ff GS: Provide HPO Normal offsets when there is no RT. 2023-03-29 17:08:41 +01:00
Mrlinkwii 786eedf2f2 GameDB: fixes for various games 2023-03-29 15:18:16 +01:00
Stuart Kenny f217519e97 GameDB: Fix WRC 4 car discolouration 2023-03-29 11:50:13 +01:00
Buzzardsoul 4caaa70726 GameDB: Add Mipmap and Trilinear to The Incredibles 2023-03-28 21:54:57 +01:00
JordanTheToaster 02a27a6974 GameDB: Rogue Galaxy character fix
Fixes broken characters in Rogue Galaxy.
2023-03-28 19:52:17 +02:00
Stenzek 6d7eceb4f1 GS/HW: Remove JakGames/JakX CRC hack 2023-03-28 11:21:47 +01:00
Stenzek f52e72b026 GS/HW: Swap OI_JakGames CRC hack for CPU sprite render 2023-03-28 11:21:47 +01:00
Stenzek ebeb646e4d GS/HW: Relax CPU sprite render requirements further via levels 2023-03-28 11:21:47 +01:00
refractionpcsx2 70c1620a87 GameDB: Add Partial Target Invalidation for Fatal Frame III
aka Project Zero 3
2023-03-28 11:09:44 +01:00
refractionpcsx2 d45964d0c7 GS-HW: improve dirty handling with expanded tex is rt's 2023-03-28 11:09:44 +01:00
refractionpcsx2 e67aa73e75 GS-HW: Round up rect for hardware draws 2023-03-28 11:09:44 +01:00
refractionpcsx2 cb2fe3792a GS-HW: Resize RT used as larger source 2023-03-28 11:09:44 +01:00
Stenzek 2b94cfe782 GS/HW: Allow strip channel shuffles to be detected
Fixes fog wall in WRC 4.
2023-03-27 18:29:01 +02:00
PCSX2 Bot a1c99f3e7a PAD: Update to latest controller database. 2023-03-27 18:28:13 +02:00
Stenzek 57fa3ac653 ChdFileReader: Prefer using TOC for file size over header
The header is incorrect, and pads each track to 4 frames.
2023-03-27 10:21:10 +01:00
refractionpcsx2 01b6e1b88d CDVD: Add missing TOC information 2023-03-27 10:21:10 +01:00
refractionpcsx2 294aca82c4 GS-TC: Give option to match target on exact memory addresses
Chances of it being the wrong thing but having the same start/end address is pretty slim. Hopefully
2023-03-26 22:28:23 +01:00
refractionpcsx2 d080e7e7bd VTLB: Show rough EE PC when a TLB miss happens 2023-03-26 22:14:28 +01:00
refractionpcsx2 66a13d4c3a GS-TC: Only stop checking for RT's if whole read is inside that RT. 2023-03-26 15:28:14 +01:00
JordanTheToaster 87c76ad010 GameDB: Various fixes
Helps alleviate some issues in Shrek 2 and removes round sprite and merge sprite from Driv3r as they cause issues
2023-03-25 06:16:25 +00:00
Dreadmoth 822d292e2f GameDB: Ratchet & Clank 1&2
Fixes broken pause menu.
2023-03-25 06:06:24 +00:00
KamFretoZ 42155dd11b Qt: Add a New Light Theme and Cobalt Theme Fix (#8471) 2023-03-24 12:03:05 +00:00
Stenzek 9b1a2d9eaf GS/DX11: Fix incorrect UBO for P8 conversion 2023-03-24 11:43:51 +00:00
TellowKrinkle 8d0307cedd UI: Fix build with achievements disabled 2023-03-23 23:48:40 -05:00
refractionpcsx2 72b38ce712 CDVD: Don't auto mount disc again if game ejects it. 2023-03-23 20:40:45 +00:00
refractionpcsx2 caf8eedd76 CDVD: Correct SCMD error states and init SCMD result 2023-03-23 20:40:45 +00:00
refractionpcsx2 181b05daf0 CDVD: Don't let it try to close the tray if it isn't open 2023-03-23 20:40:45 +00:00
refractionpcsx2 92b21ac9c2 CDVD: Correct status sequence during disc swap. 2023-03-23 20:40:45 +00:00
Berylskid ad12a3f735 UI: Correct Recommended Values for a few items (#8465) 2023-03-22 13:25:31 +00:00
Stenzek badca7c20b GS/HW: Fix texture replacement precaching option 2023-03-22 10:03:31 +00:00
Stenzek 7cdcfd4b1a Qt: Remove backup AppImage on next launch 2023-03-21 13:48:50 +00:00
Stenzek b02af117f8 CMake: Swap -g for -g1 in Linux Release builds
-g tends to blow the AppImage sizes up a bit too much...
2023-03-21 13:48:16 +00:00
Stenzek 87d269512e GS/HW: Compiler warning fixes 2023-03-21 13:15:31 +00:00
Stenzek 3346349bba GS: Remove GSDeviceNull
It hasn't been used in a while, we just use a normal device
and null renderer instead.
2023-03-21 13:15:31 +00:00
Mrlinkwii 280a41806f GameDB: fixes for Metal Gear Solid 3 Snake Eater 2023-03-20 21:27:03 +00:00
Ikko Eltociear Ashimine 134937082d Counters: fix typo
recieve -> receive
2023-03-20 15:46:56 +00:00
Stenzek 1499994143 CI: Update Linux to Qt 6.4.3 and SDL2 2.26.4 2023-03-20 15:46:32 +00:00
Stenzek 5805142fd7 CrashHandler: Print backtrace on Linux 2023-03-20 15:46:32 +00:00
Stenzek 5fc855e519 CMake: Add libbacktrace module 2023-03-20 15:46:32 +00:00
Stenzek 8c8bf22892 CI: Build libbacktrace in Linux deps 2023-03-20 15:46:32 +00:00
Stenzek ec927e5dd9 CMake: Force debug symbols in Linux Release builds 2023-03-20 15:46:32 +00:00
refractionpcsx2 3a042d8c14 GS: Compensate for misaligned 24bit partial local->host transfers 2023-03-20 14:35:31 +00:00
JordanTheToaster fc88d1de85 GameDB: From Soft game fixes
Adds partial target invalidation to every From Soft game because they used way too much glue.
2023-03-20 11:19:49 +00:00
JordanTheToaster 6cf48e9e2b GameDB: Various fixes
Fixes R&C 3 broken pause menu and broken textures in AC Last Raven.
2023-03-20 10:05:00 +00:00
refractionpcsx2 db22377a0d GS: Remove ExpandTarget on EE Write 2023-03-19 23:32:17 +00:00
Silent 443cc08229 VMManager: Fix "X widescreen patches loaded" text when loading from files 2023-03-19 23:31:52 +00:00
Stenzek 6ad222117d GS: Reduce MAD buffering draw size
It's silly to draw to the whole double-sized render target, but discard
half the pixels.

Also centralizes the constant setup, get rid of the duplication.
2023-03-19 23:31:37 +00:00
Stenzek b26acad721 GS: Sample LOD 0 explicitly in interlace shaders
Can't use normal sampling because the derivates are undefined in
non-uniform control flow (in MAD).
2023-03-19 23:31:37 +00:00
refractionpcsx2 76e8bfe42f GS-TC: Make sure drawn/target coords match for adjusting drawn rect 2023-03-19 15:18:54 +00:00
refractionpcsx2 1f6704dbda GS-TC: mask target rect with drawn area before download. 2023-03-19 15:18:54 +00:00
Toastarrr 33ea4e6225 Debugger: fix memory search crash 2023-03-19 13:44:11 +00:00
Toastarrr d9cecbde7d Debugger: use unsigned long long for memory search 2023-03-19 13:44:11 +00:00
JordanTheToaster 84fab9ccd3 ImGuiOverlays: Fix incorrect fix naming
Fixes incorrect target partial invalidation overlay name and makes autoflush more distinct from anisotropic filtering.
2023-03-19 13:18:37 +00:00
JordanTheToaster 137dfc20fa GameDB: Various fixes
Fixes for Smash Cars This is Football 2002 and Champions Return to Arms.
2023-03-19 13:18:37 +00:00
TellowKrinkle f39e856fee iR5900: Don't limit block sizes to 16 bits 2023-03-19 11:40:51 +00:00
Connor McLaughlin e91aabc843 Qt: Fix graphics settings opening to other pages
Regression from 2b49614df9
2023-03-19 11:15:53 +00:00
Mrlinkwii f85a99b6f0 GameDB: fixes for True Crime - Streets of L.A. 2023-03-19 00:15:29 +00:00
TellowKrinkle a59f95317a Core: Use auto for ryml noderefs
The return type switched between 0.4 and 0.5, so this will be compatible with both
2023-03-18 17:28:30 -05:00
Mrlinkwii 6923000b52 GameDB: remove SoftwareRendererFMVHack from Siren 2 2023-03-18 22:26:41 +00:00
Víctor "IlDucci 83471bdacd Qt:i18n: Adding I18N comments for translators, minor typo fixes (#8048) 2023-03-18 16:14:55 -05:00
refractionpcsx2 18045c195a GameDB: Readd Tex in RT for Xenosaga Ep.III 2023-03-18 17:07:29 +00:00
refractionpcsx2 b1edadfe3a GameDB: Add partial target invalidation to Ratchet Gladiator/Deadlocked 2023-03-18 17:07:29 +00:00
refractionpcsx2 ed5984aa3a GS-TC: Update draw rect on draw + invalidate bad match old targets 2023-03-18 17:07:29 +00:00
refractionpcsx2 bfca8b8461 GS-HW: Update dirty PCRTC framebuffer on output 2023-03-18 17:07:29 +00:00
refractionpcsx2 63cb0f3577 GameDB: Add partial target invalidation to ZoE 2nd Runner + MGS2 2023-03-18 17:07:29 +00:00
refractionpcsx2 2b49614df9 GS-HW: Don't bilinear dirty rects by default, added as upscale hack. 2023-03-18 17:07:29 +00:00
refractionpcsx2 fa439a465d GS-TC: Fix dirty rect sizes and merging. 2023-03-18 17:07:29 +00:00
refractionpcsx2 11a74c2c05 GS: Fix up some dirty behaviour, allow dirtying by page 2023-03-18 17:07:29 +00:00
refractionpcsx2 a693efad1e GameDB: Correct Dog's Life fixes 2023-03-18 17:07:29 +00:00
refractionpcsx2 75357a2f0a GS-TC: Remove uses of Surface Offsets where possible. 2023-03-18 17:07:29 +00:00
refractionpcsx2 a70f5ebc08 GS-TC: Rewrite rect translation 2023-03-18 17:07:29 +00:00
refractionpcsx2 b161df69e1 GS-TC: Fix up expand targets when mixing 24 and 32bit. 2023-03-18 17:07:29 +00:00
refractionpcsx2 85a0e75e28 GameDB: Add needed updates for Siren 2 and Legion 2023-03-18 17:07:29 +00:00
refractionpcsx2 56022a9af3 GS-TC: Remove uses of Surface Offsets where possible. 2023-03-18 17:07:29 +00:00
refractionpcsx2 5cbcf706e9 GS-HW: use page aligned rects for inexact matches when possible 2023-03-18 17:07:29 +00:00
refractionpcsx2 500b449422 GS-HW: Correct region size when source is in render target 2023-03-18 15:36:18 +00:00
Mrlinkwii 8b78388834 GameDB: various fixes 2023-03-18 13:49:37 +00:00
Mrlinkwii b44d40d919 GameDB: remove not needed game fix for Yakuza 2023-03-18 13:49:17 +00:00
Mrlinkwii f8310e0a35 GS/CRC : purge Yakuza CRC hack 2023-03-18 13:49:17 +00:00
refractionpcsx2 59dc0e2cbf GS-SW: Fix rects for sw dumps 2023-03-18 12:49:15 +00:00
refractionpcsx2 6a4a7b1a3b HW-CRC: Draw glass smash on CPU in Burnout 3 2023-03-18 12:49:15 +00:00
lightningterror d62a7999fb GS-hw: Clean up Wunused-variable warnings. 2023-03-17 20:20:10 +01:00
TellowKrinkle 0ba1a42867 CI:macOS: Use xz for distribution
macOS 10.14 fixed a bug where Archive Utility couldn't decompress .tar.xz and is now our minimum version
2023-03-17 03:18:02 +01:00
JordanTheToaster 68ef49aef5 GameDB: SMT DS Fixes
Fixes broken effects when using lower than high blending.
2023-03-17 00:55:51 +00:00
Buzzardsoul d0a65153df GameDB: Add Mipmap and Trilinear to Spyro: Enter the Dragonfly 2023-03-17 00:55:36 +00:00
refractionpcsx2 ac113b48e7 COP2: Mask R register on CFC2 reads 2023-03-17 00:43:23 +00:00
Mrlinkwii 6e14680ac7 GameDB: add fixes for Lupin III - Columbus no Isan wa Akenisomaru and fix game names 2023-03-16 13:23:09 +00:00
Mrlinkwii ba03a533d8 GameDB: fixes for Biker Mice from Mars 2023-03-15 23:21:34 +00:00
JordanTheToaster 9abbecb286 GameDB: Various fixes
Fixes for incorrect region codes and adding merge sprite to Zone of Enders 2 to fix beeg bloom.
2023-03-15 20:39:44 +00:00
refractionpcsx2 9a20ea5c21 GS: Detect double width texture shuffles 2023-03-14 18:13:07 +00:00
refractionpcsx2 8ac4b125d2 UI: Fix masking of Target Partial Invalidation with Tex in RT 2023-03-14 15:04:10 +00:00
refractionpcsx2 f9b682ad10 GS: Fix integer scaling when using Bilinear (Sharp) 2023-03-14 14:51:00 +00:00
TellowKrinkle 58959b6114 CMake: Output test logs on failure 2023-03-13 20:45:12 +00:00
TellowKrinkle b90405a7d2 GHActions:Windows: Add CMake clang-cl build 2023-03-13 20:45:12 +00:00
TellowKrinkle e0a1613ad9 CMake: Allow overriding the exe name 2023-03-13 20:45:12 +00:00
TellowKrinkle 11930ed7a2 CMake: Clang-cl support 2023-03-13 20:45:12 +00:00
JordanTheToaster f3ff1cec54 Documentation: Remove unused files
Removes old or unused files from the docs folder.
2023-03-13 20:29:27 +00:00
Stenzek 435e73d838 GS/HW: Texture cache improvements
Change texture scale from vector to scalar

 - Independent X and Y scaling is long gone.
 - Also separate size and scale in TC lookup

Move clear value for texture to base class

Align heights to page size

 - Since FRAME and Z are in page units, we can't have two targets
 - overlapping within the same page.
 - Stops some small resizes too.
 - Test cases: Genji and Spider-Man 2 shadows.

Don't modify target TEX0 on shuffle/clear

Move upscale multiplier to uniform

Make P8 conversion page-aware

Fix incorrect depth preload shader

Improve HLE of texture shuffles

When a texture shuffle is split into two half-screen draws, we skip the
first, and draw the whole thing in the second, taking care of when both
the texture and framebuffer are offset.
2023-03-13 20:29:05 +00:00
Stenzek 2fdea258fa GS/HW: Fix incorrect depth preload shader 2023-03-13 20:29:05 +00:00
Stenzek b453a6a46d GS/Vulkan: Actually disable shader cache when requested 2023-03-13 20:29:05 +00:00
Stenzek 5b88e637d8 GS/Vulkan: Fix clear order in Merge/Interlace
Fixes blank frame when changing resolutions.
2023-03-13 20:29:05 +00:00
Stenzek ac02bcbe33 GSRunner: Default to window but surfaceless when scripted 2023-03-13 20:29:05 +00:00
Stenzek 9efdeae3ac GSRunner: Reduce log spam 2023-03-13 20:29:05 +00:00
Stenzek 54e59e2f7b GSRunner: Support upscale parameter 2023-03-13 20:29:05 +00:00
PCSX2 Bot 2c4e02ff34 PAD: Update to latest controller database. 2023-03-13 17:56:18 +01:00
Berylskid 2a306cbd91 GS-OGL: Remove available_vram (#8389) 2023-03-13 09:07:34 +00:00
Víctor "IlDucci b244136179 GUI/Qt: Minor text corrections, nitpicks (#8213)
- Adding the actual corrections from #8048 that were not added by #8119.
 - Fixing typos and missing ending periods.
 - Unifying the writing of certain terms:
   - Memory Card uppercased following Sony's writing (taken from PS2 manual).
   - gamefixes/game fixes -> game fixes
   - fast forward/fastforward/fast-forward -> fast-forward (taken from Oxford)
   - slowmotion/slow motion/slow-motion -> slow-motion (following the same convention as before, as I could not find this in Oxford's)
   - framebuffer/frame buffer -> framebuffer
   - Xbox name properly uppercased (for Controller settings)
 - Correcting RA's Rich Presence to separate it from Discord's Rich Presence (after discussions in the Translations channel).
 - Unification of option names in the option area and the hint area.
 - Adding a fix for the (currently broken) Stretch Height/Vertical Stretch tooltip.
2023-03-12 19:34:20 -05:00
Stenzek b897f367ce FullscreenUI: Mirror Qt graphics settings changes 2023-03-12 16:21:36 +00:00
refractionpcsx2 6c46418f68 CI: Remove WrapGS from GameDB Schema 2023-03-12 15:11:29 +00:00
refractionpcsx2 f0d5d21e64 GS-Config: Remove remnants of the WrapMem setting. 2023-03-12 15:11:29 +00:00
Stenzek 93490876c9 Qt: Fix crash when changing renderer 2023-03-12 15:11:16 +00:00
Stenzek 74763d2156 Qt: Hide manual hardware fixes from global settings 2023-03-12 14:27:20 +00:00
Stenzek b849d9862d Qt: Move CRC Fix Level to HW Fixes 2023-03-12 14:27:20 +00:00
Stenzek cd575e0ed8 Qt: Move GPU Palette Conversion to HW Fixes 2023-03-12 14:27:20 +00:00
Stenzek b5fbd88c34 GS/HW: Move old-target invalidation to after draw
Fixes crash in Radiata Stories.
2023-03-12 14:25:45 +00:00
refractionpcsx2 6003673165 GS-HW: Correct page aligned end blocks 2023-03-12 12:52:53 +00:00
refractionpcsx2 4555667554 GS: Rename bad_shader files to pcsx2_bad_shader for linux clarity 2023-03-12 00:07:52 +00:00
TellowKrinkle c0db6d49f4 GS:MTL: Fix wrong function constant type 2023-03-11 23:34:56 +00:00
Buzzardsoul 6630066f0b GameDB: Add missing Tony Hawk's Underground 2 fixes. 2023-03-11 21:43:54 +00:00
Buzzardsoul 20e6a55dd1 GameDB: Add blending level 3 to Tony Hawk's Underground 2 2023-03-11 21:22:35 +00:00
Mrlinkwii d3f82c800f GameDB: add fixes to Crouching Tiger, Hidden Dragon 2023-03-11 21:06:08 +00:00
JordanTheToaster e0e525d9ae ImGuiOverlays: Add missing fix to status bar
Adds Estimate Texture Region and GPU CLUT to the status bar as well as amends the names of CPU CLUT and GPU CLUT.
2023-03-11 20:41:19 +00:00
Buzzardsoul 12f4d6f872 GameDB: Add Mipmap and Trilinear to Tony Hawk's Underground 2 (#8372) 2023-03-11 20:40:39 +00:00
lightningterror 0668e9bad9 GS: Bump shader cache version. 2023-03-11 20:44:11 +01:00
lightningterror 06aed8491c GS-hw: Separate the Alpha masked Ad case from blend hw bit.
Allows for cleaner code.
2023-03-11 20:44:11 +01:00
lightningterror df2d11e70d GS-hw: Blend table formatting. 2023-03-11 20:44:11 +01:00
lightningterror 2dde8a5e90 GS-hw: No need to set both BLEND_NO_REC and BLEND_A_MAX in table.
Setting only BLEND_NO_REC is enough as blending is free.
2023-03-11 20:44:11 +01:00
lightningterror 674b13fb3f GS-hw: Cleanup BLEND_C_CLR blend flags.
Rename BLEND_C_CLR to BLEND_HW_CLR.
Merge CLR2_AF and CLR2_AS to CLR2, don't need to be separate as we rely on PS_BLEND_C in shader.
2023-03-11 20:44:11 +01:00
lightningterror ab17c3693f Gs-hw: Clean up blend flags.
Re arrange them from hw to sw.
2023-03-11 20:44:11 +01:00
lightningterror a6c372de46 GS-hw: Rename clr_hw to blend_hw PSSampler bit. 2023-03-11 20:44:11 +01:00
lightningterror 62497b9300 GS-hw: Rename PS_CLR_HW to PS_BLEND_HW shader macro. 2023-03-11 20:44:11 +01:00
Yiays 1461a3f8d7 Readme: Update cpubenchmark links (#8331) 2023-03-11 16:40:37 +00:00
JordanTheToaster 686b31765d GameDB: Various fixes
Adds estimate texture region to Combat Elite WWII Paratroopers and round sprite half to Champions Return To Arms to fix lines in HUD and menus.
2023-03-11 16:34:06 +00:00
lightningterror 05e4e98e64 GS: Bump shader cache version. 2023-03-09 21:08:52 +01:00
lightningterror e95b60d527 GS-hw: Cleanup hw blend clr cases.
Cleanup redundant Blend C sets, they are already set properly beforehand.
Cleanup multiple barrier sets for Ad cases, set one at the end instead.
Cleanup conditions, reduce and cleanup the code.
2023-03-09 21:08:52 +01:00
lightningterror 59aba9f757 GS-hw: Support Ad masked alpha on blend mix 1 and 2 clr cases. 2023-03-09 21:08:52 +01:00
Buzzardsoul 248e94dc4c GameDB: Add autoflush to Dirge of Cerberus: Final Fantasy VII (#8351) 2023-03-09 16:09:53 +00:00
kamfretoz a7d574cff0 Qt: Fix description for Trigger & Button Deadzone 2023-03-09 16:04:35 +00:00
Stenzek ad05193916 GameDatabase: Fix recommended blending message
It was reading from the GS thread copy instead of the CPU thread config.
2023-03-09 12:44:21 +01:00
Stenzek b24b353b2d Qt: Change Profile label to Editing Profile
Hopefully less confusing this way.
2023-03-09 08:40:35 +01:00
Stenzek 18e4a04dba PAD: Add pressure option to macros 2023-03-09 08:40:35 +01:00
Stenzek 30989761e2 Qt: Fix sensitivity/deadzone showing for shift-click macro trigger 2023-03-09 08:40:35 +01:00
Stenzek b219ee9049 GS/Metal: Align texture upload pitch to 32 bytes 2023-03-09 08:40:09 +01:00
TellowKrinkle 98c611e404 GS:MTL: Don't start render passes with no targets 2023-03-09 08:37:57 +01:00
TellowKrinkle 7a4ef32210 Qt: Restore main menu settings button
Required for expected behavior on macOS
2023-03-09 08:36:48 +01:00
lightningterror c3359cea1f Qt: Disable framebuffer fetch option on d3d. 2023-03-08 20:23:01 +01:00
JordanTheToaster f73a2d571f GameDB: Add missing Ponkotsu Roman Fixes
Adds missing JP fixes for Ponkotsu Roman Daikatsugeki Bumpy Trot.
2023-03-07 18:59:59 +00:00
JordanTheToaster 6dfb02c826 GSDumpReplayer: Fix widescreen patch crashing
Fixes a regression which caused PCSX2 to crash if you loaded a dump with widescreen patches enabled.
2023-03-07 14:19:55 +01:00
lightningterror 6c093fc81e GS: Bump shader cache version. 2023-03-06 23:36:54 +01:00
lightningterror 911d35e800 GS-hw: Fix invert rounding for accumulation blend on gl.
Also make the checks consistent for all renderers.
2023-03-06 23:36:54 +01:00
lightningterror 084fdc0a65 GS: Bump shader cache version. 2023-03-06 19:49:27 +01:00
lightningterror 1382fe9c6c GS-metal: Automatically adjust color compensation based on rgb value for hw blend clr3 case.
Auto adjust when any color is higher than 128 ( 1.0f) to get more accurate color results.
2023-03-06 19:49:27 +01:00
lightningterror b33242830e GS-vk: Automatically adjust color compensation based on rgb value for hw blend clr3 case.
Auto adjust when any color is higher than 128 ( 1.0f) to get more accurate color results.
2023-03-06 19:49:27 +01:00
lightningterror 8c0ee33c4c GS-ogl: Automatically adjust color compensation based on rgb value for hw blend clr3 case.
Auto adjust when any color is higher than 128 ( 1.0f) to get more accurate color results.
2023-03-06 19:49:27 +01:00
lightningterror e8cf4822b1 GS-d3d: Automatically adjust color compensation based on rgb value for hw blend clr3 case.
Auto adjust when any color is higher than 128 ( 1.0f) to get more accurate color results.
2023-03-06 19:49:27 +01:00
PCSX2 Bot 3462f02ce2 PAD: Update to latest controller database. 2023-03-06 17:07:54 +01:00
Stenzek 1a67b2146a GS/HW: Fix incorrect condition in DX11/OGL 2023-03-06 09:11:51 +00:00
Stenzek eb0d18f484 GSDumpReplayer: Fix resetting
And get rid of memory reset, it's never used.
2023-03-06 09:11:08 +00:00
Stenzek c783fc0f59 GSDumpReplayer: Update serial on dump load
Fixes title and HW fixes not applying when dragging a new GS dump onto a
running PCSX2.
2023-03-05 15:41:42 +00:00
refractionpcsx2 31d02c1278 GS-TC: Allow TBW expansion 2023-03-05 11:17:33 +00:00
JordanTheToaster 85f96bb248 GameDB: Various recommendations and fixes
Adds a variety of fixes and recommendation's for users to ignore.
2023-03-05 10:06:51 +00:00
Stenzek 229cf908b7 GS/HW: Use multi stretch for preloading 2023-03-05 10:03:15 +00:00
Stenzek 89b18275c0 GS/DX11: Get rid of runtime blend state creation 2023-03-05 10:03:15 +00:00
Stenzek b8a86baec7 GS/HW: Implement multi stretch for DX11/DX12/OpenGL 2023-03-05 10:03:15 +00:00
Stenzek 8505e9203a Qt: Support changing running GS dump by drag/dropping 2023-03-03 16:43:16 +00:00
Stenzek 5d95a503bf Qt: Fix crash when spamming shutdown button 2023-03-03 16:43:16 +00:00
Stenzek 36c7f96a1e GS/HW: Get rid of GetOutputSize()
And use PCRTCDisplays instead.
2023-03-03 16:42:54 +00:00
Mrlinkwii b40b606608 GameDB: update Oneechanbara2Special 2023-03-03 16:42:24 +00:00
Mrlinkwii 03764a624f GS/CRC: purge Oneechanbara2Special CRC 2023-03-03 16:42:24 +00:00
RedDevilus 962cfa9441 GameDB: Steambot Chronicles + typo fix
- Steambot Chronicles has quite an extensive hack for a game doing weird stuff with their Z-buffer, it does mess with the sea being green which is incorrect but the game also looks off for rest of the cutscene.

- misalgined typo to misaligned
2023-03-03 16:42:09 +00:00
lightningterror b2f30ab080 GS: Bump shader cache version. 2023-03-03 16:35:10 +01:00
lightningterror 24c42ae2d9 GS-hw: Replace alpha factor/alpha source1 with source 1 color.
Output 1 will be used since we want to modify each color channel based on overflow value.
2023-03-03 16:35:10 +01:00
lightningterror af9353298c GS-metal: Add clr3 case for blend mix 2.
When Cs*(Alpha + 1) overflows compensate with adjusting Alpha output for Cd*Alpha.
2023-03-03 16:35:10 +01:00
lightningterror a3ecf0b0bd GS-vk: Add clr3 case for blend mix 2.
When Cs*(Alpha + 1) overflows compensate with adjusting Alpha output for Cd*Alpha.
2023-03-03 16:35:10 +01:00
lightningterror 58cb6ab728 GS-ogl: Add clr3 case for blend mix 2.
When Cs*(Alpha + 1) overflows compensate with adjusting Alpha output for Cd*Alpha.
2023-03-03 16:35:10 +01:00
lightningterror f478b3959c GS-d3d: Add clr3 case for blend mix 2.
When Cs*(Alpha + 1) overflows compensate with adjusting Alpha output for Cd*Alpha.
2023-03-03 16:35:10 +01:00
Stenzek 35ce680859 GameDB: Add PCRTCOffsets to Xiaolin Showdown
Stops screen shaking.
2023-03-03 15:33:47 +00:00
Stenzek 7df189ced4 GameDB: Add PCRTC and blending HW fixes 2023-03-03 15:33:47 +00:00
Stenzek c35092504c GS/HW: Avoid copying an empty rectangle
Fixes a possible validation error in Ultraman Fighting Evolution -
Rebirth.
2023-03-03 14:59:07 +00:00
Stenzek 0bff6f7ad9 GS/HW: Require FBW=1 for Jak OI fix
The legit palette draws all seem to use FBW 1.

There's a couple of draws which use the alpha channel of the FB which
are currently falsely triggering.
2023-03-03 14:04:43 +00:00
JordanTheToaster 805f985144 GameDB: Gun fixes
Fixes for rainbowing at the edges of the screen missing bloom intensity and alignment and reflections on water and ground textures.
2023-03-02 21:16:57 +00:00
Stenzek 12e578b93c GS/Vulkan: Don't skip barrier with colclip+readwrite date
Value written from HDR setup must be visible for any DATE reads. Fixes
flickering in DBZ BT2.
2023-03-02 17:01:50 +00:00
JordanTheToaster 1312952305 GameDB: Various fixes
Adds Tex In RT 2 to Armoured Core 2 to fix texture corruption in future and adds merge sprite to Destroy All Humans 1&2 to further fix misaligned bloom.
2023-03-02 15:50:02 +00:00
Stenzek 6118b94f9e GS/Vulkan: Fix a bunch of validation warnings
None of these were errors, but it's still good to have clean output.
2023-03-02 15:49:13 +00:00
Stenzek 520320535e Qt: Clear all keyboard bind states when focus is lost 2023-03-02 15:49:04 +00:00
Mrlinkwii 262b5f1dc0 GameDB: add fixes to Knight Rider - The Game 2023-03-02 11:07:28 +00:00
Mrlinkwii ac36162ddc GameDB: upscaling fixes for Springdale 2023-03-02 09:50:38 +00:00
Stenzek 9b813f4ae3 Qt: Fix skipdraw not being hidden globally again
And slience a warning in TC.
2023-03-02 09:34:41 +00:00
JordanTheToaster 35d05b8653 GameDB: DAH 1&2 Fixes
Fixes for misaligned bloom and sun occlusion and intensity in Destroy All Humans 1 and 2.
2023-03-02 09:18:18 +00:00
Mrlinkwii e4d6b87e5d GameDB: add textureInsideRT to NBA '07 featuring The Life Vol.2 2023-03-02 01:34:39 +00:00
Stenzek 64b38e5a4a GS/HW: Add "Merge Targets" texture-in-RT mode
Can take several targets from the cache, and create a combined/merged
source from them.

Fixes shadow maps in Destroy All Humans.
2023-03-01 21:13:37 +00:00
Stenzek 75957c84e3 GS: Add "multi stretch rect" drawing to device 2023-03-01 21:13:37 +00:00
Silent c33fb2adbd Qt: Add a context menu to the toolbar's Settings button when the game is running
A new small context menu that allows to select between global settings
and game settings.
2023-03-01 20:38:42 +00:00
Silent 97d3baba35 Qt: Move "Game Properties" from View to Settings 2023-03-01 20:38:42 +00:00
Stenzek e91f9925f8 Qt: Display a slightly more helpful error on display create failure 2023-03-01 20:37:18 +00:00
Stenzek b484f7aef0 Context/Vulkan: Handle VK_INCOMPLETE return from vkEnumeratePhysicalDevices() 2023-03-01 20:37:18 +00:00
Stenzek 9a3904103a GS/HW: Fix off by one in estimate texture region
And enable it for Justice League.
2023-03-01 20:36:36 +00:00
refractionpcsx2 2a2d39b392 GS-TC: On invalidate of the alpha of 32bit, drop back to 24bit 2023-03-01 20:35:38 +00:00
Stenzek 3005ba629f GS/Vulkan: Fix RT being left bound as texture 2023-03-01 21:02:57 +01:00
Mrlinkwii 795741a341 GameDB: various fixes 2023-02-28 21:39:50 +00:00
JordanTheToaster da98465d4b GameDB: Remove unneeded Midnight Club 3 fixes
Removes the texture preloading restriction as the game no longer violently blows up during gameplay with the hash cache enabled.
2023-02-28 20:52:03 +00:00
Stenzek d28e46796f GameDB: Enable estimate texture region on Snowblind games 2023-02-28 17:39:15 +00:00
Stenzek 43c6e321f5 GS/HW: Add a new option to attempt to reduce large texture sizes
For Snowblind games which use 1024x1024 textures and UVs.
2023-02-28 17:39:15 +00:00
Stenzek 4595c2feec GS/HW: Allow moves to create larger targets, align to 64 width 2023-02-28 17:39:15 +00:00
Stenzek 8b4402c517 Qt: Skipdraw shouldn't be visible in global settings 2023-02-28 11:49:26 +00:00
Stenzek e08ae7e8fa GS/HW: Handle end-of-memory wrapping for surface Overlaps() 2023-02-28 09:12:14 +00:00
Stenzek 753efd8c4a GS/HW: Track target sources in all pages
... instead of just the first page it falls within.
2023-02-28 09:12:14 +00:00
forrvalhalla cb786f0320 GameDB: Various Armored Core Improvements 2023-02-28 08:51:39 +00:00
PCSX2 Bot 6ff64cc984 PAD: Update to latest controller database. 2023-02-27 18:29:35 +01:00
Mrlinkwii 475b816280 Gamedb: remove HPO normal from Dragon Ball Z Budokai - Tenkaichi 2 2023-02-27 13:51:37 +01:00
Stenzek 229005942f GS/DX12: Add missing clip_control support flag
Fixes depth inaccuracy in WWE SmackDown! Here Comes the Pain.
2023-02-27 13:19:51 +01:00
Stenzek 4af25d20fe GS: Fix output equal check in Merge() 2023-02-27 10:21:39 +00:00
Stenzek 6bf5b9a8e3 GS/HW: Fix incorrect size of region mipmap levels 2023-02-27 07:55:58 +00:00
Stenzek be769c28fa Qt: Cancel game list refresh before GetSaveStateFileName()
Fixes lockup/crash when starting a file early.
2023-02-26 22:27:49 +00:00
JordanTheToaster 3128c48d5b GameDB: Dance Summit 2001 Fixes
Adds paltex to Dance Summit 2001 to massive increase FPS and reduce hash cache usage dramatically.
2023-02-26 22:27:39 +00:00
RedDevilus 5c7161fd2f GameDB: NASCAR '06 Total Team Control
Forces Adaptive TFF to stop bouncing/shaking vertical screen
2023-02-26 15:38:48 +00:00
Stenzek e85790b84b GS/HW: Don't try to draw with invalid TEX0 configuration
Fixes the texture cache falling apart in 007: Everything or Nothing.
2023-02-26 15:37:58 +00:00
Stenzek 980e2f67fd Qt: Don't display updater if running a game or fullscreen 2023-02-26 15:33:02 +00:00
TellowKrinkle 7781907f0e GS: Blend truncation and dither goes the other way when subtracting
Truncation happens after subtraction, so it's the equivalent of rounding the value to subtract *up* instead of down
2023-02-26 07:22:32 +01:00
TellowKrinkle 1d145dd48a GS:MTL: Clip control is supported
(Well technically, it's not but the default value is the one we want)
2023-02-26 07:22:32 +01:00
TellowKrinkle 1a1eb30e60 GS:MTL: Properly initialize has variable 2023-02-26 07:22:32 +01:00
TellowKrinkle a7e2b98dc7 Vulkan: Format tfx.glsl 2023-02-26 07:22:32 +01:00
Stenzek 2bf74622a5 GS/DX12: Fix potential crash in PrimID DATE setup 2023-02-26 03:49:40 +00:00
refractionpcsx2 6bcaef9325 GS-HW: Allow swapping of start/end block on overlap check within page 2023-02-26 01:29:49 +00:00
refractionpcsx2 0b3aac3d91 GS-HW: Add channel masks to dirty rects, allows partial updates 2023-02-26 01:29:49 +00:00
refractionpcsx2 9a53f0f853 GS-HW: Improve Local->Host and preload accuracy. 2023-02-26 01:29:49 +00:00
refractionpcsx2 a97df14064 GS-HW: Set scale on temporary depth stencil 2023-02-26 01:29:34 +00:00
RedDevilus 9a0cd1157f GameDB: Timesplitters Series + minor maintenance
- Timesplitters 2 (normal vertex screwing up bottom)
- Timesplitters Future Perfect (remove depth lines)
- Dragon Ball Z - Infinite World (dash
2023-02-26 01:13:24 +00:00
Mrlinkwii 16c41255d0 Gamedb: remove disable partial invalidation from fatal frame 2023-02-26 00:24:24 +00:00
Stenzek c2d1e5bd18 GameDB: Switch CPU CLUT for GPU CLUT in The Godfather
It can do 10+ readbacks in one frame, which is way too much.
2023-02-25 12:31:28 +00:00
Stenzek 3c85ba3eb8 GS/HW: Use 1023 for skip-target-creation threshold
Fixes target blowout in The Godfather (it does a 1023x1023 draw on
boot).
2023-02-25 12:31:28 +00:00
JordanTheToaster f3b67b158c GameDB: Gorwlanser 5&6 and Poinies Poin Fixes
Adds Texture in RT to Growlanser 5 and 6 to fix a layering issue and to Poinies Poin to fix text corruption after an FMV.
2023-02-25 12:28:05 +00:00
kamfretoz 8dac10ae36 Qt: Add a new theme, Cobalt Sky. 2023-02-25 11:00:56 +00:00
JordanTheToaster 6b81050283 GameDB: 007 EON Fixes
Adds mipmapping full and trilinear PS2 to 007 Everything Or Nothing to fix up texture detail and removes mipmapping from Fifa games to prevent players from going bald or having rainbow vomit shirts.
2023-02-25 10:55:53 +00:00
Stenzek b4beacfc43 GS/OGL: Avoid framebuffer swaps when depth is being alternated 2023-02-25 08:18:34 +00:00
Stenzek 1b607a8c4d GameDB: Add partial target invalidation to affected games 2023-02-25 08:18:34 +00:00
Stenzek 4583c64ff7 GS/HW: Add partial target invalidation option
Eventually hopefully we can make this the default, but it breaks too
much at the moment.

Fixes missing/corrupted textures in True Crime: New York City.
2023-02-25 08:18:34 +00:00
Stenzek a06a07d961 GS/HW: Allow sw prim render when texture rect is dirty
Gets rid of an unnecessary readback in True Crime: New York City.
2023-02-25 08:18:34 +00:00
Stenzek 520a369872 GS/HW: Prevent out of bounds copy in OI_BlitFMV() 2023-02-25 08:18:34 +00:00
Stenzek 1eaec773e2 GS/HW: Don't allocate Z buffer if tests always pass
.. and Z is masked.

Stops some offscreen targets from expanding in size.

Partial fix for regressions in True Crime: New York City.
2023-02-25 08:18:34 +00:00
Stenzek 3433a42e42 GS/DX12: Fix incorrect pipeline RT format 2023-02-25 03:04:50 +00:00
lightningterror e01eac615d GS-tc: Fix Wreorder-ctor warning. 2023-02-24 11:29:53 +01:00
lightningterror 8116646dee GS: Bump shader cache version. 2023-02-24 02:06:00 +01:00
lightningterror 7f7950cd6b GS-d3d: Check each channel individually if it overflows and do corrections. 2023-02-24 02:06:00 +01:00
lightningterror 2eb11ded52 GS-metal: Check each channel individually if it overflows and do corrections. 2023-02-24 02:06:00 +01:00
lightningterror bd64ad510b GS-vk: Check each channel individually if it overflows and do corrections. 2023-02-24 02:06:00 +01:00
lightningterror 4e9b7e61a7 GS-ogl: Check each channel individually if it overflows and do corrections. 2023-02-24 02:06:00 +01:00
lightningterror 37b19495a8 GS-hw: Use rgb color for second output instead of alpha.
We want different alpha value for each channel.
2023-02-24 02:06:00 +01:00
refractionpcsx2 c12b412e87 GS-HW: Remove debug message, partial Clang format GSRendererHW.cpp 2023-02-23 23:21:53 +00:00
refractionpcsx2 17f137f8be GS-HW: Slightly better check for target expanding 2023-02-23 20:13:01 +00:00
JordanTheToaster fcc627c65c GameDB: Various fixes
Fixes for missing bloom intensity in Ferrari Challenge mipmapping in Dark Cloud and adjusts HPO on The Dog Island and adding missing Scandinavia entrys.
2023-02-23 19:37:29 +00:00
refractionpcsx2 5bb3d8e60d GS-HW: Improve GS read target detection, avoid reading dirty targets. 2023-02-23 18:27:01 +00:00
refractionpcsx2 264086e0aa GS-HW: Improve clear detection and avoid making bad render targets 2023-02-23 18:27:01 +00:00
refractionpcsx2 6013d7172a GS-HW: Drop to CPU CLUT w/e invalidate only if dirty covers whole tex 2023-02-23 18:27:01 +00:00
refractionpcsx2 a7714b2725 MCD: Stop Memcard Folders spamming the console/OSD when saving a game 2023-02-23 18:02:07 +00:00
Stenzek f9dcac8cd0 GS/HW: Make readback-on-close a HW fix
Unfortunately it's too risky to enable by default all the time. So,
we'll make it a hw fix, and hopefully one day can make it default on.

Also makes save states readback the TC as well.
2023-02-23 17:25:03 +00:00
Stenzek 2487322e47 GS/HW: Track which bits are actually written to targets
Fixes Burnout 3 sky getting corrupted when flushing.
2023-02-23 17:25:03 +00:00
Stenzek c7e9c9542e GS/HW: Don't try to dirty targets which don't overlap
The current invalidation code sucks, but at least this stops things
which are blatently wrong from happening.
2023-02-23 10:12:05 +00:00
Stenzek c1bc1af302 GS/HW: Don't mess with the buffer width of the target on invalidate 2023-02-23 10:12:05 +00:00
Stenzek 739f9ec758 GS/HW: Set valid rect on targets created by Move 2023-02-23 10:12:05 +00:00
refractionpcsx2 f70a140f42 GS-HW: Fix Download readbacks and limit FB resizing 2023-02-22 11:50:11 +00:00
refractionpcsx2 a716e69dc0 GameDB: Remove no longer needed SW FMV switch fixes 2023-02-21 16:15:29 +00:00
refractionpcsx2 0c6e1a4d56 GS-HW: Invalidate overlapped target when expanding. 2023-02-21 16:15:29 +00:00
Stenzek faf36ecba6 GS/D3D: Default to D3D11 for Intel 2023-02-21 15:49:59 +00:00
Stenzek 49f2900e1f GS/D3D: Combine driver version lookup for D3D11+D3D12 2023-02-21 15:49:59 +00:00
AKuHAK 8bd522d283 BiosTools: Implement SysGetBiosDiscID function, for Bios Serial used EXTINFO build unique timestamp 2023-02-21 15:24:36 +00:00
AKuHAK e9034a1ba1 Biostools: remove unused external variable BiosZone 2023-02-21 15:24:36 +00:00
Stenzek 03feacd69a GS/HW: Use FB size instead of output size for target lookup
Fixes render target height doubling unnecessarily in Ridge Racer V.
2023-02-21 15:22:09 +00:00
Stenzek 0c9f44d8a4 GS/HW: Don't allow region textures to make sources larger
Currently not handled. Fixes Ridge Racer V intro again.
2023-02-21 15:22:09 +00:00
RedDevilus 39fb64cdcd GameDB: Dark Cloud 2 + Dark Chronicle
I had a dark joke on the fix, but let's not jester about it. The clown now has more colors than just 1.
2023-02-21 14:10:14 +00:00
JordanTheToaster d531a7f1af GameDB: Remove CPU CLUT from Transformers The Game
Something changed and now this just causes rainbow vomit in game and in menus instead of fixing the issue it was originally put in for.
2023-02-21 09:36:49 +00:00
PCSX2 Bot bb7ff414ae PAD: Update to latest controller database. 2023-02-21 02:14:48 +01:00
JordanTheToaster 215f112521 GameDB: Port patch to PAL Transformers ROTF
Ports a patch over to the PAL version to fix the pause menu hud and other parts.
2023-02-19 15:50:05 +00:00
Florin9doi 644766d965 USB: Fix Sega Seamic buttons 2023-02-19 13:15:53 +01:00
JordanTheToaster 1e1a555d3b GameDB: Various fixes
Fixes for Transformers Revenge of the Fallen misaligned bloom and soft shadows and Legend of Kay broken shadow rectangles and misaligned bloom.
2023-02-19 03:53:20 +00:00
refractionpcsx2 c64ae2684d GS-PCRTC: Handle extended height when there's a negative offset 2023-02-19 00:57:52 +00:00
refractionpcsx2 50ed04436d GS-HW: Preserve width of frame textures 2023-02-19 00:57:38 +00:00
Stenzek 2fb9beca52 GS/HW: Use block instead of page pointer for height lookup
Some callers were using blocks, others were using pages before.

Enables target expansion in Stuntman, which slightly improves rendering
without CPU sprite. The full "fix" needs page handling in P8 conversion.
2023-02-19 00:57:24 +00:00
refractionpcsx2 cd4c1e920e GS: Flush targets back to GS memory when swapping renderers 2023-02-19 00:57:01 +00:00
refractionpcsx2 e846ac367a GS-HW: Fix downloads in offset BP and different widths 2023-02-19 00:03:49 +00:00
Mrlinkwii ef31c733ee Gamedb: update Armored Core - Nexus 2023-02-18 15:53:30 +00:00
Stenzek 724aa657f3 Qt: Fix window geometry not saving on exit 2023-02-18 14:50:09 +00:00
kenshen112 0284c35f4c GameDB: Add Fatal Frame 1 / Project Zero final boss game bug fix patch 2023-02-18 05:04:20 +00:00
TheTechnician27 6ce33de287 UI: Update and Add mouseover dialog (#8119) 2023-02-18 01:58:32 +00:00
refractionpcsx2 6ccfa011d4 Pad/Counters: Rearrange Pad/Core updates on VSync
Apparently this gets around some weird input lag issue.
2023-02-18 01:13:39 +00:00
refractionpcsx2 c9078af45e GS: Bump shader cache version 2023-02-17 19:40:16 +00:00
refractionpcsx2 6745428d0c GS-SW: Fix SW texture dumping 2023-02-17 19:06:35 +00:00
refractionpcsx2 925e874ada GS-HW: Fix real 16bit value shuffles 2023-02-17 19:06:35 +00:00
lightningterror 03f0f2f803 GameDB: Add missing db entry for Silent Scope 3.
Korean version.
2023-02-17 16:35:46 +01:00
lightningterror 857360d6b2 GameDB: Add full mipmap with ps2 trilinear to Matrix, The - Path of Neo.
Improves ground textures to match sw renderer.
2023-02-17 16:35:46 +01:00
Stenzek 2dd76c3f12 GS/HW: Force region match on fixed TEX0
Fixes lightmapping in Spinter Cell - Double Agent.
2023-02-17 13:20:04 +00:00
Stenzek 666de3a874 GS/HW: Allow hardware sampling when clamp_max is larger
Fixes some mipmapping issues in GT4.
2023-02-17 13:20:04 +00:00
Stenzek e0e9b64db6 GS/HW: Fix region textures being used when redundant 2023-02-17 13:20:04 +00:00
JordanTheToaster 2f521348c6 GameDB: Add VU Sync hack to Salt Lake 2002
Fixes the awful flickering and missing textures that happens all over the game.
2023-02-17 13:12:33 +00:00
Stenzek 8ac2949a1f GS/HW: Fix incorrect bitfield width in height cache
This lead to duplication and possibly larger-than-intended heights.
2023-02-16 16:44:40 +00:00
Stenzek d0d5d991ce GS/HW: Fix repeat sampler being used for region clamp/repeat
The coordinates are clamped in the shader, but normalized UV of 1 and
bilinear may repeat.
2023-02-16 16:44:40 +00:00
Mrlinkwii 1fc2d7de3c GameDB : remove skipdraw from Need for Speed - Undercover 2023-02-16 15:00:27 +00:00
refractionpcsx2 2598e8d9b9 GS-PCRTC: Fix Anti-blur in screen offset.
No this doesn't mean it won't look blurry, that's a downside of screen offsets in some games, but it might look *less* blurry.
2023-02-16 14:47:09 +00:00
refractionpcsx2 01f65e98e6 GS-PCRTC: Fix up some PCRTC anti-blur behaviour + code cleanup 2023-02-16 14:47:09 +00:00
Ganael Laplanche c5330cf166 Common: FreeBSD fixes. (#8163)
* Fix SIGSEGV handler on FreeBSD

* Fix config dir location on FreeBSD
2023-02-16 09:30:18 +01:00
JordanTheToaster b78796d0c1 GameDB: Add HPO Special to Arthur and the minimoys
Fixes misaligned bloom that looks gross.
2023-02-16 00:32:17 +00:00
RedDevilus da1e9db2c0 GameDB: Ruff Trigger
Rename Europe serial and fix offset and blooming.
2023-02-15 19:18:11 +00:00
RedDevilus 6beb6aa05b GameDB: Bakugan Battle Brawlers
Se Deinterlace to Adaptive TFF. I thought this was fixed but needs to be checked later.
2023-02-15 19:15:49 +00:00
Mrlinkwii 6ea7777a3a GS-HW: remove Fighting Beauty Wulong & Spartan Total Warrior CRC (#8158) 2023-02-15 14:56:53 +00:00
Stenzek f97191e241 GS/HW: Split up consecutive channel shuffles 2023-02-15 11:04:05 +00:00
Stenzek 51420dade4 VMManager: Clear host root on booting ISO 2023-02-15 10:04:39 +00:00
Tokman5 cc55c01197 GameDB: Add EETimingHack to Crazy Taxi 2023-02-15 10:04:04 +00:00
JordanTheToaster 86ce464ee3 GameDB: Fix V-Rally 3 graphical corruption
Fixes random graphical corruption that can happen by adding EE Timing hack.
2023-02-15 00:04:44 +00:00
refractionpcsx2 0fa52a75ad GS-HW: Optimise readback performance for some cases 2023-02-14 22:27:35 +00:00
Mrlinkwii c91e7dc3b0 GameDB: remove not needed hw fixes for Metal Slug 6 2023-02-14 22:27:17 +00:00
Mrlinkwii 88034b176c GS-HW:purge MetalSlug6 CRC 2023-02-14 22:27:17 +00:00
JordanTheToaster efeaff488c GameDB: Add HPO Special to 007 EON
Lines bad must fix lines.
2023-02-14 17:49:53 +00:00
Berylskid 5df30f5bdd OSD: Change the lower limit of OSD Scale from 100 to 50 (#8135) 2023-02-14 14:03:24 +00:00
C.W. Betts cf179c42b8 cmake: Quiet macOS building warning, we can build on macOS just fine. (#8136) 2023-02-14 11:32:39 +01:00
Berylskid a615f8bf17 Qt: Change "Save State On Shutdown" to Unchecked (#8147) 2023-02-14 10:30:34 +00:00
refractionpcsx2 b38964e814 GS: Partial revert of #8101 pending investigation.
Sometimes great ideas don't always go smoothly to plan, this is one of those, but it will be back when we work out what's up with Soul Calibur 2 and DBZ BT3 :)
2023-02-14 10:23:09 +00:00
JordanTheToaster 013c9eec58 GameDB: Various fixes
Some fixes I missed in the last PR because I am a doughnut and can't remember what I needed to do.
2023-02-14 00:20:52 +00:00
refractionpcsx2 ddbd6eddf7 GameDB: Add Autoflush for Astro Boy and CPU Sprite for Alias 2023-02-14 00:18:08 +00:00
refractionpcsx2 982fd42683 GS: Preload whenever it matches an upload. GUI option forces preloads. 2023-02-14 00:18:08 +00:00
RedDevilus 90e28e7957 GameDB: Fix Japanese KH2 - Final Mix
Change Normal Vertex halfpixel with roundsprite
2023-02-13 23:59:41 +00:00
JordanTheToaster f4201f3947 GameDB: Remove fix from Soulcalibur 3
No longer needed as the hash cache no longer does an explosion.
2023-02-13 23:27:27 +00:00
PCSX2 Bot 7844b40243 PAD: Update to latest controller database. 2023-02-13 17:37:59 +01:00
JordanTheToaster d0839a3d55 GameDB: Fixes for graphics in Mana Khemia 2
Fixes missing graphical effects in battles by disabling mvu speedhack.
2023-02-13 16:07:31 +00:00
JordanTheToaster 876fd9ba9e GameDB: Vexx underwater rendering fixes
Adds Tex in RT to fix underwater rendering being totally broken.
2023-02-13 09:37:31 +00:00
lightningterror e12717c108 CDVD: Fix FreeBSD compile. 2023-02-13 03:02:59 +01:00
refractionpcsx2 af0b17bb7a Counters: Present at VSync End 2023-02-12 21:13:42 +00:00
Stenzek 6f595b7d87 GS/HW: Allow previous frame in depth source lookup
Fixes pulling random junk from local memory in Black after adjusting
vsync timing.
2023-02-12 21:13:42 +00:00
JordanTheToaster 59cbdc79f5 GameDB: Fixes for V-Rally 3 and Berserk
Fixes sun occlusion in V-Rally 3 and fixes missing subtitles in FMVs in Berserk.
2023-02-12 19:28:13 +00:00
refractionpcsx2 50ff3649b1 GS: Fix divide by zero error 2023-02-12 19:14:54 +00:00
refractionpcsx2 9ca9db8770 GS: Fix undefined behaviour bug in PCRTC 2023-02-12 15:03:24 +00:00
Stenzek fa70f0e764 GS/HW: Don't age texture cache on idle frames 2023-02-12 08:34:39 +00:00
Stenzek 3eb629f133 InputManager: Restore passing wheel events to ImGui 2023-02-12 07:25:56 +00:00
Stenzek c9aba6bbe1 GS/TextureCache: Allow tex-in-rt for 16/24/32-bit targets
Fixes swirl battle transition in Valkyrie Profile 2.
Fixes top-left screen rendering in Lego Racers 2.
2023-02-12 07:07:52 +00:00
Stenzek 0a26adae76 GS/TextureCache: Dirty with target PSM/TBW, not the EE write 2023-02-12 07:07:52 +00:00
Stenzek f0798f6510 GS/HW: Combine dirty rectangles for target updates
Fewer texture uploads makes Intel GPUs happy.
2023-02-12 07:07:52 +00:00
refractionpcsx2 245b03e208 GS: Limit the height of framebuffer reads 2023-02-12 07:07:26 +00:00
refractionpcsx2 4e31e5fdc2 GS: Use linear interpolation for Screen Offsets 2023-02-12 04:34:07 +00:00
Stenzek 750a74206c InputManager: Warning fix/default interia value 2023-02-12 04:32:47 +00:00
Stenzek 7e64dc2576 GS/HW: Don't defer TC reset until next vsync 2023-02-12 04:32:47 +00:00
Stenzek 8a08e2fd97 GS: Make sure everything in GSState is initialized 2023-02-12 04:32:47 +00:00
Stenzek d0a933cda8 GS/TextureCache: Clear surface offset cache on reset
Also get rid of RemovePartial(), it's never called.
2023-02-12 04:32:47 +00:00
lightningterror d00845f56b GameDB: Add missing Need for Speed - Carbon entry. 2023-02-12 00:46:01 +00:00
lightningterror 3350e5ebb1 GameDB: Replace DMABusyHack with InstantDMAHack for MGS2 Sons of Liberty.
DMA timing problem.
Fixes broken half-bottom artifacts.
2023-02-12 00:46:01 +00:00
SideProjectsLab aeb4445cad Qt/Input: Improved how mouse movements are mapped to analog (#7910) 2023-02-11 23:58:58 +00:00
refractionpcsx2 73abae8cb9 GameDB: Remove forced deinterlacing modes which are no longer required 2023-02-11 20:08:36 +00:00
refractionpcsx2 7ecc7b76ba GS-PCRTC: Improve automatic de-interlacing to avoid it more often. 2023-02-11 20:08:36 +00:00
refractionpcsx2 71d0bbbc25 GS: Rework of PCRTC code. 2023-02-11 20:08:36 +00:00
JordanTheToaster 26e691ba93 GameDB: Update HPO on Spider Man 2
Changes HPO to HPO Special to fix rainbow garbage on the top and left side of the screen when moving.
2023-02-11 17:43:05 +00:00
Stenzek c7352d9e10 GS: Attempt to recreate device if GPU crashes 2023-02-11 15:33:55 +00:00
Stenzek 7b8f9a54ec GS/HW: Purge FFX-2 depth clear CRC hack 2023-02-11 15:26:04 +00:00
JordanTheToaster 28980af858 GameDB: Port COP2 patch for Disneys Cars
Ports patch to fix broken collisions to PAL Disney's Cars
2023-02-11 15:24:23 +00:00
Stenzek 80dce398e0 GS/HW: Carefully allow move to create new targets
Xenosaga I does a move from BP 1C00 to E00, then from E00 to 2A00 a few
frames later for its cutscene transitions. 2A00 then gets used as a
texture and blended on top of the later frames. Because there's no
target at 2A00, the move falls back to the CPU, and E00 contains junk
which gets moved and eventually preloaded instead.

Gradius V uses moves for a screen move/wobble-like effect, by moving
chunks of the framebuffer out, then using those as a texture. It's not
broken at the moment, but it does readback (slow), and break upscaling.
2023-02-11 07:16:19 +00:00
TheTechnician27 06db8eec48 Context.cpp: fix minor typo 2023-02-11 06:46:44 +00:00
Stenzek 9c720efe46 GS/OGL: Fix possible crash downloading odd texture sizes 2023-02-11 06:43:20 +00:00
refractionpcsx2 cbf91a8d19 GS-HW: Tighten CLUT detection slightly. 2023-02-11 02:07:01 +00:00
TheTechnician27 f99414708d Readme: Two minor changes to the README (#8105) 2023-02-11 00:00:25 +00:00
refractionpcsx2 9549a6b16a GS: Fix TME processing when Alpha->IsBlack & !TEX0->TCC 2023-02-10 23:48:43 +00:00
lightningterror 3206094545 GameDB: Add full mipmap and trilinear ps2 to Hard Hitter games.
Improves ground texture rendering.
2023-02-10 22:24:33 +01:00
Stenzek 5cfae80701 GL/OpenGL: Add a hidden [EmuCore/GS] DisableGLDownloadPBO option
.. to disable the use of PBOs when reading back.
2023-02-10 14:38:21 +00:00
JordanTheToaster b4d140c6bb GameDB: Fixes for 187 Ride or Die
Add autoflush to soften bloom and HPO Special Texture to fix misaligned bloom.
2023-02-10 14:15:51 +00:00
Stenzek c65eb3c3ee GS/HW: Fix crash with AVX2 due to unaligned pitch 2023-02-10 14:15:33 +00:00
Mrlinkwii eec0984dbe Gamedb: remove skipdraw from Need for Speed - Undercover 2023-02-10 14:47:52 +01:00
Stenzek 9b1163f959 GS/HW: Use sampler for clamp/repeat when it's redundant
But only for local memory sources (not targets), it causes issues with
upscaling otherwise.
2023-02-10 11:20:37 +00:00
Stenzek 5b5edc506d Misc: Warning fixes 2023-02-10 11:20:37 +00:00
refractionpcsx2 b30b4375e7 GS: Detect 16bit source copy in to 32bit target shuffle 2023-02-10 11:19:41 +00:00
Stenzek 1b0c03d892 GS/HW: Fix fixed/invalid TEX0 case in TimeSplitters 2 2023-02-10 03:43:10 +00:00
Ziemas bca49184e7 Debugger: Fix missing return path. (#8094) 2023-02-09 19:48:54 +00:00
Stenzek 26d6c33163 GSRunner: Clear bindings and disable game settings 2023-02-09 17:29:47 +01:00
Ziemas 9420615317 Implement thread listing for IOP
Abstracts away threads behind a common interface for both EE and IOP
2023-02-09 15:49:56 +00:00
Stenzek 7198c6b8c6 GS: Use u32 instead of size_t for index storage
These are never going to be greater than 2^32-1, and they're truncated
in a bunch of places anyway.
2023-02-09 14:54:42 +00:00
Stenzek 9513864851 GS: Make prim a template parameter for auto flush
It's force inlined into VertexKick(), which also has prim as a template
parameter.
2023-02-09 14:54:42 +00:00
Stenzek f9b8aa1862 GS: Handle index swap case for auto flush
DirectX and OpenGL no longer have different draw splitting.
2023-02-09 14:54:42 +00:00
refractionpcsx2 34371c070c Mcd-Folder: Prevent crash trying to delete non-existent node. 2023-02-09 14:06:21 +00:00
Stenzek d6099dd263 GS/Vulkan: Use Bresenham line rasterization when supported 2023-02-09 13:42:05 +00:00
Stenzek a1bc39141e PAD: Fix trigger deadzone/scale setting 2023-02-09 12:30:20 +00:00
Connor McLaughlin 13ed41d077 GS/DX11: Disable multisampling in rasterizer state 2023-02-09 11:13:42 +00:00
Stenzek 8a0a8f718f GameDB: Remove preloading disable for a bunch of games
These are fine now.
2023-02-09 10:51:06 +00:00
Stenzek 7d08a54ad9 GS/HW: Optimize TC source size based on CLAMP 2023-02-09 10:51:06 +00:00
Stenzek b9b47e3ec7 GS/OGL: Fix upload row length for texture Update() 2023-02-09 10:51:06 +00:00
refractionpcsx2 16989f2122 GS-HW: On overwrite of large incompatible format texture, erase old. 2023-02-09 10:50:40 +00:00
Berylskid 892d3a370d GameDB: Fix texture flickers of Armored Core Nexus 2023-02-09 09:37:17 +00:00
Stenzek 6af7ca9867 PAD: Fix invert in deadzone computation 2023-02-09 10:03:55 +01:00
Stenzek c3c354f794 PAD: Add trigger deadzone/sensitivity settings 2023-02-09 10:03:55 +01:00
Stenzek 43572a1560 Qt: Mark widget binder functions as inline
Should also fix the unused warning without using [[maybe_unused]];
2023-02-09 10:03:55 +01:00
Stenzek 79daed63ee Qt: Handle multiplier in controller settings 2023-02-09 10:03:55 +01:00
Stenzek 21d3ad86d4 Qt: Make controller settings page scrollable 2023-02-09 10:03:55 +01:00
Stenzek 31ebe842e8 Qt: Add per-bind sensitivity/deadzone controls (shift-click) 2023-02-09 10:03:55 +01:00
eyfix 88487de72f USB: Add values to GunCon2 config. (#8078) 2023-02-09 09:55:23 +01:00
Haruka 616da8c99d CDVD: simplify code 2023-02-09 09:52:00 +01:00
Haruka ec8712cceb CDVD: use DevCon logging instead of stdout / stderr 2023-02-09 09:52:00 +01:00
Haruka 3d6923b2a1 CDVD: implement SetSpindleSpeed on macOS 2023-02-09 09:52:00 +01:00
Haruka f04337becf CDVD: fix macOS CD reading 2023-02-09 09:52:00 +01:00
Haruka 9a5dd4c19d CDVD: macOS physical disc support 2023-02-09 09:52:00 +01:00
lightningterror 643e0b1039 GameDB: Add Autoflush hw fix to MGS3 Subsistence.
Fixes lens flare.
2023-02-09 07:06:21 +01:00
Stenzek 330061a6e7 GS/OGL: Fix offseted downloads not being offset
Fixes background screen effect in Gradius V.
2023-02-09 07:04:50 +01:00
Stenzek 0a292715cf GS/OGL: Align texture uploads to 64 bytes
Fixes potential crash in some games with odd-sized targets
and preloading (e.g. Densha De Go).
2023-02-09 07:04:50 +01:00
Berylskid 52f034a513 GameDB: Add missing quatation marks in memcardFilters for Armored Core Last Raven 2023-02-08 17:32:49 +01:00
Stenzek 25e05388ba Qt: Open fullscreen window on same display as main 2023-02-08 17:29:59 +01:00
JordanTheToaster 7ad9a1af03 GameDB: Add Paltex to Gacharoku
Stops the hash cache from being silly and exploding.
2023-02-08 17:29:22 +01:00
refractionpcsx2 9346c69343 GS-HW: Iterate dirty rects in reverse to join existing ones. 2023-02-08 00:05:44 +00:00
refractionpcsx2 4a3f0ccf96 GS-HW: Process dirty rects separately, improved Tex in RT compatibility 2023-02-08 00:05:44 +00:00
refractionpcsx2 52a1396e29 GSDumpRunner: Fix new options, add missing Preload Frame 2023-02-07 23:40:01 +00:00
JordanTheToaster f556dd2584 GameDB: Add missing The Godfather fixes
Adds missing fixes for other entry's of The Godfarther.
2023-02-07 23:26:04 +00:00
refractionpcsx2 aea5c09825 GSDumpRunner: Ability to enable manual hw hacks for testing 2023-02-07 22:31:36 +00:00
refractionpcsx2 8c3c9a1219 GSDumpRunner: Tweaks to reduce console messages and redundant frame dumps 2023-02-07 22:31:36 +00:00
eyfix a4f1f383a7 USB/LightGun/GunCon2: Fix wrong code of GunCon2. (#8066)
240 is used for the default screen height elsewhere in the file.
BID_SHOOT_OFFSCREEN is already handled at line 295.
2023-02-07 06:21:48 +01:00
JordanTheToaster ee73c5c1b5 GameDB: Various small fixes
Fixes for Transformers The Game to fix bloom and mipmapping issues and add missing db entrys.
2023-02-07 06:19:59 +01:00
refractionpcsx2 c2904a4633 GS-HW: Don't enable merge sprite in native resolution 2023-02-06 23:59:06 +00:00
JordanTheToaster 6faa2249f9 GameDB: Add Disable InstantVU to MGS 3 Subsistence
Disables InstantVU1 to fix missing letters in text such as the letter E also adds more fixes and missing fixes for Forever Kingdom / Evergrace 2.
2023-02-07 00:24:47 +01:00
lightningterror 119c3acfe7 GS-tc: Cleanup hw texturecache.
Initializations, constants, casts.
2023-02-07 00:22:46 +01:00
lightningterror 138a2683f2 USB: Fix Variable is assigned a value that is never used warning.
Codacy.
2023-02-07 00:22:46 +01:00
PCSX2 Bot 463637fa10 PAD: Update to latest controller database. 2023-02-07 00:19:55 +01:00
refractionpcsx2 d5aab926bf GameDB: Add Game Fix for Scandal 2023-02-05 17:40:02 +00:00
KamFretoZ 37ba04b770 GameDB: Fixes for "Toy Story 3" & "WALL-E" (#8045) 2023-02-05 14:53:09 +00:00
refractionpcsx2 3d0b7dee71 GameDB: Update K-1 Grand Prix fixes to use Instant DMA instead.
This seems to be more reliable in correcting the issue, and for some reason the old way is no longer working properly.
2023-02-05 14:50:36 +00:00
JordanTheToaster a287c2caac GameDB: Add Align Sprite to Football Kingdom
Fixes vertical lines.
2023-02-05 14:42:58 +00:00
Stenzek 1b673d9dd0 GS/HW: Simplify m_vertex/m_index
Switches DX11 to a larger streaming buffer, adds missing texture copy
counter for colclip.
2023-02-04 12:30:24 +00:00
Stenzek d10621c201 GS/DX11: Use annotations for debug messages 2023-02-04 12:30:24 +00:00
Ziemas e1d6dfc324 Add command line boot and debug option 2023-02-04 12:30:07 +00:00
Stenzek 130ea2a7ca PAD: Fix pressure getting set to 1 after modifier 2023-02-04 12:29:53 +00:00
Stenzek c8d53253d2 Qt: Defer application quit on window close
Fixes Mac builds crashing when the Metal renderer tries to clear the
layer on a non-existant window.
2023-02-04 12:29:44 +00:00
Stenzek 5c67438925 VMManager: Only exit CPU execution if we were running
Fixes crash if you were paused when you shut down the VM with the EE
interpreter enabled.
2023-02-04 12:29:44 +00:00
lightningterror 1012dba8d7 GameDB: Add basic mipmap to Narc and Tom & Jerry War of the Whiskers.
Fixes textures.
2023-02-03 23:51:05 +01:00
Mrlinkwii e8d43f53d9 GameDB: fixes for 'Tom & Jerry - War of the Whiskers' & 'Brave - The Search for Spirit Dancer'' 2023-02-03 18:19:42 +00:00
RedDevilus a0e8ce4b13 Qt: Fix compatibility string
Playable rating was missing which is the most common rating for PCSX2. There are some other issues like the images look bad for star rating and some other stuff. Also resize the compatibility table width a bit.
2023-02-03 16:09:46 +00:00
refractionpcsx2 0e35b3edcb GS: Extend things to handle the alpha blended clear in NARC/Brave 2023-02-03 15:17:10 +00:00
refractionpcsx2 25bb5851ec GS-HW: Fix special CLUT case that uses preloading. 2023-02-03 15:17:10 +00:00
refractionpcsx2 80b0bc0869 GS-HW: Adjust clear detection for clears with FBMSK 2023-02-03 15:17:10 +00:00
refractionpcsx2 c05743b7b9 GS-HW: Improve FBW=1 clear for Singstar games 2023-02-03 15:17:10 +00:00
Stenzek 7c2a1f0f37 GS: Vectorize CLUT rect update 2023-02-03 14:36:37 +00:00
Stenzek 0b8b9e75d1 GS: Don't do CLUT auto flush test on invalid PRIM
Fixes OOB array access in Xenosaga I's cutscenes.
2023-02-03 14:36:37 +00:00
refractionpcsx2 d65c343e91 GameDB: Add preload to Siren 2 2023-02-03 06:54:56 +00:00
refractionpcsx2 cd8e7cc947 GS-HW: Queue preloads from Local->Local moves on CPU also 2023-02-03 06:54:56 +00:00
refractionpcsx2 0df5cf2e91 GS-CLUT: Handle invalidation on wrapping writes 2023-02-03 01:55:25 +00:00
refractionpcsx2 412275e40d GS: Convert ee write list to vector, fix some bugs. 2023-02-03 00:09:54 +00:00
refractionpcsx2 4c7ad66bd7 GS-HW: Check for CLUT upload before invalidating or running on GPU.
Clean up some preload code and improve the detection.
2023-02-03 00:09:54 +00:00
refractionpcsx2 8ac21357c3 GS-HW: Force preload 1 frame after reset 2023-02-03 00:09:54 +00:00
refractionpcsx2 2fd88b901b GS-TC: Don't clear on reset, only invalidate frames.
Fixes bug with counting writes before flushing.
Track what textures are used as frames.

It's possible that further to this the PCRTC disables on CSR reset, but we need to test this first, but that would fix the logo at the bottom when booting through the bios in Software mode.
2023-02-03 00:09:54 +00:00
refractionpcsx2 5697759d9e GS-HW: Try to make Preload Frame Data slightly less gross.
These changes make sure there's a matching EE transfer to texture allocation in that frame, if not, then don't allocate anything. This should reduce bad data being loaded in to the Rt.

Preload replaced for Simple 2000 Series Vol. 114 - The Onna Okappichi Torimonochou, preload worked by chance (but no more), disable depth works.
2023-02-03 00:09:54 +00:00
refractionpcsx2 ee0042c768 GameDB: Remove no longer needed Preload Frame settings 2023-02-03 00:09:54 +00:00
refractionpcsx2 a6212f1388 GS-HW: Always preload new frames for PCRTC if none found. 2023-02-03 00:09:54 +00:00
refractionpcsx2 7bfea60b35 GS-TC: Tex In RT expand target match 2023-02-02 23:46:05 +00:00
refractionpcsx2 beee740dc8 GameDB: Add Mipmapping to Jak X, replace FMV fix on Snowboard Heaven 2023-02-02 23:46:05 +00:00
refractionpcsx2 e31387b8bc GS-TC: Don't Tex in RT on old targets/PCRTC only frames. 2023-02-02 23:46:05 +00:00
TheLastRar 3586a12c46 DEV9: Remove pcap dumper
Never worked in Qt
2023-02-02 21:13:52 +00:00
TheLastRar bf21254b13 DEV9: Pcap loop instead of returning on invalid packet
Should improve pcap bridged performance when lots of unrelated network traffic is present.
2023-02-02 21:13:52 +00:00
TheLastRar dc9f61e70a DEV9: Add classes for editing packets and make PCAP use them 2023-02-02 21:13:52 +00:00
TheLastRar 3028998a43 DEV9: Move most of the pcap methods into PCAPAdapter
Also includes the following changes;
pcap_io_running checks replaced with assets in send/recv
pcap_io_running checks replaces checks on hpcap being non null.
Don't cast header->len from unsigned to signed when checking for jumbo frames
Log dropping jumbo frames
Free pcap filter code
Check return value of GetMACAddress() and handle appropriately.
2023-02-02 21:13:52 +00:00
TheLastRar 42511ce8d8 DEV9: Remove unneeded headers
by providing a typedef for Adapter
2023-02-02 21:13:52 +00:00
RedDevilus c245d2134f GameDB: Driver Parallel Lines + Godfather + ...
Godfather: remove on-screen garbage
Driver Parallel Lines: Reduce misaligned bloom issues
Simple 2000 Series Vol. 109 - The Taxi 2: name fix to be Chauffeur and not like train driver (Utenshi to Untenshu)
Rimococoron
2023-02-02 14:22:06 +00:00
JordanTheToaster f01884537d GameDB: Assorted fixes
Fixes the name of GT-R 400 and adds round sprite to fix lines in menus and text and corrects the name of 40k Fire Warrior to correctly have a space.
2023-02-01 10:23:11 +00:00
Mrlinkwii b48fb0d4da Misc : label & comment fixes
Misc : remove old comments
labeler: Add labels for Translations
2023-02-01 10:22:12 +00:00
RedDevilus 7a6470a19d CI: Add RetroAchievements/Rcheevos labels for PRs
Beats doing it manually labels for Rcheevos.
2023-02-01 09:39:30 +00:00
Silent bfd8fc771a Qt: Clear the status text after gamelist scanning
Improves UI parity with DuckStation.
2023-02-01 09:38:46 +00:00
Connor McLaughlin f96ca4ac1f GS/OGL: Fix syntax error in fragment shader 2023-02-01 09:04:52 +01:00
TheLastRar 937bfce68e DEV9: Better match HDD size per-game UI to rest of settings 2023-01-31 21:23:05 +00:00
TheLastRar 5869d35d85 DEV9: Consider placeholderText when opening File dialog
Per-game settings store the global setting as placeholderText.
If no per-game setting is present we can prefill the dialog with the global setting, before falling back to a default value
2023-01-31 21:23:05 +00:00
TheLastRar 8d3325e6cd DEV9: Fix HDD file overwrite check 2023-01-31 21:23:05 +00:00
TheLastRar 4badb5b975 DEV9: Fix HddEnable not enabling UI correctly in per-game settings 2023-01-31 21:23:05 +00:00
TheLastRar 7e4ff233ec DEV9: Fix Per-game HDD path
SettingWidgetBinder isn't capable of handling this yet
2023-01-31 21:23:05 +00:00
refractionpcsx2 0e3397239d GS: Correct GSIMR/GSCSR reg init, regression from previous release 2023-01-31 16:55:45 +00:00
refractionpcsx2 08bae3da2e GS: Fix h/vsync counters on mode change/sync. 2023-01-31 14:56:48 +00:00
refractionpcsx2 4b49c8bd6e GS: Correct CSR behaviour on mode change 2023-01-31 14:56:48 +00:00
refractionpcsx2 c1bd1fcbd4 GS: Clear Privilage registers on GS Reset via CSR 2023-01-31 14:56:48 +00:00
TheLastRar 1c3379f082 Qt: Connect close instead of accept for the close button 2023-01-31 02:06:09 +00:00
Mrlinkwii 86c97a8ba3 GameDB: fixes for Megaman X Command Mission 2023-01-30 20:55:18 +00:00
lightningterror 8e6c18d3f4 emitter: Ignore Wmissing-braces warnings on clang. 2023-01-30 20:32:33 +01:00
Goatman13 f1e80c466d IPU: Reset threshold on IPU reset. 2023-01-30 19:13:50 +00:00
Mrlinkwii 9a542bcb20 GameDB: fixes for Simple 2000 Series Vol. 48 2023-01-30 17:31:00 +00:00
JordanTheToaster 290c8ec420 GameDB: Various Tekken fixes
Disables preloading entirely on Tekken Tag Tournament and Tekken 4 and adds missing fix comments and missing db entry's for both games.
2023-01-30 14:03:58 +00:00
Mrlinkwii 517ccd5e40 GameDB:fixes for Dragon Quest VIII - Journey of the Cursed King 2023-01-29 17:14:17 +00:00
JordanTheToaster bb7bbe0a60 GameDB: Add full Mipmapping to HP COS
Adds full mipmapping and trilinear (PS2) to harry potter and the chamber of secrets to fix blurry textures also adds a missing DB entry.
2023-01-29 16:17:35 +00:00
TellowKrinkle ca25a31d79 GS: Display output ignores TEXA 2023-01-29 10:39:33 +00:00
RedDevilus e804e99013 GameDB: Harry Potter and the Chamber of Secrets
No texture preloading for Harry Potter and the chamber of secrets to improve performance.
2023-01-28 22:56:12 +00:00
Stenzek f447aded57 Qt: Better handle VM-requesting-shutdown case
This was a bit wonky in batch mode before. Now all possible exit paths
close the application at the same point.
2023-01-28 13:40:55 +00:00
Stenzek c596a51593 VMManager: Exit the CPU rec immediately on stopping 2023-01-28 13:40:55 +00:00
Stenzek ed26368a3a Achievements: Fix race in notifications
GS thread might not initialize fullscreen UI before data finishes
parsing.
2023-01-28 13:40:41 +00:00
Stenzek 1b40e4aaca Qt: Fix -nogui/-batch closing 2023-01-28 02:51:02 +00:00
Stenzek 84d7fe550b GSDumpReplayer: Fix frame limiting 2023-01-28 02:51:02 +00:00
TheLastRar e68d507659 DEV9: Unify GetAdapter method definitions
by providing a typedef for Adapter
2023-01-27 18:52:29 +00:00
TheLastRar 2db1e8fb81 DEV9: Move logic for getting MAC address into AdapterUtils 2023-01-27 18:52:29 +00:00
JordanTheToaster df674d4056 GameDB: Correct use of Norway PAL code
Uses the correct flag instead of a spooky question mark.
2023-01-27 18:51:54 +00:00
Silent 21dcda147c Host: Fix a context menu regression from #7960 2023-01-27 18:46:20 +00:00
JordanTheToaster 201d5ba219 Docs: Update sponsors in README 2023-01-27 17:59:01 +00:00
JordanTheToaster 2728462d77 GameDB: A variety of fixes
Fixes to names of games depth line fixes and misaligned bloom galore.
2023-01-27 17:59:01 +00:00
Silent f73b497b67 Host/VMManager: Remove save state cache invalidation and just populate lists every time
Fixes issues where inexistant save states are listed in dropdowns
2023-01-27 13:52:58 +00:00
Silent d2bdb85dc8 SaveState: Add a distinct error message when the file doesn't exist
It doesn't make sense to say that the file is not a valid archive,
because it doesn't exist in the first place.
2023-01-27 13:52:58 +00:00
Tyler Wilding 3572b4752e translations: initial run of lupdate for base english strings
lupdate.exe -recursive '.' -ts ./Translations/pcsx2-qt_en.ts -source-language en
2023-01-27 11:11:32 +00:00
Toastarrr 20de162a55 OSD: Fix invisible inputs
OSD: Show all button inputs and their pressure when available
2023-01-27 11:10:47 +00:00
TheLastRar 64a8e66bac DEV9: Sockets, Treat UDP connections with nearby src/dst ports as fixed
Only doing this for equal ports proved too strict for some games.
2023-01-27 11:02:29 +00:00
TheLastRar ccc1874a4b DEV9: Correct a few socket logs 2023-01-27 11:02:29 +00:00
Stenzek 4fec896378 Qt: Make behavior between both update checks consistent 2023-01-27 10:37:00 +00:00
Stenzek d485fcb3ee GameList: Fix double CDVD open 2023-01-26 18:26:32 +00:00
Stenzek c9498c3cec CDVD: Don't report host error on iso detect fail
We don't want it popping up while scanning the game list.
2023-01-26 18:26:32 +00:00
Stenzek 62fffaf56f GzippedFileReader: Fix freeing potentially-invalid pointer 2023-01-26 18:26:32 +00:00
Stenzek 553a5cc455 CDVD: Remove exceptions 2023-01-26 11:11:36 +00:00
Stenzek 957ec1d3d3 VTLB: Add option to pause on TLB miss
Rather than making it contingent on dev builds.
2023-01-26 11:11:36 +00:00
Stenzek 00c158387b x86/iR5900: Use event test to break execution on exit
Particularly relevant for TLB misses, we want to stop execution as soon
as possible.
2023-01-26 11:11:36 +00:00
Stenzek d12fa690c0 R5900: Remove exceptions 2023-01-26 11:11:36 +00:00
Stenzek 94226e83ba Common: Purge EventSource 2023-01-26 11:11:36 +00:00
Stenzek 4cf041f6cb Common: Move VirtualMemory related functionality to core
Also rewrites page fault handling to not use EventSource junk.
2023-01-26 11:11:36 +00:00
icup321 1b86a6e6f8 GameDB: Fixes for Incredibles - ROTU 2023-01-26 09:44:59 +00:00
Stenzek 6e907ae618 vtlb: Remove upper/lower 32-bit unmapped split
This was only necessary on 32-bit because the sign bit was abused for
representing handlers. Since we're 64-bit only, we use bit 63, which
won't clash with the guest's 32-bit virtual address.
2023-01-26 09:41:13 +00:00
Stenzek 39dde85d03 Qt: Fix -Wunused-lambda-capture warning 2023-01-26 09:28:13 +00:00
Stenzek 8bb9170865 Build: Enable RTTI for Clang debug builds
Qt tries to dynamic_cast as part of an assertion, which aborts at
runtime. When we next rebuild Qt, we'll disable RTTI in Qt, so this will
be a non-issue. But until then, this change makes debug clang builds
usable.
2023-01-26 09:28:13 +00:00
TellowKrinkle 2cd5ce6aea GHActions: Update release pipeline for MultiISA 2023-01-25 18:27:06 -06:00
Florin9doi 64fbaff82b DInput: Support for up to 128 buttons 2023-01-25 20:46:44 +00:00
Stenzek 15a38f5f9d x86/iR5900: Remove reset atomics
These only ever get changed on the EE thread now, this ain't no wx mess.
2023-01-25 15:51:53 +00:00
Stenzek 4c1d93a322 VMManager: Defer reset when running
Stops us resetting during the event test, which can leave things in a
pretty messed up state.
2023-01-25 15:51:53 +00:00
Silent 6a40959f3a DInputSource: Use wil on m_dinput_module 2023-01-25 13:21:51 +00:00
Mrlinkwii c4bf297f42 GameDB: clean up comments 2023-01-25 13:15:58 +00:00
Stenzek da1b408f97 GS: Remove config.h
It conflicts with the main PCSX2 Config.h, and the defines don't need to
be set in the global namespace anymore.
2023-01-25 13:15:17 +00:00
Stenzek 91c3e3b684 GS/SW: Use rip-relative addressing for constants 2023-01-25 13:15:17 +00:00
Stenzek 609a44aaf2 GS/SW: Move code buffer into main memory map 2023-01-25 13:15:17 +00:00
Stenzek 3d84443bcf GS/SW: Share JIT code between all threads 2023-01-25 13:15:17 +00:00
Stenzek 56046d4db8 GS/SW: Move scanline local data to rasterizer 2023-01-25 13:15:17 +00:00
Stenzek 90fc037833 GS/SW: Share global data between threads 2023-01-25 13:15:17 +00:00
Stenzek ee4eadf7a6 GS/SW: Make local a function parameter to DrawScanline 2023-01-25 13:15:17 +00:00
Stenzek 3292121e67 GS/SW: Make local a function parameter to SetupPrim
.. and associated 32-bit removal.
2023-01-25 13:15:17 +00:00
Stenzek c8416b820b GS/SW: Combine IDrawScanline and GSDrawScanline 2023-01-25 13:15:17 +00:00
Stenzek c9d229e336 OpenGLHostDisplay: Set colour mask before drawing OSD
Fixes OSD getting messed up when the GS output is turned off.
2023-01-25 12:08:43 +00:00
pgert bfbcd7a949 GameDB: Force English in Tomb Raider - The Angel of Darkness US (#7950)
Due to a game bug, the game will crash if your BIOS language is set to French or Spanish due to missing files on the disc.
2023-01-25 10:29:23 +00:00
JordanTheToaster bf2ba3c4d1 GameDB: Add missing demos
Adds some missing PAL demos to the DB.
2023-01-24 18:31:36 +00:00
Stenzek 9d50d44c99 GS: Show VRAM usage in statistics 2023-01-24 10:38:03 +00:00
Stenzek e76afee12d GS/TextureCache: Only expand target on write on TBW match 2023-01-24 10:20:42 +00:00
TheLastRar 06ef51db2e DEV9: Move NetLib functions into header and mark as inline 2023-01-23 18:47:28 +00:00
TheLastRar a85a2a3cc5 DEV9: Make use of MAC_Address struct 2023-01-23 18:47:28 +00:00
TheLastRar 8fbecbcdd7 DEV9: Add MAC_Address struct 2023-01-23 18:47:28 +00:00
TheLastRar b386f78d68 DEV9: Make use of WriteIPAddress 2023-01-23 18:47:28 +00:00
TheLastRar 095757044a DEV9: Add IP_Address helpers to NetLib 2023-01-23 18:47:28 +00:00
PCSX2 Bot 9b3b8aa4de PAD: Update to latest controller database. 2023-01-23 17:05:04 +01:00
Connor McLaughlin 4932834441 GSRunner: Release globals on shutdown 2023-01-23 16:49:24 +01:00
refractionpcsx2 8773ebf64b VM: Queue shutdown message when called from inside emulation. 2023-01-23 16:45:58 +01:00
Connor McLaughlin f628795b3f GS/Vulkan: Don't apply TFX state on utility draw 2023-01-23 15:01:57 +01:00
lightningterror 0c78bda328 GS-hw: Fix texture shuffle assert which broke debug builds. 2023-01-23 14:48:40 +01:00
lightningterror d9f4bc70fb common-ogl: Fix Shader compiled with warnings log spam on gl.
Observed on intel igpu.
2023-01-23 14:48:40 +01:00
lightningterror ddd2ea5f4d GS-gl/vk: Cleanup some logs.
Instead of ifdefing the longs use Devcon, does the same thing.
Hide point expansion logs behind dev/debug build.
2023-01-23 14:48:40 +01:00
JordanTheToaster a326303956 GameDB: Fixes for TC SC Pandora Tomorrow
Fixes for black loading screens and misaligned bloom.
2023-01-23 09:47:19 +00:00
refractionpcsx2 ba1eba98ea GS/Debug: Fix bitfield reading in fprintf for cross compatibility. 2023-01-22 23:49:40 +00:00
refractionpcsx2 8282ebce40 GS-HW: Don't optimise clamp on shuffle 2023-01-22 23:12:19 +00:00
Berylskid 4c3b7c45cf GameDB: Remove Preload Frame Data for AC Last Raven
On SLPS-25462, disabling Preload Frame Data no longer causes black screens during missions, so it seems no longer necessary.
2023-01-22 16:18:39 +00:00
JordanTheToaster 668251274a GameDB: Disable Instant VU in Kim Possible WTS
Disables Instant VU to dramatically decrease the load the game puts on the EE and VU for seemingly no reason.
2023-01-22 15:51:38 +00:00
KFZ e79fc72950 GameDB: Fixes for SpongeBob - The Movie (#7936) 2023-01-22 15:51:22 +00:00
JordanTheToaster bcda41120e GameDB: Add Autoflush to Dynasty Warriors 5 Xtreme
Autoflush fixes the missing sun luminosity.
2023-01-22 15:01:54 +00:00
Mrlinkwii 80fc00bb05 GameDB: fixes for 'Snowboard Heaven' 2023-01-21 18:39:45 +00:00
refractionpcsx2 f71ccab811 GameDB: Remove BFF deinterlacing from Alpine Racer 3, no longer required 2023-01-21 18:14:13 +00:00
refractionpcsx2 795951a2e8 Build: Fix some VS filers. 2023-01-21 18:14:13 +00:00
refractionpcsx2 d62999ed16 GS: Don't do fast clear if SCANMSK is enabled. 2023-01-21 18:14:13 +00:00
lightningterror 9b1699a5a4 GS-hw: Cleanup GS memory clear.
Create IsConstantDirectWriteMemClear function to reduce code duplication and making code cleaner.
2023-01-21 17:01:32 +00:00
Stenzek 88c1f00b62 GS: Add audio capture and custom resolution 2023-01-21 16:56:57 +00:00
Stenzek 6834367a3e GS: Move video capture encoding onto its own thread 2023-01-21 16:56:57 +00:00
Stenzek dedcf21a37 GSCapture: Make readback for capture asynchronous 2023-01-21 16:56:57 +00:00
Stenzek a747a5f9fa SPU2: Make SndOut.h compile in isolation 2023-01-21 16:56:57 +00:00
Stenzek fcfb9865df GS: Add GSDownloadTexture (so we can download more than one at once) 2023-01-21 16:56:57 +00:00
JordanTheToaster aa1e9cc9fa GameDB: Add AutoFlush to Battle For Volcano Island
Adds autoflush to fix texture corruptions.
2023-01-21 16:02:08 +00:00
Silent 9b7d21891d GameDB: Correct Colin McRae Rally 3 sun rendering 2023-01-21 14:18:17 +00:00
lightningterror df19baed37 labeler: Add labels to shader files changes based on renderer. 2023-01-21 01:28:59 +01:00
LeyoandLeyo1 7848f6a1c5 GameDB: Syphon Filter: The Omega Strain Beta Speed Fix (#7926)
Co-authored-by: Leyo1 <71053461+Leyo1@users.noreply.github.com>
2023-01-20 22:57:25 +00:00
JordanTheToaster 14e128337d GameDB: Add missing Bratz The Movie fix
Adds a missing fix for the NTSC-U version of the game.
2023-01-20 22:56:31 +00:00
lightningterror cb314f0a0b labeler: PAD labels are unified now. 2023-01-20 18:38:54 +01:00
Oymat ddb313fd2b GameDB: Add Mipmapping and Trilinear to Parappa the Rapper 2 (#7924)
Closes https://github.com/PCSX2/pcsx2/issues/7922
2023-01-20 15:53:13 +00:00
lightningterror 8f183955a0 GS-vk: Fix sample_4_index shader.
Macro conditions conditions should return a value.

Fixes bad shader issues on games that trigger it.
Fixes Star Ocean shadows.
Fixes Keroro Gunsou - Mero Mero Battle Royale text.

Make the rounding consistent accross all renderers.
2023-01-20 10:18:03 +01:00
Mrlinkwii 536a4162c4 GameDB: upscaling fixes for 'TOCA Race Driver' 2023-01-19 21:47:36 +00:00
TheLastRar 41a47f99f7 DEV9: Use unique_ptr via typedef for ifadddrs buffer 2023-01-19 14:56:18 +01:00
TheLastRar 31fa1ea21e DEV9: AdapterUtils formatting 2023-01-19 14:56:18 +01:00
Stenzek fb49c71118 SPU2: Clean up some unused/conditionally used functions 2023-01-19 11:02:13 +00:00
Stenzek 0b87cfc7d4 SPU2: Clamp output to 32767 instead of 32512
Another air-ism which doesn't make much sense.
2023-01-19 11:02:13 +00:00
Stenzek 76fa37019e SPU2: Use 16-bit samples for output
It's clamped to 16-bit in the output anyway.

Volume application is moved to the audio thread, so the stretcher has
higher precision if the user chooses a low volume.

Also vectorizes the int->float conversion (since it happens on the EE
thread, it's beneficial for performance).
2023-01-19 11:02:13 +00:00
Tokman5 d94e861a78 GS: Add video folder and support additional arguments for video dumping 2023-01-19 10:39:22 +00:00
Oymat d9b537d334 GameDB: Add SoftwareRendererFMVHack to Onimusha: Warlords (#7916)
close https://github.com/PCSX2/pcsx2/issues/7787
2023-01-18 19:15:43 +00:00
Stenzek 93c2081d3f USB: Remove readerwriterqueue
Not used anymore, apparently forgot to remove this in the USB refactor.
2023-01-18 10:08:46 +00:00
LeyoandLeyo1 5ad8ed43fd GameDB: Syphon Filter: The Omega Strain PAL speed fix patch (#7806)
Co-authored-by: Leyo1 <71053461+Leyo1@users.noreply.github.com>
2023-01-17 20:21:13 +00:00
Mrlinkwii 1f4416a77a GameDB: upscale fixes for 'Lord of the Rings, The - The Two Towers' 2023-01-17 19:26:13 +00:00
Mrlinkwii e9d4dba64b GameDB: fixes for 'Dreamworks Madagascar' 2023-01-17 11:15:42 +00:00
lightningterror 3a2307a5c6 GS-hw: Cleanup GSRendererHW.
Constants, initializations, casts, broken commented out logs and more.
Remove unused/duplicate function EmulateAtst.
2023-01-16 20:34:10 +00:00
Stenzek d6c1af1a0c IPU: Combine source files to work around an LTO bug in clang 15
Works around an LTO bug which seems to occur in clang 15, but not in
clang 12. The entire else branch in the 0 case in get_non_intra_block()
was being removed...

Fixes Burnout 3 crashing in clang builds.
2023-01-16 20:13:46 +00:00
JordanTheToaster f6cb7ca01d GameDB: Add HPO Normal to WWE 2008 and 2009
Fixes slight blur on people and depth bleed that happens on the right hand side.
2023-01-16 18:19:27 +00:00
PCSX2 Bot bc0fdc49e0 PAD: Update to latest controller database. 2023-01-16 17:18:26 +01:00
Stenzek 43ccb63eb5 Qt: Add DS4/DS5 LED settings 2023-01-16 14:08:01 +01:00
Ty Lamontagne a0000a8547 Debugger: Implement boot and debug
Creates a breakpoint automatically on the ELF entry point
2023-01-15 17:05:35 +00:00
Stenzek a37ff0c4f2 GS/Vulkan: Fix incorrect clamp in CreateSurface() 2023-01-15 17:40:15 +01:00
Stenzek e449ad7472 GS/TextureCache: Check PSM matches before expanding target
Mercenaries is doing a 128x4095 write in PSMT4, which when upscaling,
goes beyond the limits of most GPUs.
2023-01-15 17:40:15 +01:00
Stenzek a718a785b3 GS/TextureCache: Don't recycle resized target textures
They're probably going to be oddly-sized.
2023-01-15 17:40:15 +01:00
Stenzek ea7cc08832 GameDB: Remove preload frame from Burnout games
Doesn't appear to be needed with GPU CLUT?
2023-01-15 16:20:40 +00:00
Stenzek a342f4c7e9 GS/HW: Adjust Burnout CRC hack to stop hash cache spiking 2023-01-15 16:20:40 +00:00
JordanTheToaster 0af2657bbc UI: More text descriptions for options
Adds more text descriptions for various options to help understand what a setting does better.
2023-01-15 14:49:05 +00:00
Stenzek 451c2a244f SPU2: Fix sound output
Regression from a603aed7db
2023-01-15 12:48:47 +01:00
lightningterror a603aed7db SPU2: Update WriteSamples function commented out code to work properly when enabled. 2023-01-15 11:10:46 +01:00
lightningterror f6bbf410f1 SPU2: Remove dynamic tuning commented out code.
No longer works as it relied on wx.
2023-01-15 11:10:46 +01:00
lightningterror 018692edd0 SPU2: Cleanup SndOut.cpp
const, casts, constexpr, initializations.
2023-01-15 11:10:46 +01:00
pgert 2740785df5 UI: Correct Error-messages: "SSE4.1" not "SSE4" (#7890) 2023-01-14 23:06:56 +00:00
Stenzek 613a9964a1 FullscreenUI: Fix descriptor use-after-free when deleting state 2023-01-14 14:07:30 +00:00
Ty Lamontagne 2ef2f5db1d Debugger: Fix step out 2023-01-14 12:51:14 +01:00
Ty Lamontagne 577e15a949 Debugger Expressions: Add 'target', 'load', and 'store' reference
target -> The evaluated target of the load or the store, 0 if the opcode is not a memory access
load -> The evaluated target of a load, is 0 if the opcode is not loading
store -> The evaluated target of a store, is 0 if the opcode is not storing

Fixes the disassembly widget mouse click handler
Fixes the breakpoint dialog not setting the breakpoint address or condition cpu (oops)
2023-01-14 01:58:04 +00:00
Mrlinkwii 58ff3e6c0d GameDB: add missing serial 2023-01-13 23:57:13 +00:00
Stenzek 80c471a939 Dmac: Fix incorrect condition for OPH flag hack
Fixes tutorial level in Naruto - Uzumaki Chronicles.
2023-01-13 12:20:12 +00:00
refractionpcsx2 b78fca7b91 GameDB: Add Half-Pixel Offset for Sega Superstars Tennis 2023-01-13 10:26:41 +00:00
Connor McLaughlin be76092195 USB: Correct Keyboardmania binding list 2023-01-13 09:31:27 +00:00
Stenzek 771d3c3c9d CI: Retry downloading commands on Linux
The Azure Ubuntu package server, in particular, seems to be very
unreliable. Hopefully within 10 attempts it'll complete the package
download in such cases.
2023-01-13 09:30:46 +00:00
arcum42 8c21765c0f cmake: Turn back on some warnings that no longer need to be turned off. 2023-01-13 09:27:29 +00:00
TellowKrinkle a2e3522862 GS:MTL: Implement clut shaders 2023-01-13 00:43:47 -04:00
Mrlinkwii e20c2210f5 GameDB: fixes for Made Man 2023-01-12 20:56:51 +00:00
lightningterror 11f3fecd11 GS-d3d: Fix Wmissing-braces warnings. 2023-01-12 16:26:56 +01:00
lightningterror 1a5d7c1c5d Qt: Fix Wunused-const-variable and Wunused-function warnings. 2023-01-12 16:26:56 +01:00
Connor McLaughlin 0bca1aab74 Misc: Latest round of warning cleanups 2023-01-12 11:04:29 +01:00
Connor McLaughlin 95fa15f902 Vulkan: Use pool of semaphores instead of per-image
Some drivers apparently don't iterate images in the order you expect.
2023-01-12 11:03:21 +01:00
lightningterror d586582489 GS: Purge leftover wx tooltips. 2023-01-12 01:38:35 +01:00
Stenzek 7ef46eaa29 GameDB: Swap some CPU CLUT games for GPU CLUT
Burnout series, NFS Most Wanted.
2023-01-11 23:37:43 +00:00
Stenzek 38957625ad GameDatabase: Add GPUTargetCLUT 2023-01-11 23:37:43 +00:00
Stenzek d30e076dbd GS: Add GPU Target CLUT 2023-01-11 23:37:43 +00:00
Stenzek 0619555232 GS/HW: Use texel fetch/load instead of sampler for palettes
Saves a multiply in the shaders in some cases, and frees up one
descriptor slot.
2023-01-11 23:37:43 +00:00
Stenzek 3ffa5eb613 GS: Add const to GSDirtyRect functions 2023-01-11 23:37:43 +00:00
Mrlinkwii c60583c6bb GameDB: fixes for Battle for Volcano Island 2023-01-11 23:10:14 +00:00
Stenzek 4cf7a1086d GS/HW: Adjust Barnyard fix for Jurassic Park and Nicktoons Unite
Draws its mipmaps at runtime in a very similar way, except with 24-bit
textures as well as 16/32-bit.
2023-01-11 22:40:04 +00:00
RedDevilus fa75006ca9 VMManager: Increase software thread count on multicore (4+) CPUs
3 is a nice compromise if you have 4 core or more but for some games higher numbers like 8 or even higher would work, however for a lot of games it would perhaps even reduce the performance compared to 3 software rendering threads or in more likelihood have diminishing returns.

Keep in mind that this is just a general situation, in actual use it might be less extra performance (if at all) as you have expected.
2023-01-11 21:48:36 +00:00
RedDevilus d28b2fa057 Qt: Lower audio ms + Tooltip (affinity+Cycle skip)
Lowering 100 ms audio latency to 60 ms.
Makes 100 mixing latency with 20 output latency (120) into a new default of 80 ms which is 50% lower but still is enough headroom as 40 ms even for less capable machines is too high.

Adding tooltip for Affinity Control
Changing tooltip for Cycle Skip from None to Disabled as that is a valid option.
2023-01-11 18:56:42 +00:00
arcum42 0a90765ed0 build: -Wno-maybe-uninitialized is a gcc only warning. 2023-01-11 00:55:21 +01:00
arcum42 2892f629f0 build/QT: Unmute the warnings for deprecation & overloading virtuals. Fix assorted warnings. Mute 'maybe initialized' warnings. Add a policy to take care of LTO warnings in cmake. 2023-01-11 00:55:21 +01:00
Mrlinkwii 5be05853c6 GameDB: fixes for Hawk Kawasaki Racing 2023-01-10 21:00:43 +00:00
JordanTheToaster 0f569ac5cb Format: Clang format System.cpp 2023-01-10 16:18:26 +01:00
JordanTheToaster b725c1e8e0 System: Remove unused extensions
PCSX2 does not even boot on SSE2 or SSE3 systems and we do not use SSE4a so we should remove it SSE4.1 / 4.2 is a requirement so no use being here either.
2023-01-10 16:18:26 +01:00
JordanTheToaster 4d418d1bb5 Emitter: Remove old unused code
Irrelevant and outdated code that is no longer needed.
2023-01-10 16:18:26 +01:00
Ty Lamontagne 752594f69a Debugger Breakpoints: Implement the user data role in the model
Consistent with the other models, and saves some awkward usage in the cpu widget where we have to interpret the variant as a string, to then convert it to a uint. I like this better as it provides an easy interface to get the 'raw' breakpoint data out of the model.
2023-01-10 13:57:06 +01:00
Ty Lamontagne b6125e97e9 Debugger Stack frames: (Refactor) Use model based widgets 2023-01-10 13:57:06 +01:00
Ty Lamontagne c00caa886e Debugger Threads: (Refactor) Use model based widgets 2023-01-10 13:57:06 +01:00
Ty Lamontagne 37540d1c68 Debugger Breakpoints: (Refactor) Use some reflection and item models 2023-01-10 13:57:06 +01:00
lightningterror 8fca67f0d6 FullscreenUI: Cleanup remnants of spu2 interpolation mode. 2023-01-10 13:47:41 +01:00
PCSX2 Bot 13f891c34f PAD: Update to latest controller database. 2023-01-09 17:05:52 +01:00
JordanTheToaster f924ab721a SPU2: Purge interpolation options
Removes the options menu for interpolation as all but gaussian will be removed.
2023-01-08 15:19:51 +00:00
JordanTheToaster ae3708edc6 GameDB: Correct Blood Omen 2 name
Corrects Blood Omen 2s name to properly say "The Legacy of Kain".
2023-01-08 14:08:54 +00:00
Stenzek 4ef2574ae3 GS: Separate Cd output from Cs blend cases
Fixes white screen inbetween logos in FFX.
2023-01-08 12:44:17 +00:00
Stenzek 154171e01e x86/microVU: Don't assert clearing macro mode temps 2023-01-08 09:12:44 +01:00
refractionpcsx2 17732a0b8a VU: Fix out of bounds check for Q clamp 2023-01-07 23:18:33 +00:00
Stenzek b6906d1edc FullscreenUI: Fix Threaded Presentation toggle title 2023-01-07 09:48:14 +00:00
Stenzek 26329765d1 SPU2: Apply volume on startup 2023-01-07 09:48:14 +00:00
arcum42 fab7424ebb x86regs: iCore.h cleanup. (#7769)
* VU: Make _x86regs.reg signed, as -1 is supposed to indicate that it is unassigned.

* VU: Convert a few defines to enums.

* microVU: Set bool to true rather than 1.

* xmm: Use std:array in a few spots, and make initializing some spots less verbose.

* iCore: Remove comment, as it's inaccurate. Leaving as s8 for consistency with xmm.
2023-01-06 21:40:09 -08:00
TellowKrinkle e4c9416c4a 3rdparty: Update to gtest 1.12.1 2023-01-06 20:27:18 -04:00
Víctor "IlDucci 72c661e8f5 GameDB: Fix Terminator 3 Spain region, add Buzz Brain of Spain(#7813) 2023-01-06 21:53:22 +00:00
refractionpcsx2 d5acd98eb3 UI: Correct default tab for graphics settings.
Apparently Qt Designer thinks if you're renaming a checkbox, *obviously* that means you're wanting the default tab changing too...
2023-01-06 20:56:40 +00:00
Mrlinkwii 849c754ca2 GameDB:: fixes for 'Obscure II - The Aftermath' 2023-01-06 17:39:47 +00:00
refractionpcsx2 e6f6385173 GameDB: Add Disable Instant VU to Batman - Rise of Sin Tzu 2023-01-06 16:11:09 +00:00
refractionpcsx2 d3ca2bf58f GS: Make VK threaded presentation the default 2023-01-06 15:49:49 +00:00
Mrlinkwii 82f1dbca89 memory card: Remove commented out WX code. 2023-01-06 15:35:20 +00:00
Stenzek c85b826978 PerformanceMetrics: Track min/avg/max frame time 2023-01-06 14:57:57 +00:00
Stenzek f28c40aa8e Qt: Expose Threaded Presentation setting 2023-01-06 14:57:57 +00:00
Stenzek 3fa3bc1719 Vulkan/Context: Acquire swap chain image after presenting 2023-01-06 14:57:57 +00:00
Stenzek 93bd95f4bd Vulkan/Context: Pass swap chain through to submission
Simplifies things a bit.
2023-01-06 14:57:57 +00:00
Stenzek 7d572ff794 Vulkan/SwapChain: Use a separate semaphore for each image 2023-01-06 14:57:57 +00:00
JordanTheToaster 693278a87b GameDB: More BF2 MC Fixes
Adds Tex in RT and CPU CLUT to BF2 MC to fix lights shining through objects like the moon shining through buildings.
2023-01-06 14:25:09 +00:00
RedDevilus b6bcbcac96 Qt: Fix light themes
I've given some love to dark themes, but doesn't mean light themes doesn't deserve it either. Making it better in contrast to make it more legible along with making it a bit more appealing.
2023-01-06 12:43:42 +00:00
Stenzek 4cfea01aa8 GS/HW: Add CRC hack for Battlefield 2: Modern Combat
Full blending is needed to render the terrain correctly.
2023-01-06 11:59:10 +00:00
Stenzek 9e301e1aec GS/HW: CRC hack for Barnyard 2023-01-06 11:59:10 +00:00
Stenzek 8502acffb7 GS/HW: Add mipmap support to SwPrimRender() 2023-01-06 11:59:10 +00:00
Stenzek 580b7c94fb GS/HW: Remove AfterDraw function
Not needed.
2023-01-06 11:59:10 +00:00
Stenzek fe1e432f9e GS: Move HW hacks into game database 2023-01-06 11:59:10 +00:00
Stenzek 904ccc7a91 VMManager: Log when game changes 2023-01-06 11:59:10 +00:00
Stenzek 069196704e GS: Move HW hacks into their own file and remove from GSState 2023-01-06 11:59:10 +00:00
arcum42 2db6bf399e common: Remove pxUSE_SECURE_MALLOC. 2023-01-05 14:58:54 -08:00
Mrlinkwii a5bc49ee4a Misc : remove missed wx vs filters 2023-01-05 20:54:16 +00:00
arcum42 949d455d2f cmake: Make the clang release build always lto. 2023-01-05 07:48:06 -08:00
arcum42 3254d27fc2 cmake: Changed the preset names, made clang always use lld, and added a new lto preset. 2023-01-05 07:48:06 -08:00
arcum42 4921afdb51 build: Cleanup. Fix a few names, and use cache variables for the compiler. 2023-01-05 07:48:06 -08:00
arcum42 54b653cc00 cmake: Add CMakePresets.json to project. 2023-01-05 07:48:06 -08:00
lightningterror 3066ab0d06 Qt: Fix Wunused-variable warning. 2023-01-05 15:02:17 +01:00
lightningterror 17c5acda3c microVU: Fix Wunused-function warning. 2023-01-05 15:02:17 +01:00
lightningterror ee3cacffd7 SPU2: Fix class has a constructor with 1 argument that is not explicit warnings.
Codacy.
2023-01-05 15:02:17 +01:00
lightningterror 0cd5b9072c D3D12HostDisplay: Fix class has a constructor with 1 argument that is not explicit warning.
Codacy.
2023-01-05 15:02:17 +01:00
lightningterror 987fdd32fb Frontend-imgui: Fix scope of the variable can be reduced warning.
Codacy.
2023-01-05 15:02:17 +01:00
lightningterror 314143db7a Debugger: Fix clarify calculation precedence for '&' and '?' warnings.
Codacy.
2023-01-05 15:02:17 +01:00
lightningterror 10f468dd3f USB: Fix struct member is never used warning.
Codacy.
2023-01-05 15:02:17 +01:00
Mrlinkwii c66881d4a6 gitignore: remove wx mentions 2023-01-05 14:53:10 +01:00
Mrlinkwii 45d42da528 GzippedFileReader: Remove commented out WX code. (#7796) 2023-01-05 14:31:04 +01:00
refractionpcsx2 c50e1800ec SPU2: Allow loop rewrite of LOOPSTART if block header already passed 2023-01-04 22:40:18 +00:00
Stenzek 06aa051162 UnitTests: Combine into core/common test suites
Should reduce CI run time.
2023-01-04 11:43:23 +00:00
Stenzek 33e7bcbdb8 UnitTests: Compile with PCSX2 core library
Instead of shoehorning GS source files into the unit tests, we link with
the full PCSX2 core library. We stub out all the Host functions, as,
well, there isn't one, and they may be indirectly referenced.
2023-01-04 11:43:23 +00:00
Connor McLaughlin c44266eb82 MTVU: Fix hang on shutdown if thread never opened 2023-01-04 11:43:23 +00:00
Connor McLaughlin dcbb1483b9 USB: Fix incorrect serialization of HIDKbdDevice. 2023-01-04 10:53:38 +01:00
Mrlinkwii 4620b566b9 GameDB: add fixes to Syphon Filter - The Omega Strain 2023-01-03 20:21:13 +00:00
JordanTheToaster 076b11a735 GameDB: Various fixes
Adds HPO Special Mipmapping Full and Trilinear PS2 to FIFA 06 to 10 and fixes the name and adds HPO Special to Conan.
2023-01-03 13:20:56 +00:00
Stenzek 246f783a64 CI: Generate Windows Clang builds 2023-01-03 12:16:50 +00:00
Stenzek ac3e7fbf44 MSBuild: Support building with clang-cl 2023-01-03 12:16:50 +00:00
Stenzek dda1665b9c USB: Support stereo input for Singstar Mic 2023-01-03 12:16:30 +00:00
Stenzek db4d721b93 x86/iR5900: Always break rec blocks on SYSCALL/BREAK
In all cases except for GetOsdConfigParam/GetOsdConfigParam2 the HLE
syscall handler will raise the CPU exception, changing the PC.

So, there's no point compiling the rest of the block, especially when it
may contain garbage code. No point checking the PC either, as in almost
every case, it will have changed. So just go straight to the dispatcher.

Note this will have a slight behavioral change - both SYSCALL/BREAK will
check the cycle count for an event test now, whereas before only BREAK
did. But I doubt this'll cause any issues.
2023-01-03 12:16:06 +00:00
JordanTheToaster f48824dec0 GameDB: Remove disable Instant VU from SoTC
Removes disable Instant VU1 from SoTC as it should be user choice to enable or disable it if needed.
2023-01-03 09:27:04 +00:00
Ty Lamontagne eac90c6b42 Debugger Disassembly: Add 'NOP Instruction(s)' Context menu action 2023-01-03 04:38:14 +01:00
Ty Lamontagne ec5a91b89a Debugger Breakpoints: Allow toggling from list / dialog. 2023-01-03 04:38:14 +01:00
Ty Lamontagne a9a3342519 Debugger: Disable certain actions when the VM is not alive. 2023-01-03 04:38:14 +01:00
Ty Lamontagne 51f3e1b684 Debugger Disassembly: Page Up/Down hotkey for disassembly view 2023-01-03 04:38:14 +01:00
PCSX2 Bot 2459145dbf PAD: Update to latest controller database. 2023-01-02 18:03:24 +01:00
refractionpcsx2 d48abe03b0 GameDB: Comment all EE/VU fixes, add some missing ones, modify vu fixes 2023-01-02 16:11:02 +00:00
Stenzek 1e4e54eca0 GS: Silence ignored-qualifiers warning in GCC too 2023-01-02 14:13:42 +00:00
Stenzek 9d23da226f Misc: Remove linux_various subdirectory
Again, nothing in here has been used in a long time.
2023-01-02 14:13:42 +00:00
Stenzek c911738b5c Misc: Remove build.sh
Majority of stuff in this file is deprecated, or hasn't been used
in a long time.
2023-01-02 14:13:42 +00:00
Stenzek 574e0a10e2 gitignore: WX cleanup and add build dir variants 2023-01-02 14:13:42 +00:00
Stenzek f240660a6e CMake: Post-WX cleanup
- Remove unused build options

 - Disable setcap by default
    Applications should not need to call sudo as part of the build process.

 - Rename XDG_STD to USE_LEGACY_USER_DIRECTORY
    By default, we use ~/.config/PCSX2 now.

 - Default Wayland support to on
    I don't think there's any systems worth supporting that don't have it.

 - Rework "install" logic
    Linux no longer installs to GIT_ROOT/bin, it builds direct to BUILD/bin.
    Saves a file copy, and running make install before running your developer
    build was always silly.

 - Don't require install target to build appimage
    AppImage creator now just adds the entire bin directory as-is.
    Everything needed is in there.
2023-01-02 14:13:42 +00:00
Connor McLaughlin b2416c6466 GS/DX12: Remove undefined functions from header 2023-01-02 13:02:36 +00:00
Stenzek 3ed489f35c Qt: Only apply non-visible window info rule for X11
Again, DInput needs the main window, even if it's not visible.
2023-01-02 08:31:55 +00:00
Stenzek f96ad8ff6e Qt: Return main window info when not running
Needed for DInput.
2023-01-02 08:31:55 +00:00
Stenzek 2d7289a248 DInputSource: Fix incorrect unlock on failure 2023-01-02 08:31:55 +00:00
lightningterror 2de6a5029f gh-workflows-macos: Remove leftover wx dependencies.
Also remove qt gui check since it's the only gui we use.
2023-01-02 08:50:43 +01:00
Mrlinkwii bed3cae6df GameDB: remove SoftwareRendererFMVHack from Onimusha - Dawn of Dreams 2023-01-01 17:41:21 +00:00
Stenzek b3bf3e46be Qt: Fix per-game settings with sliders 2023-01-01 17:12:04 +00:00
Stenzek 336ef58f61 CMake: Search specifically for the ffmpeg components we need
And fix the not-found logic.
2023-01-01 17:11:49 +00:00
Stenzek f3e7491c3a CMake: Don't disable native arch in debug builds
The reasoning apparently dates back to 2016, and was stupid even then.
2023-01-01 17:11:49 +00:00
lightningterror 48b9d2f53e common-ogl: Fix Program linked with warnings log spam on gl.
Mostly observed on amd driver.
2023-01-01 12:03:02 +01:00
Stenzek 1dff9897c9 x86/microVU: Only update MXCSR when it's different
Saves reloading it when the EE and VU0 rounding modes are the same.
2023-01-01 10:42:59 +00:00
Stenzek b5a61d2915 SPU2: Move WaveDump and friends behind PCSX2_DEVBUILD 2023-01-01 09:50:54 +00:00
Stenzek 0c5b43bcdd SPU2: Move SndOut declarations to header
In some cases clang will optimize out the global variable definition
otherwise.
2023-01-01 09:50:54 +00:00
Stenzek fe8ebe3f79 SPU2/Cubeb: Fix unused variable warning 2023-01-01 09:50:54 +00:00
Stenzek 265afcec7e x86/microVU: Fix incorrect VI being backed up when uncached
Fixes hang going ingame in Gitaroo Man.
2023-01-01 09:47:46 +00:00
RedDevilus 26d5ee0c93 Qt: Fix out-of-focus colors + 2 new dark themes
One annoying issue is when you watch the emulator when unfocused especially on light themes such as the blue theme where the button is very light and the text as well.

Re-ordered the themes according to their position in the GUI.

Also added a purple and a more dark calm variant compared to vibrant Scarlet Red and a Blue variant for Ruby.
2022-12-31 23:25:31 +00:00
Stenzek 6e1011f18a VMManager: Only warning for audio if async mix is used 2022-12-31 23:23:58 +00:00
Stenzek 9bca1946ed SPU2: Add output device selection 2022-12-31 23:23:58 +00:00
Stenzek 0c8beedb94 SPU2: Split output latency and target buffer size 2022-12-31 23:23:58 +00:00
Stenzek c274e447dd Qt: Don't push volume changes through full settings apply
Saves the thread sync, means we don't lag.
2022-12-31 23:23:58 +00:00
Stenzek 2bc2891c73 CommonHotkeys: Add volume control hotkeys 2022-12-31 23:23:58 +00:00
Stenzek fe1bebc12d SPU2: Namespace logging/debugging 2022-12-31 23:23:58 +00:00
JordanTheToaster 339c483a4b GameDB: Set preloading to Partial for Tekken 4
Sets texture preloading to partial for Tekken 4 to prevent it from exploding most violently.
2022-12-31 23:23:45 +00:00
RedDevilus 73f1f0e1d6 GameDB: Iris 2 + Iris 3
Hashcache disabled + FMVsoftwaregamefix + Roundsprite for Iris 2
Roundsprite was forgotten to be added for the Japanese entries for iris 3 (eternal mana 2)
2022-12-31 23:23:27 +00:00
Stenzek f83fc9ba27 Qt: Fix Host::GetTopLevelWindowInfo() in nogui mode 2022-12-31 23:22:27 +00:00
xujibbs 4e5692e935 UI/AudioSettings: Correct recommended value for overlap (#7748) 2022-12-31 23:22:01 +00:00
Mrlinkwii 2bb707299a GameDB: add missing serial 2022-12-31 23:20:32 +00:00
Stenzek 9aa46e8543 Misc: Remove GS/config.h include from PCSX2Base.h
Also remove unused options from config.h
2022-12-31 06:57:21 +00:00
JordanTheToaster 4831e51cb4 GameDB: Add SW CLUT to The Incredibles
SW CLUT fixes post processing and HPO Normal aligns the post processing.
2022-12-30 23:38:25 +00:00
Stenzek 4ea331ecf2 x86/microVU: Fix VU1->VU0 register access in MTVU mode
eax wasn't being backed up, and in most cases it contains the address
we're loading from/storing to.
2022-12-30 08:49:05 +00:00
TheLastRar 79764430d8 DEV9: Fix out_of_range exception with automatic gateway 2022-12-29 22:54:04 +00:00
refractionpcsx2 51107ee9dd mVU: Align x86ptr based on AVX2 caps 2022-12-29 20:02:57 +00:00
Connor McLaughlin d359e8420b x86/iR5900: Fix incorrect blend in mfsa 2022-12-29 14:18:21 +00:00
JordanTheToaster ea11bb61e3 GameDB: Disable texture preloading for Time Crisis 3
Disables texture preloading in Time Crisis 3 to massively improve performance.
2022-12-29 12:18:51 +00:00
JordanTheToaster 4a90a3e1c9 Readme: Update specifications requirements
Update brings the requirements more in line with modern hardware.
2022-12-29 10:24:13 +00:00
JordanTheToaster 8f73e93205 GameDB: Add VU0 Clamping to Sly 3
Adds VU0 Extra + Preserve Sign to Sly 3 to fix the bugged camera and not break the "The Ancestors' Gauntlet" level.
2022-12-29 10:01:48 +00:00
Stenzek 1a7263cb9f x86/microVU: Forward CTC2 I direct to VNNNi instructions 2022-12-29 10:01:25 +00:00
Stenzek d6332e796e x86/iR5900Analysis: Correct backprop for VNNNi 2022-12-29 10:01:25 +00:00
Stenzek ebcb3b413c x86/iR5900: Use register cache for mfsa
It also was incorrect for the XMM path before... loading 64 bits instead
of 32.
2022-12-29 10:01:25 +00:00
Stenzek 2a92edd7ed x86/iR5900: Don't rename GPR from mf{hi,lo} when in xmm
Redundant codegen, also incorrect when not in GPR.
2022-12-29 10:01:25 +00:00
Stenzek 9584672051 x86/microVU: Rewrite IADD from vi00 to mov 2022-12-29 10:01:25 +00:00
Stenzek 6018936dc2 x86/microVU: Optimize loadstores to offsets from vi00 2022-12-29 10:01:25 +00:00
Stenzek d00da31e60 x86/microVU: Avoid redundant register move on stores 2022-12-29 10:01:25 +00:00
Stenzek afd8ff1435 x86/microVU: Flush register cache before T/D-bit
Saves flushing in both execution paths.
2022-12-29 10:01:25 +00:00
Stenzek 4f65ef4d33 x86/microVU: Preload registers at beginning of block 2022-12-29 10:01:25 +00:00
Stenzek cdadad5689 x86/microVU: Use unrolled copy loop for updating PL state 2022-12-29 10:01:25 +00:00
Stenzek 00d768a6bf x86/microVU: Add VI caching 2022-12-29 10:01:25 +00:00
Stenzek 08faba5455 x86/microVU: Add tracing similar to EE
Can dump per-block or per-instruction, useful for debugging regressions.
2022-12-29 10:01:25 +00:00
lightningterror c1e92b594e Qt: Move around tooltips where the majority of bulk is. 2022-12-29 09:47:42 +01:00
lightningterror d38147bcf2 Qt: Allow to run bilinear filtering with integer scaling. 2022-12-29 09:47:42 +01:00
Mrlinkwii 8681eb0251 CI : remove mention to wxWidgets in MAC build-dependencies 2022-12-29 09:37:40 +01:00
refractionpcsx2 72ecb0fce3 VIF: use outer cast in VU cycle checks 2022-12-29 04:43:12 +00:00
refractionpcsx2 17b052430b USB: Limit microphone lower latency to 1ms 2022-12-29 03:24:39 +00:00
refractionpcsx2 94d52d9ddb GameDB: Add HW mode fixes for Princess Maker 2 2022-12-29 00:33:34 +00:00
JordanTheToaster 9ecaa46eb8 GameDB: Add VU1 Rounding to Hitman Contracts
Adds vu1 nearest rounding to Hitman Contracts to fix missing light cones curtains and certain effects.
2022-12-28 22:46:18 +00:00
refractionpcsx2 a10b0c5dc5 VIF: Make sure VU's are updated when waiting 2022-12-28 19:08:18 +00:00
Stenzek 4242201777 GameDB: Add nearest VU1 rounding to Destruction Derby Arenas 2022-12-28 16:36:36 +00:00
Stenzek ff82232e27 Config: Add separate VU0/VU1 round/clamp mode options 2022-12-28 16:36:36 +00:00
refractionpcsx2 5ee0565342 VM: Only load patches if game is loading. 2022-12-28 14:42:45 +00:00
refractionpcsx2 483e2236ca GameDB: Add Ratchet & Clank 2 Megaturrent Dynapatch 2022-12-28 13:55:26 +00:00
refractionpcsx2 7ee62b8222 GameDB/Patching: Add dynamic EE JIT patching 2022-12-28 13:55:26 +00:00
refractionpcsx2 74c14fdf66 GameDB: Add fixes for Robin Hood 2 - The Siege 2022-12-28 11:10:59 +00:00
Stenzek 8a34c4b2e2 Common: Remove mt_queue.h
More stuff from wx.
2022-12-28 11:02:53 +00:00
Stenzek b1dcd53212 Qt: Merge old wxResources.rc (icon) into PCSX2.rc 2022-12-28 11:02:53 +00:00
Stenzek 4d1671f147 USB: Use map lookup instead of advance 2022-12-28 11:02:53 +00:00
Stenzek deedc5d79f Updater: Fix incorrect identifier in manifest 2022-12-28 11:02:53 +00:00
Stenzek 02dc164611 SPU2: Move files from host into main directory
And get rid of the questionable WavFile.
2022-12-28 11:02:53 +00:00
Stenzek de7bbd6c37 Common: Add WAVWriter
To replace WAVFile with a questionable license history.
2022-12-28 11:02:53 +00:00
Stenzek ddf66056ec PAD: Remove Gamepad.h
Declarations were incompatible with Qt anyway.
2022-12-28 11:02:53 +00:00
Stenzek f0a7c41b81 Misc: Remove last remnants of DISABLE_RECORDING 2022-12-28 11:02:53 +00:00
Stenzek cb200f6e9e SPU2: Remove some now-unused functions 2022-12-28 11:02:53 +00:00
Stenzek 78a66147f1 GSDevice: Ignore -Wignored-qualifiers for CAS
warning: 'restrict' type qualifier on return type has no effect [-Wignored-qualifiers]
2022-12-28 11:02:53 +00:00
Stenzek 5999a1a62e D3D12/Texture: Fix crash when upload buffer exhausts 2022-12-28 10:58:37 +00:00
refractionpcsx2 ab56cfe762 Minor update to main site technical notes. 2022-12-27 16:31:56 +00:00
Florin9doi 654c501fb8 Github: Update issue templates 2022-12-27 16:28:17 +00:00
refractionpcsx2 227c2563c5 GS-HW: Disable texture mapping if not required 2022-12-27 01:38:50 +00:00
refractionpcsx2 4b270e703e GS-HW: Put black draws through blending if Alpha Blend enabled 2022-12-27 01:38:50 +00:00
refractionpcsx2 5bc3b4bf7d GS-HW: On memory clear with alpha blend, check if output colour is black 2022-12-27 01:38:50 +00:00
Connor McLaughlin 353124d82d GS-HW: Make memory clear work for Burnout 3 2022-12-27 01:38:50 +00:00
refractionpcsx2 15a82e2324 GS-HW: Handle clears with single page width better + use vert color 2022-12-27 01:38:50 +00:00
PCSX2 Bot 2b85f96406 PAD: Update to latest controller database. 2022-12-26 20:44:27 +01:00
refractionpcsx2 8d408eaadb UI: Fix selected tab from hotkeys menu shortcut 2022-12-26 15:11:20 +00:00
Stenzek 51f29f40ee USB: Fix loading old states without USB.bin 2022-12-26 14:56:09 +00:00
Florin9doi 72d6ff625c GameDB: Update Utility Disc names 2022-12-26 14:53:33 +00:00
refractionpcsx2 b1766779ee UI: Fix GT Force wheel image 2022-12-26 14:37:37 +00:00
Stenzek a42143690c USB: Only update when devices plugged 2022-12-26 05:07:05 +00:00
Florin9doi c21df3b7f0 Pad: DInput: Fix incorrect Dpad labels 2022-12-26 04:53:35 +00:00
Stenzek a8faf2eb6e SaveState: Partial migration to StateWrapper for USB 2022-12-26 04:26:21 +00:00
refractionpcsx2 8abe5b42e5 GS-HW: Adjust Yakuza CRC hack to remove weird shadow 2022-12-26 03:53:02 +00:00
autofire372 3cfc4cd5be Qt: Allow editing the cheats directory.
Feature parity with the now-gone wx.
2022-12-25 18:28:17 +00:00
Mrlinkwii 661d22f46c 3rdparty: Update svn readme. (#7685) 2022-12-25 15:23:56 +01:00
Stenzek 1f40302b36 GS: Remove GS.rc/resource.h references 2022-12-25 14:47:05 +01:00
Stenzek dff6d1843a Misc: Remove more wxWidgets references 2022-12-25 14:47:05 +01:00
Stenzek 07b7420ba5 vsprops: Remove a wx reference 2022-12-25 14:47:05 +01:00
Stenzek 43afeb205f Common: Get rid of pxTrap()
wx rubbish, no longer needed
2022-12-25 14:47:05 +01:00
Stenzek 6aeca2c1e3 GSRunner: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek 30b1129d60 Dump: Remove unused routines
Sounds like these have been broken for some time, and I added new
dumping functions with the EErec refactor anyway.
2022-12-25 09:27:44 +00:00
Stenzek 8e0e4cf25d 3rdparty: Error fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek 7aa3322a04 Qt: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek 07789f5dad Core: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek a1ffe4deff x86: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek f407bc12df SPU2: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek 4df5c9e1e1 USB: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek a2abe49d3f GS: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
TellowKrinkle b0e911ad7f GS: Work around clang-cl issues
"error: inheritance model does not match definition" really means "Classes with virtual methods need to be compiled differently from those without in ms-abi, and you declared a pointer to member function, which needs to know what type of pointer to use, before clang knew about any virtual methods, so it guessed the wrong type".
2022-12-25 09:27:44 +00:00
Stenzek 3bb6eb16de Frontend: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek a978abb523 DEV9: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek c4345f9a85 CDVD: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek ca92d4ea3d Common: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
arcum42 5c95a6f4fa NTFS: Disable the NTFS checkbox on the platforms that don't have NTFS compression, not the one that does. 2022-12-25 07:48:20 +00:00
JordanTheToaster dfb0246826 GameDB: Add Mipmapping to Eragon
Adds mipmapping full trilinear PS2 and HPO Special to Eragon to fix up the rather terrible looking image quality.
2022-12-25 05:55:52 +00:00
Mrlinkwii 791bf2c52e Labeler: remove GUI/WX in auto labeler. (#7676) 2022-12-25 03:24:42 +01:00
Mrlinkwii 18bdf4a8d0 README:update Technical Notes 2022-12-24 17:02:19 +00:00
Ziemas af789a4f8d Add missing <cassert> include 2022-12-24 16:35:43 +00:00
arcum42 30a2675972 Windows: Update CMakelists.txt. 2022-12-24 16:35:31 +00:00
arcum42 5539fe0b73 windows: remove Win32.h 2022-12-24 16:35:31 +00:00
Chromaryu 30504660fa Translation: Add translation notation for all translatable strings 2022-12-24 14:42:20 +01:00
arcum42 00d06db90e build: Get rid of the no-trans flag, and the freetype related function. 2022-12-24 05:31:10 -08:00
arcum42 108a0d0ce6 build: Don't try to install a non-existant file. 2022-12-24 05:31:10 -08:00
arcum42 1bff48cbf9 GS: Get rid of the last two places the now non-existant s_dump_root variable was used. 2022-12-24 05:31:10 -08:00
arcum42 c91cbebc9f build: Remove gtk2 and qt6 options from build.sh. 2022-12-24 05:31:10 -08:00
Mrlinkwii 305df89438 locale: purge wx locale files 2022-12-24 13:51:37 +01:00
Stenzek 42eb289d97 Config: Remove Pcsx2Config::CopyConfig()
Was only needed for wx.
2022-12-24 09:41:06 +00:00
Stenzek b8596c6f2a Tools: Remove bin2cpp
Stragglers from wx...
2022-12-24 09:41:06 +00:00
Stenzek 8696812d23 3rdparty: Remove pthreads4w 2022-12-24 08:42:23 +00:00
Stenzek 70cd26ce6a 3rdparty: Remove wxwidgets 2022-12-24 08:42:23 +00:00
Stenzek 2b99f3c753 pcsx2-wx: Finally remove it all 2022-12-24 08:42:23 +00:00
Stenzek 96a1c77577 Core: Remove PCSX2_CORE define and leftovers from wx 2022-12-24 08:42:23 +00:00
Stenzek 9a3e7eecd9 CMake: Remove all references to wx 2022-12-24 08:42:23 +00:00
Stenzek 7cb22815e6 CI: Remove wx builds 2022-12-24 07:59:22 +00:00
Stenzek da2efd88f2 CMake: Default QT_BUILD to on 2022-12-24 07:59:22 +00:00
Ty Lamontagne 2f0b244f48 Debugger: Initial debugger implementation 2022-12-24 07:21:49 +00:00
Ty Lamontagne 78c9b7f33e Debugger Core: Initial QT core work
Revert 3ce242886b (Disabled force symbol loading) until solution is found

If this isn't caught when the game is loaded, the symbols will not be properly loaded while the game is running.

DisassemblyManager: Don't spin continuously if the guest CPU is dead
2022-12-24 07:21:49 +00:00
Stenzek 9f461253a8 Qt: Fix relative directories not being canonicalized 2022-12-24 04:37:51 +00:00
Stenzek a3d02b8702 Qt: Add debug options panel 2022-12-24 04:37:51 +00:00
Stenzek 8dcda63c85 GS: Get rid of hardcoded dump directory 2022-12-24 04:37:51 +00:00
Stenzek 35e28fc0d0 GS: Get rid of GSApp for Qt 2022-12-24 04:37:51 +00:00
Connor McLaughlin 72fd5211f0 USB: Fix building without cubeb 2022-12-24 04:25:29 +00:00
Connor McLaughlin 690d4fa4b1 FullscreenUI: Add USB to controller settings 2022-12-24 04:25:29 +00:00
Connor McLaughlin c477ea1628 USB: Change SubTypes() to use a span 2022-12-24 04:25:29 +00:00
Mrlinkwii 9837dc88a0 GameDB: upscaling fixes for Captain Tsubasa and update docs 2022-12-24 01:22:32 +00:00
2870 changed files with 79945 additions and 817957 deletions
+10 -7
View File
@@ -20,11 +20,14 @@ body:
### Please Avoid Issues Pertaining to the Following:
- We are **not** accepting bug reports for **PSX mode** at this time
- If you are interested in helping contribute to PSX mode please do so on the forums. Otherwise our recommendation is that you use a [proper PSX emulator](https://emulation.gametechwiki.com/index.php/PlayStation_emulators)
- If you are interested in helping contribute to PSX mode please do so on the forums. Otherwise our recommendation is that you use [Duckstation](https://github.com/stenzek/duckstation/releases/tag/latest)
- We do **not** accept issues relating to **upscaling** at this time
- We are aware of the various problems with upscaling. The issue spans many games and having hundreds of issues for the same fundamental issues isn't particularly helpful. There are several workarounds for graphical problems that come as a result of upscaling
- Please try your game at native resolution before creating an issue
- If your bug is the result of upscaling please use the forums or discord for assistance with various upscaling workarounds. Additionally, the unofficial PCSX2 [Wiki](https://wiki.pcsx2.net/Main_Page) often lists various fixes for upscaling issues
- We do **not** accept issues relating to Widescreen/no-interlace patches at this time
- Any issues pertaining to Widescreen/no-interlace patches please forward them to the [patches repository](https://github.com/PCSX2/pcsx2_patches).
- type: textarea
id: desc
attributes:
@@ -61,12 +64,12 @@ body:
options:
- Windows 11
- Windows 10 (64bit)
- Windows 8.1 (64bit)
- Linux (64bit) - Specify Distro Below
- macOS (Monteray)
- macOS (BigSur)
- macOS (Catalina)
- macOS (Mojave)
- Linux (64bit) - Specify distro below
- macOS 13 (Ventura)
- macOS 12 (Monterey)
- macOS 11 (Big Sur)
- macOS 10.15 (Catalina)
- macOS 10.14 (Mojave)
validations:
required: true
- type: input
+6 -6
View File
@@ -76,12 +76,12 @@ body:
options:
- Windows 11
- Windows 10 (64bit)
- Windows 8.1 (64bit)
- Linux (64bit) - Specify Distro Below
- macOS (Monteray)
- macOS (BigSur)
- macOS (Catalina)
- macOS (Mojave)
- Linux (64bit) - Specify distro below
- macOS 13 (Ventura)
- macOS 12 (Monterey)
- macOS 11 (Big Sur)
- macOS 10.15 (Catalina)
- macOS 10.14 (Mojave)
validations:
required: true
- type: input
+18 -14
View File
@@ -23,14 +23,6 @@
- '**/*.md'
- '*.pdf'
- '**/*.pdf'
'GUI/WX':
- 'pcsx2/gui/*'
- 'pcsx2/gui/**/*'
- 'pcsx2/SPU2/wx/*'
- 'pcsx2/SPU2/wx/**/*'
- 'pcsx2/PAD/Linux/wx_dialog/*'
- 'pcsx2/PAD/Linux/wx_dialog/**/*'
- 'pcsx2/GS/Window/GSwxDialog.h'
'GUI/Qt':
- 'pcsx2-qt/*'
- 'pcsx2-qt/**/*'
@@ -40,6 +32,8 @@
- '**/GameIndex.*'
'Installer | Package':
- 'build.sh'
'Translations':
- 'pcsx2-qt/Translations/*'
# Tools / Features
'Debugger':
@@ -53,6 +47,9 @@
'TAS Functionality':
- 'pcsx2/Recording/*'
- 'pcsx2/Recording/**/*'
'RetroAchievements':
- 'pcsx2/Frontend/Achievements.*'
- 'pcsx2/Achievements.*'
# Emulation Components
'Counters':
@@ -72,21 +69,31 @@
'GS':
- 'pcsx2/GS/*'
- 'pcsx2/GS/**/*'
- 'bin/resources/shaders/*'
- 'bin/resources/shaders/**/*'
'GS: Direct3D 11':
- 'pcsx2/GS/Renderers/DX11/*'
- 'pcsx2/GS/Renderers/DX11/**/*'
- 'bin/resources/shaders/dx11/*'
- 'bin/resources/shaders/dx11/**/*'
'GS: Direct3D 12':
- 'pcsx2/GS/Renderers/DX12/*'
- 'pcsx2/GS/Renderers/DX12/**/*'
- 'bin/resources/shaders/dx11/*'
- 'bin/resources/shaders/dx11/**/*'
'GS: Hardware':
- 'pcsx2/GS/Renderers/HW/*'
- 'pcsx2/GS/Renderers/HW/**/*'
'GS: OpenGL':
- 'pcsx2/GS/Renderers/OpenGL/*'
- 'pcsx2/GS/Renderers/OpenGL/**/*'
- 'bin/resources/shaders/opengl/*'
- 'bin/resources/shaders/opengl/**/*'
'GS: Vulkan':
- 'pcsx2/GS/Renderers/Vulkan/*'
- 'pcsx2/GS/Renderers/Vulkan/**/*'
- 'bin/resources/shaders/vulkan/*'
- 'bin/resources/shaders/vulkan/**/*'
'GS: Metal':
- 'pcsx2/GS/Renderers/Metal/*'
- 'pcsx2/GS/Renderers/Metal/**/*'
@@ -110,12 +117,9 @@
'Memory Card':
- 'pcsx2/gui/MemoryCard*'
- 'pcsx2/gui/**/MemoryCard*'
'PAD: Linux/Mac':
- 'pcsx2/PAD/Linux/*'
- 'pcsx2/PAD/Linux/**/*'
'PAD: Windows':
- 'pcsx2/PAD/Windows/*'
- 'pcsx2/PAD/Windows/**/*'
'PAD':
- 'pcsx2/PAD/*'
- 'pcsx2/PAD/**/*'
'SPU2':
- 'pcsx2/SPU2/*'
- 'pcsx2/SPU2/**/*'
+2 -56
View File
@@ -9,66 +9,12 @@ on:
- master
jobs:
build_gcc_lto:
name: "GCC"
uses: ./.github/workflows/linux_build_wx.yml
with:
jobName: "with LTO"
compiler: gcc
cmakeflags: "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON"
buildAppImage: true
secrets: inherit
# (PCH conflicts with ccache, fixed by https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4400)
build_gcc_nopch:
name: "GCC"
uses: ./.github/workflows/linux_build_wx.yml
with:
jobName: "No PCH"
compiler: gcc
cmakeflags: "-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON"
detail: " nopch"
secrets: inherit
build_gcc_nopch_avx2:
name: "GCC"
uses: ./.github/workflows/linux_build_wx.yml
with:
jobName: "AVX2 and No PCH"
compiler: gcc
cmakeflags: "-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON -DARCH_FLAG=-march=haswell"
detail: " avx2 nopch"
secrets: inherit
build_clang_nopch:
name: "Clang"
uses: ./.github/workflows/linux_build_wx.yml
with:
jobName: "No PCH"
compiler: clang
cmakeflags: ""
detail: " nopch"
secrets: inherit
build_linux_qt_sse4:
build_linux_qt:
name: "AppImage"
uses: ./.github/workflows/linux_build_qt.yml
with:
jobName: "Qt SSE4"
jobName: "Qt"
compiler: clang
cmakeflags: ""
simd: "SSE4"
buildAppImage: true
secrets: inherit
build_linux_qt_avx2:
name: "AppImage"
uses: ./.github/workflows/linux_build_qt.yml
with:
jobName: "Qt AVX2"
detail: ""
compiler: clang
cmakeflags: "-DARCH_FLAG=-march=haswell"
simd: "AVX2"
buildAppImage: true
secrets: inherit
+3 -9
View File
@@ -28,10 +28,6 @@ on:
required: false
type: string
default: ""
simd:
required: false
type: string
default: ""
cheats_url:
required: false
type: string
@@ -63,7 +59,6 @@ jobs:
OS: linux
GUI_FRAMEWORK: QT
ARCH: ${{ inputs.platform }}
SIMD: ${{ inputs.simd }}
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUM: ${{ github.event.pull_request.number }}
@@ -79,8 +74,8 @@ jobs:
uses: actions/cache@v3
with:
path: .ccache
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} ${{ inputs.simd }} ${{ inputs.detail }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} ${{ inputs.simd }} ${{ inputs.detail }} ccache
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} ${{ inputs.detail }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} ${{ inputs.detail }} ccache
- name: Install Packages
env:
@@ -122,8 +117,7 @@ jobs:
env:
NAME: ${{ steps.artifact-metadata.outputs.artifact-name }}
run: |
ninja -C build install
.github/workflows/scripts/linux/appimage-qt.sh "$(realpath .)" "$HOME/deps" "$NAME"
.github/workflows/scripts/linux/appimage-qt.sh "$(realpath .)" "$(realpath ./build)" "$HOME/deps" "$NAME"
mkdir -p "$GITHUB_WORKSPACE"/ci-artifacts/
mv "${NAME}.AppImage" "$GITHUB_WORKSPACE"/ci-artifacts/
-152
View File
@@ -1,152 +0,0 @@
name: Linux Build Steps
on:
workflow_call:
inputs:
jobName:
required: true
type: string
os:
required: false
type: string
default: ubuntu-20.04
platform:
required: false
type: string
default: x64
compiler:
required: true
type: string
cmakeflags:
required: true
type: string
buildAppImage:
required: false
type: boolean
default: false
detail:
required: false
type: string
default: ""
cheats_url:
required: false
type: string
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
jobs:
build_linux:
name: ${{ inputs.jobName }}
runs-on: ${{ inputs.os }}
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
timeout-minutes: 60
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 9
CCACHE_MAXSIZE: 100M
SDL: SDL2-2.26.0
PATCHELF_VERSION: 0.12
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
OS: linux
GUI_FRAMEWORK: wxWidgets
ARCH: ${{ inputs.platform }}
SIMD: ''
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUM: ${{ github.event.pull_request.number }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
run: ./.github/workflows/scripts/common/name-artifacts.sh
# -- SETUP CCACHE - https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
run: echo "timestamp=$(date -u "+%Y-%m-%d-%H;%M;%S")" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
path: .ccache
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }}${{ inputs.detail }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }}${{ inputs.detail }} ccache
- name: Install Packages
env:
PLATFORM: ${{ inputs.platform }}
COMPILER: ${{ inputs.compiler }}
run: .github/workflows/scripts/linux/install-packages.sh
- name: Cache Dependencies
uses: actions/cache@v3
with:
path: |
3rdparty/${{ env.SDL }}
3rdparty/patchelf-${{ env.PATCHELF_VERSION }}
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ env.SDL }} patchelf-${{ env.PATCHELF_VERSION }}
- name: Build Dependencies
run: |
if [[ ! -e 3rdparty/patchelf-${{ env.PATCHELF_VERSION }} ]]; then
curl -sSfL https://github.com/NixOS/patchelf/releases/download/${{ env.PATCHELF_VERSION }}/patchelf-${{ env.PATCHELF_VERSION }}.tar.bz2 | tar -xjC 3rdparty
mv 3rdparty/patchelf-${{ env.PATCHELF_VERSION }}* 3rdparty/patchelf-${{ env.PATCHELF_VERSION }}
cd 3rdparty/patchelf-${{ env.PATCHELF_VERSION }}
./configure
make && cd ../../
fi
sudo make -C 3rdparty/patchelf-${{ env.PATCHELF_VERSION }} install
if [[ ! -e 3rdparty/${{ env.SDL }} ]]; then
curl -sL https://libsdl.org/release/${{ env.SDL }}.tar.gz | tar -xzC 3rdparty
cd 3rdparty/${{ env.SDL }}
if [ "${{ inputs.platform }}" == "x86" ]; then
./configure --build=i686-pc-linux-gnu CC=${{ inputs.compiler }} CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 --prefix=/usr --libdir=/usr/lib/i386-linux-gnu
else
./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
fi
make -j $(getconf _NPROCESSORS_ONLN) && cd ../../
fi
sudo make -C 3rdparty/${{ env.SDL }} install
- name: Download cheats
run: |
cd bin/resources
aria2c -Z "${{ inputs.cheats_url }}/cheats_ni.zip" "${{ inputs.cheats_url }}/cheats_ws.zip"
- name: Generate CMake
env:
PLATFORM: ${{ inputs.platform }}
COMPILER: ${{ inputs.compiler }}
ADDITIONAL_CMAKE_ARGS: ${{ inputs.cmakeflags }}
run: .github/workflows/scripts/linux/generate-cmake.sh
- name: Build PCSX2
working-directory: build
run: ../.github/workflows/scripts/linux/compile.sh
- name: Run Tests
working-directory: ./build
run: ninja unittests
- name: Package AppImage
if: inputs.buildAppImage == true
env:
PLATFORM: ${{ inputs.platform }}
COMPILER: ${{ inputs.compiler }}
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
run: .github/workflows/scripts/linux/appimage.sh
- name: Upload artifact
if: inputs.buildAppImage == true
uses: actions/upload-artifact@v3
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: ci-artifacts
+4 -6
View File
@@ -49,7 +49,6 @@ jobs:
OS: macos
GUI_FRAMEWORK: ${{ inputs.gui }}
ARCH: ${{ inputs.platform }}
SIMD: ''
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUM: ${{ github.event.pull_request.number }}
@@ -102,10 +101,8 @@ jobs:
- name: Generate CMake Files
run: |
QT_BUILD=$([ "${{ inputs.gui }}" == "Qt" ] && echo "ON" || echo "OFF")
cmake -DCMAKE_PREFIX_PATH="$HOME/deps" \
-DCMAKE_BUILD_TYPE=Release \
-DQT_BUILD="$QT_BUILD" \
-DUSE_OPENGL=OFF \
-DDISABLE_ADVANCE_SIMD=ON \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
@@ -133,6 +130,7 @@ jobs:
done
- name: Run Tests
if: inputs.gui == 'Qt'
working-directory: build
run: make -j$(getconf _NPROCESSORS_ONLN) unittests
@@ -146,12 +144,12 @@ jobs:
APPNAME="PCSX2-$TAG"
fi
mv build/pcsx2*/PCSX2.app "$APPNAME.app"
tar cvzf "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.gz" "$APPNAME.app"
tar --options xz:compression-level=9 -cvJf "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.xz" "$APPNAME.app"
mkdir ci-artifacts
cp "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.gz" ci-artifacts/macOS-${{ inputs.gui }}.tar.gz
cp "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.xz" ci-artifacts/macOS-${{ inputs.gui }}.tar.xz
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: "*.tar.gz"
path: "*.tar.xz"
-7
View File
@@ -9,13 +9,6 @@ on:
- master
jobs:
build_macos_wx:
name: "Defaults"
uses: ./.github/workflows/macos_build.yml
with:
jobName: "wxWidgets"
gui: "wxWidgets"
secrets: inherit
build_macos_qt:
name: "Defaults"
uses: ./.github/workflows/macos_build.yml
+9 -76
View File
@@ -8,91 +8,30 @@ on:
jobs:
# Build Everything
# Linux
build_gcc_lto:
build_linux_qt:
if: github.repository == 'PCSX2/pcsx2'
name: "Linux - AppImage"
uses: ./.github/workflows/linux_build_wx.yml
with:
jobName: "wxWidgets"
compiler: gcc
cmakeflags: "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON"
buildAppImage: true
secrets: inherit
build_linux_qt_sse4:
if: github.repository == 'PCSX2/pcsx2'
name: "Linux - AppImage SSE4"
name: "Linux"
uses: ./.github/workflows/linux_build_qt.yml
with:
jobName: "Qt"
compiler: clang
cmakeflags: ""
simd: "SSE4"
buildAppImage: true
secrets: inherit
build_linux_qt_avx2:
if: github.repository == 'PCSX2/pcsx2'
name: "Linux - AppImage AVX2"
uses: ./.github/workflows/linux_build_qt.yml
with:
jobName: "Qt"
detail: ""
compiler: clang
cmakeflags: "-DARCH_FLAG=-march=haswell"
simd: "AVX2"
buildAppImage: true
secrets: inherit
# Windows
build_wx_sse4:
build_windows_qt:
if: github.repository == 'PCSX2/pcsx2'
name: "Windows - SSE4"
uses: ./.github/workflows/windows_build_wx.yml
with:
jobName: wxWidgets
configuration: Release
simd: "SSE4"
secrets: inherit
build_wx_avx2:
if: github.repository == 'PCSX2/pcsx2'
name: "Windows - AVX2"
uses: ./.github/workflows/windows_build_wx.yml
with:
jobName: wxWidgets
configuration: Release AVX2
secrets: inherit
build_qt_sse4:
if: github.repository == 'PCSX2/pcsx2'
name: "Windows - SSE4"
name: "Windows"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt
configuration: Release
simd: "SSE4"
secrets: inherit
build_qt_avx2:
if: github.repository == 'PCSX2/pcsx2'
name: "Windows - AVX2"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt
configuration: Release AVX2
configuration: CMake
buildSystem: cmake
cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
secrets: inherit
# MacOS
build_macos_wx:
if: github.repository == 'PCSX2/pcsx2'
name: "MacOS"
uses: ./.github/workflows/macos_build.yml
with:
jobName: "wxWidgets"
gui: "wxWidgets"
secrets: inherit
build_macos_qt:
if: github.repository == 'PCSX2/pcsx2'
name: "MacOS"
@@ -106,14 +45,8 @@ jobs:
upload_artifacts:
if: github.repository == 'PCSX2/pcsx2'
needs:
- build_gcc_lto
- build_linux_qt_sse4
- build_linux_qt_avx2
- build_wx_sse4
- build_wx_avx2
- build_qt_sse4
- build_qt_avx2
- build_macos_wx
- build_linux_qt
- build_windows_qt
- build_macos_qt
name: "Upload Artifacts"
runs-on: ubuntu-latest
@@ -21,7 +21,7 @@ NAME=""
if [ "${OS}" == "macos" ]; then
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}"
elif [[ ("${OS}" == "windows" && "$BUILD_SYSTEM" != "cmake") || ("$OS" == "linux" && "$GUI_FRAMEWORK" == "QT") ]]; then
elif [[ ("${OS}" == "windows" && "$BUILD_SYSTEM" != "cmake") ]]; then
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}-${ARCH}-${SIMD}"
else
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}-${ARCH}"
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash
$APPDIR/AppRun-patched "$@"
@@ -1,16 +0,0 @@
#!/bin/bash
export LD_LIBRARY_PATH="$APPDIR/usr/lib:$LD_LIBRARY_PATH"
# use system wayland if available otherwise use the appimage provided wayland
if [[ $(ldconfig -p | grep libwayland-client | wc -l) -lt 1 ]]; then
export LD_LIBRARY_PATH="$APPDIR/usr/lib/wayland:$LD_LIBRARY_PATH"
fi
export BINARY_NAME=$(basename "$ARGV0")
if [[ ! -e "$PWD/$BINARY_NAME.config" ]]; then
mkdir "$PWD/$BINARY_NAME.config"
fi
export XDG_CONFIG_HOME="$PWD/$BINARY_NAME.config"
mkdir -p "$HOME"/.local/share/icons/hicolor/scalable/apps && cp "$APPDIR"/PCSX2.png "$HOME"/.local/share/icons/hicolor/scalable/apps
+13 -14
View File
@@ -25,16 +25,18 @@
#
# For more information, please refer to <http://unlicense.org/>
if [ "$#" -ne 3 ]; then
echo "Syntax: $0 <path to PCSX2 directory> <deps prefix> <output name>"
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
source "$SCRIPTDIR/functions.sh"
if [ "$#" -ne 4 ]; then
echo "Syntax: $0 <path to pcsx2 directory> <path to build directory> <deps prefix> <output name>"
exit 1
fi
PCSX2DIR=$1
DEPSDIR=$2
NAME=$3
BINDIR="$PCSX2DIR/bin"
BUILDDIR=$2
DEPSDIR=$3
NAME=$4
BINARY=pcsx2-qt
APPDIRNAME=PCSX2.AppDir
@@ -191,7 +193,7 @@ declare -a QTPLUGINS=(
set -e
if [ ! -f appimagetool-x86_64.AppImage ]; then
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
retry_command wget -O appimagetool-x86_64.AppImage https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
fi
@@ -199,14 +201,10 @@ OUTDIR=$(realpath "./$APPDIRNAME")
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
rm -fr "$OUTDIR"
mkdir "$OUTDIR"
mkdir -p "$OUTDIR/usr/bin" "$OUTDIR/usr/lib" "$OUTDIR/usr/lib/pulseaudio"
mkdir "$OUTDIR/usr"
echo "Copying binary and resources..."
cp -a "$BINDIR/$BINARY" "$BINDIR/resources" "$OUTDIR/usr/bin"
# Don't need old wx locales.
rm -fr "$OUTDIR/usr/bin/resources/locale"
cp -a "$BUILDDIR/bin" "$OUTDIR/usr"
# Patch RPATH so the binary goes hunting for shared libraries in the AppDir instead of system.
echo "Patching RPATH in ${BINARY}..."
@@ -217,6 +215,7 @@ patchelf --set-rpath '$ORIGIN/../lib' "$OUTDIR/usr/bin/$BINARY"
# Libraries we pull in from the system.
echo "Copying system libraries..."
mkdir -p "$OUTDIR/usr/lib" "$OUTDIR/usr/lib/pulseaudio"
for lib in "${SYSLIBS[@]}"; do
blib=$(basename "$lib")
if [ -f "/lib/x86_64-linux-gnu/$lib" ]; then
@@ -283,7 +282,7 @@ Plugins = ../lib/plugins
EOF
echo "Copy desktop/icon..."
cp "$PCSX2DIR/pcsx2/gui/Resources/AppIcon64.png" "$OUTDIR/PCSX2.png"
cp "$PCSX2DIR/pcsx2/Resources/AppIcon64.png" "$OUTDIR/PCSX2.png"
cp "$SCRIPTDIR/pcsx2-qt.desktop" "$OUTDIR/PCSX2.desktop"
cp "$SCRIPTDIR/AppRun-qt" "$OUTDIR/AppRun"
@@ -1,66 +0,0 @@
#!/bin/bash
set -ex
echo "${PLATFORM}"
if [ "${PLATFORM}" == "x86" ]; then
APPARCH="i686"
ARCH="i386"
LIBARCH="i386-linux-gnu"
else
APPARCH="x86_64"
ARCH="x86_64"
LIBARCH="x86_64-linux-gnu"
fi
cd /tmp
curl -sSfLO "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-$ARCH.AppImage"
chmod a+x linuxdeploy*.AppImage
./linuxdeploy-"$ARCH".AppImage --appimage-extract
curl -sSfL "https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh" -o /tmp/squashfs-root/usr/bin/linuxdeploy-plugin-gtk.sh
chmod a+x /tmp/squashfs-root/usr/bin/linuxdeploy-plugin-gtk.sh
mv /tmp/squashfs-root/usr/bin/patchelf /tmp/squashfs-root/usr/bin/patchelf.orig
sudo cp /usr/local/bin/patchelf /tmp/squashfs-root/usr/bin/patchelf
cd "$GITHUB_WORKSPACE"
ninja -C build install
cp ./pcsx2/gui/Resources/AppIcon64.png ./squashfs-root/PCSX2.png
cp ./linux_various/PCSX2.desktop.in ./squashfs-root/PCSX2.desktop
sed -i -e 's|Categories=@PCSX2_MENU_CATEGORIES@|Categories=Game;Emulator;|g' ./squashfs-root/PCSX2.desktop
sed -i -e 's|__GL_THREADED_OPTIMIZATIONS=1|__GL_THREADED_OPTIMIZATIONS=0|g' ./squashfs-root/PCSX2.desktop
curl -sSfL "https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-$APPARCH" -o ./squashfs-root/runtime
mkdir -p squashfs-root/usr/share/applications && cp ./squashfs-root/PCSX2.desktop ./squashfs-root/usr/share/applications
mkdir -p squashfs-root/usr/share/icons && cp ./squashfs-root/PCSX2.png ./squashfs-root/usr/share/icons
mkdir -p squashfs-root/usr/share/icons/hicolor/scalable/apps && cp ./squashfs-root/PCSX2.png ./squashfs-root/usr/share/icons/hicolor/scalable/apps
mkdir -p squashfs-root/usr/share/pixmaps && cp ./squashfs-root/PCSX2.png ./squashfs-root/usr/share/pixmaps
mkdir -p squashfs-root/usr/lib/
mkdir -p squashfs-root/usr/optional/libstdc++
mkdir -p squashfs-root/usr/optional/libgcc_s
cp ./.github/workflows/scripts/linux/AppRun "$GITHUB_WORKSPACE"/squashfs-root/AppRun
curl -sSfL "https://github.com/PCSX2/appimage-checkrt-branch/releases/download/AppImage-checkrt/AppRun_patched" -o "$GITHUB_WORKSPACE"/squashfs-root/AppRun-patched
curl -sSfL "https://github.com/PCSX2/appimage-checkrt-branch/releases/download/AppImage-checkrt/exec.so" -o "$GITHUB_WORKSPACE"/squashfs-root/usr/optional/exec.so
chmod a+x ./squashfs-root/AppRun
chmod a+x ./squashfs-root/runtime
chmod a+x ./squashfs-root/AppRun-patched
chmod a+x ./squashfs-root/usr/optional/exec.so
echo "$name" > "$GITHUB_WORKSPACE"/squashfs-root/version.txt
mkdir -p "$GITHUB_WORKSPACE"/squashfs-root/apprun-hooks
cp /usr/lib/$LIBARCH/libthai.so.0 "$GITHUB_WORKSPACE"/squashfs-root/usr/lib/
cp --dereference /usr/lib/"$LIBARCH"/libstdc++.so.6 "$GITHUB_WORKSPACE"/squashfs-root/usr/optional/libstdc++/libstdc++.so.6
cp --dereference /lib/"$LIBARCH"/libgcc_s.so.1 "$GITHUB_WORKSPACE"/squashfs-root/usr/optional/libgcc_s/libgcc_s.so.1
chmod +x .github/workflows/scripts/linux/app-variables.sh
cp .github/workflows/scripts/linux/app-variables.sh "$GITHUB_WORKSPACE"/squashfs-root/apprun-hooks
export UPD_INFO="gh-releases-zsync|PCSX2|pcsx2|latest|$name.AppImage.zsync"
/tmp/squashfs-root/AppRun --appdir="$GITHUB_WORKSPACE"/squashfs-root/ --plugin gtk -d "$GITHUB_WORKSPACE"/squashfs-root/PCSX2.desktop -i "$GITHUB_WORKSPACE"/squashfs-root/PCSX2.png
# see LD_LIBRARY_PATH in app-variables.sh - the intent is to use system wayland if available but fall back to app-image provided
# a little bit hacky but should ensure maximum compatibility
mkdir -p squashfs-root/usr/lib/wayland
mv squashfs-root/usr/lib/libwayland-* squashfs-root/usr/lib/wayland
rm squashfs-root/usr/lib/libgmodule-2.0.so.0
curl -sSfL "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$ARCH.AppImage" -o ./appimagetool-"$ARCH".AppImage
chmod a+x appimagetool*.AppImage
./appimagetool-"$ARCH".AppImage "$GITHUB_WORKSPACE"/squashfs-root "$name.AppImage"
mkdir -p "$GITHUB_WORKSPACE"/ci-artifacts/
ls -al .
mv "$name.AppImage" "$GITHUB_WORKSPACE"/ci-artifacts # && mv "$name.AppImage.zsync" "$GITHUB_WORKSPACE"/ci-artifacts
chmod -R 777 ./ci-artifacts
cd ./ci-artifacts
ls -al .
@@ -4,23 +4,26 @@ set -e
INSTALLDIR="$HOME/deps"
NPROCS="$(getconf _NPROCESSORS_ONLN)"
SDL=SDL2-2.26.0
QT=6.3.1
SDL=SDL2-2.26.4
QT=6.4.3
LIBBACKTRACE=ad106d5fdd5d960bd33fae1c48a351af567fd075
mkdir -p deps-build
cd deps-build
cat > SHASUMS <<EOF
8000d7169febce93c84b6bdf376631f8179132fd69f7015d4dadb8b9c2bdb295 $SDL.tar.gz
0a64421d9c2469c2c48490a032ab91d547017c9cc171f3f8070bc31888f24e03 qtbase-everywhere-src-$QT.tar.xz
7b19f418e6f7b8e23344082dd04440aacf5da23c5a73980ba22ae4eba4f87df7 qtsvg-everywhere-src-$QT.tar.xz
c412750f2aa3beb93fce5f30517c607f55daaeb7d0407af206a8adf917e126c1 qttools-everywhere-src-$QT.tar.xz
d7bdd55e2908ded901dcc262157100af2a490bf04d31e32995f6d91d78dfdb97 qttranslations-everywhere-src-$QT.tar.xz
6f14fea2d172a5b4170be3efcb0e58535f6605b61bcd823f6d5c9d165bb8c0f0 qtwayland-everywhere-src-$QT.tar.xz
1a0f686498fb768ad9f3f80b39037a7d006eac093aad39cb4ebcc832a8887231 $SDL.tar.gz
fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.zip
5087c9e5b0165e7bc3c1a4ab176b35d0cd8f52636aea903fa377bdba00891a60 qtbase-everywhere-src-$QT.tar.xz
88315f886cf81898705e487cedba6e6160724359d23c518c92c333c098879a4a qtsvg-everywhere-src-$QT.tar.xz
867df829cd5cd3ae8efe62e825503123542764b13c96953511e567df70c5a091 qttools-everywhere-src-$QT.tar.xz
79e56b7800d49649a8a8010818538c367a829e0b7a09d5f60bd3aecf5abe972c qttranslations-everywhere-src-$QT.tar.xz
c6b161da8f4c01e48c10b7b558a0a01ac07dba9b907b13a98ff5d89f46bc4789 qtwayland-everywhere-src-$QT.tar.xz
EOF
curl -L \
-O "https://libsdl.org/release/$SDL.tar.gz" \
-O "https://github.com/ianlancetaylor/libbacktrace/archive/$LIBBACKTRACE.zip" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
@@ -37,6 +40,14 @@ make "-j$NPROCS"
make install
cd ..
echo "Building libbacktrace..."
unzip "$LIBBACKTRACE.zip"
cd "libbacktrace-$LIBBACKTRACE"
./configure --prefix="$HOME/deps"
make
make install
cd ..
# Couple notes:
# -fontconfig is needed otherwise Qt Widgets render only boxes.
# -qt-doubleconversion avoids a dependency on libdouble-conversion.
@@ -65,19 +76,6 @@ cd ../../
echo "Building Qt Wayland..."
tar xf "qtwayland-everywhere-src-$QT.tar.xz"
cd "qtwayland-everywhere-src-$QT"
# qtwayland does not build without qml/qtdeclarative in 6.3.1. Work around it.
patch -u src/compositor/CMakeLists.txt <<EOF
--- src/compositor/CMakeLists.txt 2022-06-08 13:44:30.000000000 +1000
+++ src/compositor/CMakeLists.txt 2022-07-17 20:05:25.461881785 +1000
@@ -46,7 +46,6 @@
global/qtwaylandcompositorglobal.h
global/qtwaylandqmlinclude.h
global/qwaylandcompositorextension.cpp global/qwaylandcompositorextension.h global/qwaylandcompositorextension_p.h
- global/qwaylandquickextension.cpp global/qwaylandquickextension.h
global/qwaylandutils_p.h
hardware_integration/qwlclientbufferintegration.cpp hardware_integration/qwlclientbufferintegration_p.h
wayland_wrapper/qwlbuffermanager.cpp wayland_wrapper/qwlbuffermanager_p.h
EOF
mkdir build
cd build
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release ..
@@ -103,6 +101,30 @@ patch -u src/linguist/CMakeLists.txt <<EOF
add_subdirectory(linguist)
endif()
EOF
# Also force disable clang scanning, it gets very confused.
patch -u configure.cmake <<EOF
--- configure.cmake
+++ configure.cmake
@@ -14,12 +14,12 @@
# Presumably because 6.0 ClangConfig.cmake files are not good enough?
# In any case explicitly request a minimum version of 8.x for now, otherwise
# building with CMake will fail at compilation time.
-qt_find_package(WrapLibClang 8 PROVIDED_TARGETS WrapLibClang::WrapLibClang)
+#qt_find_package(WrapLibClang 8 PROVIDED_TARGETS WrapLibClang::WrapLibClang)
# special case end
-if(TARGET WrapLibClang::WrapLibClang)
- set(TEST_libclang "ON" CACHE BOOL "Required libclang version found." FORCE)
-endif()
+#if(TARGET WrapLibClang::WrapLibClang)
+# set(TEST_libclang "ON" CACHE BOOL "Required libclang version found." FORCE)
+#endif()
EOF
mkdir build
cd build
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF ..
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
function retry_command {
# Package servers tend to be unreliable at times..
# Retry a bunch of times.
local RETRIES=10
for i in $(seq 1 "$RETRIES"); do
"$@" && break
if [ "$i" == "$RETRIES" ]; then
echo "Command \"$@\" failed after ${RETRIES} retries."
exit 1
fi
done
}
@@ -27,10 +27,10 @@ cmake \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Release \
-DQT_BUILD=ON \
-DCUBEB_API=ON \
-DX11_API=ON \
-DWAYLAND_API=ON \
-DXDG_STD=TRUE \
-DDISABLE_PCSX2_WRAPPER=ON \
-DDISABLE_SETCAP=ON \
-DENABLE_SETCAP=OFF \
-DCMAKE_PREFIX_PATH="$HOME/deps" \
-DUSE_SYSTEM_SDL2=ON \
-DUSE_SYSTEM_ZSTD=OFF \
@@ -1,33 +0,0 @@
#!/bin/bash
set -e
if [ "${COMPILER}" = "gcc" ]; then
export CC=gcc-10
export CXX=g++-10
else
export CC=clang
export CXX=clang++
fi
if [ "${PLATFORM}" = x86 ]; then
ADDITIONAL_CMAKE_ARGS="$ADDITIONAL_CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=cmake/linux-compiler-i386-multilib.cmake"
fi
echo "Additional CMake Args - ${ADDITIONAL_CMAKE_ARGS}"
# Generate CMake into ./build
cmake \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Release \
-DPACKAGE_MODE=TRUE \
-DWAYLAND_API=TRUE \
-DDISABLE_ADVANCE_SIMD=TRUE \
-DDISABLE_PCSX2_WRAPPER=TRUE \
-DCMAKE_INSTALL_PREFIX="squashfs-root/usr/" \
-DOpenGL_GL_PREFERENCE="LEGACY" \
-DOPENGL_opengl_LIBRARY="" \
-DXDG_STD=TRUE \
-DUSE_SYSTEM_ZSTD=FALSE \
$ADDITIONAL_CMAKE_ARGS \
-GNinja \
-B build
@@ -1,5 +1,8 @@
#!/bin/bash
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
source "$SCRIPTDIR/functions.sh"
set -e
# Packages - Build and Qt
@@ -57,18 +60,18 @@ declare -a PCSX2_PACKAGES=(
)
if [ "${COMPILER}" = "gcc" ]; then
BUILD_PACKAGES+=("g++-10")
BUILD_PACKAGES+=("g++-10")
else
BUILD_PACKAGES+=("llvm-12" "lld-12" "clang-12")
BUILD_PACKAGES+=("llvm-12" "lld-12" "clang-12")
fi
sudo apt-get -qq update
retry_command sudo apt-get -qq update && break
# Install packages needed for building
echo "Will install the following packages for building - ${BUILD_PACKAGES[*]}"
sudo apt-get -y install "${BUILD_PACKAGES[@]}"
retry_command sudo apt-get -y install "${BUILD_PACKAGES[@]}"
# Install packages needed by pcsx2
PCSX2_PACKAGES=("${PCSX2_PACKAGES[@]}")
echo "Will install the following packages for pcsx2 - ${PCSX2_PACKAGES[*]}"
sudo apt-get -y install "${PCSX2_PACKAGES[@]}"
retry_command sudo apt-get -y install "${PCSX2_PACKAGES[@]}"
@@ -1,63 +0,0 @@
#!/bin/bash
set -e
# Packages - Build Environment
declare -a BUILD_PACKAGES=(
"ccache"
"cmake"
"ninja-build"
)
# Packages - PCSX2
declare -a PCSX2_PACKAGES=(
"libaio-dev"
"libasound2-dev"
"libbz2-dev"
"libegl1-mesa-dev"
"libgdk-pixbuf2.0-dev"
"libgl1-mesa-dev"
"libgtk-3-dev"
"libharfbuzz-dev"
"libjpeg-dev"
"liblzma-dev"
"libpcap0.8-dev"
"libpng-dev"
"libpulse-dev"
"librsvg2-dev"
"libsamplerate0-dev"
"libsoundtouch-dev"
"libudev-dev"
"libwxgtk3.0-gtk3-dev"
"libx11-xcb-dev"
"pkg-config"
"portaudio19-dev"
"zlib1g-dev"
)
if [ "${COMPILER}" = "gcc" ]; then
BUILD_PACKAGES+=("g++-10-multilib")
else
BUILD_PACKAGES+=("clang-9")
PCSX2_PACKAGES+=("libstdc++-10-dev")
fi
# - https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
ARCH=""
echo "${PLATFORM}"
if [ "${PLATFORM}" == "x86" ]; then
ARCH=":i386"
sudo dpkg --add-architecture i386
fi
sudo apt-get -qq update
# Install packages needed for building
echo "Will install the following packages for building - ${BUILD_PACKAGES[*]}"
#sudo apt remove gcc-9 g++-9
sudo apt-get -y install "${BUILD_PACKAGES[@]}"
# Install packages needed by pcsx2
PCSX2_PACKAGES=("${PCSX2_PACKAGES[@]/%/"${ARCH}"}")
echo "Will install the following packages for pcsx2 - ${PCSX2_PACKAGES[*]}"
sudo apt-get -y install "${PCSX2_PACKAGES[@]}"
@@ -2,18 +2,14 @@
set -e
if [ "$GUI" == "Qt" ]; then
export MACOSX_DEPLOYMENT_TARGET=10.14
else
export MACOSX_DEPLOYMENT_TARGET=10.13
fi
export MACOSX_DEPLOYMENT_TARGET=10.14
INSTALLDIR="$HOME/deps"
NPROCS="$(getconf _NPROCESSORS_ONLN)"
SDL=SDL2-2.26.0
PNG=1.6.37
JPG=9e
SOUNDTOUCH=soundtouch-2.3.1
WXWIDGETS=3.1.6
QT=6.3.1
mkdir deps-build
@@ -29,7 +25,6 @@ cat > SHASUMS <<EOF
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca libpng-$PNG.tar.xz
4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d jpegsrc.v$JPG.tar.gz
6900996607258496ce126924a19fe9d598af9d892cf3f33d1e4daaa9b42ae0b1 $SOUNDTOUCH.tar.gz
4980e86c6494adcd527a41fc0a4e436777ba41d1893717d7b7176c59c2061c25 wxWidgets-$WXWIDGETS.tar.bz2
0a64421d9c2469c2c48490a032ab91d547017c9cc171f3f8070bc31888f24e03 qtbase-everywhere-src-$QT.tar.xz
7b19f418e6f7b8e23344082dd04440aacf5da23c5a73980ba22ae4eba4f87df7 qtsvg-everywhere-src-$QT.tar.xz
c412750f2aa3beb93fce5f30517c607f55daaeb7d0407af206a8adf917e126c1 qttools-everywhere-src-$QT.tar.xz
@@ -41,7 +36,6 @@ curl -L \
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$PNG/libpng-$PNG.tar.xz" \
-O "https://www.ijg.org/files/jpegsrc.v$JPG.tar.gz" \
-O "https://www.surina.net/soundtouch/$SOUNDTOUCH.tar.gz" \
-O "https://github.com/wxWidgets/wxWidgets/releases/download/v$WXWIDGETS/wxWidgets-$WXWIDGETS.tar.bz2" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
@@ -81,37 +75,27 @@ make -C build "-j$NPROCS"
make -C build install
cd ..
if [ "$GUI" == "wxWidgets" ]; then
echo "Installing wx..."
tar xf "wxWidgets-$WXWIDGETS.tar.bz2"
cd "wxWidgets-$WXWIDGETS"
./configure --prefix "$INSTALLDIR" --with-macosx-version-min="$MACOSX_DEPLOYMENT_TARGET" --enable-clipboard --enable-dnd --enable-std_string --with-cocoa --with-libiconv --with-libjpeg --with-libpng --with-zlib --without-libtiff --without-regex
make "-j$NPROCS"
make install
cd ..
fi
if [ "$GUI" == "Qt" ]; then
echo "Installing Qt Base..."
tar xf "qtbase-everywhere-src-$QT.tar.xz"
cd "qtbase-everywhere-src-$QT"
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_optimize_size=ON -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt SVG..."
tar xf "qtsvg-everywhere-src-$QT.tar.xz"
cd "qtsvg-everywhere-src-$QT"
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=MinSizeRel
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt Tools..."
tar xf "qttools-everywhere-src-$QT.tar.xz"
cd "qttools-everywhere-src-$QT"
# Linguist relies on a library in the Designer target, which takes 5-7 minutes to build on the CI
# Avoid it by not building Linguist, since we only need the tools that come with it
patch -u src/linguist/CMakeLists.txt <<EOF
echo "Installing Qt Base..."
tar xf "qtbase-everywhere-src-$QT.tar.xz"
cd "qtbase-everywhere-src-$QT"
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_optimize_size=ON -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt SVG..."
tar xf "qtsvg-everywhere-src-$QT.tar.xz"
cd "qtsvg-everywhere-src-$QT"
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=MinSizeRel
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt Tools..."
tar xf "qttools-everywhere-src-$QT.tar.xz"
cd "qttools-everywhere-src-$QT"
# Linguist relies on a library in the Designer target, which takes 5-7 minutes to build on the CI
# Avoid it by not building Linguist, since we only need the tools that come with it
patch -u src/linguist/CMakeLists.txt <<EOF
--- src/linguist/CMakeLists.txt
+++ src/linguist/CMakeLists.txt
@@ -14,7 +14,7 @@
@@ -123,18 +107,17 @@ if [ "$GUI" == "Qt" ]; then
add_subdirectory(linguist)
endif()
EOF
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt Translations..."
tar xf "qttranslations-everywhere-src-$QT.tar.xz"
cd "qttranslations-everywhere-src-$QT"
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release
make -C build "-j$NPROCS"
make -C build install
cd ..
fi
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt Translations..."
tar xf "qttranslations-everywhere-src-$QT.tar.xz"
cd "qttranslations-everywhere-src-$QT"
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Cleaning up..."
cd ..
@@ -4,7 +4,7 @@ import shutil
tag = os.environ['TAG'].split("refs/tags/")[1]
scan_dir = os.environ['SCAN_DIR']
output_dir = os.environ['OUT_DIR']
accepted_exts = ["AppImage", "tar.gz", "7z"]
accepted_exts = ["AppImage", "tar.xz", "7z"]
for dir_name in os.listdir(scan_dir):
@@ -23,10 +23,7 @@ for dir_name in os.listdir(scan_dir):
elif "sse4" in dir_name.lower():
asset_name += "-SSE4"
if "wxwidgets" in dir_name.lower():
asset_name += "-wxWidgets"
else:
asset_name += "-Qt"
asset_name += "-Qt"
if "symbols" in dir_name.lower():
asset_name += "-symbols"
+31 -31
View File
@@ -19,25 +19,6 @@ jobs:
- name: Verify VS Project Files
run: .github\workflows\scripts\windows\validate-vs-filters.ps1
build_wx_sse4:
needs: lint_vs_proj_files
name: "SSE4"
uses: ./.github/workflows/windows_build_wx.yml
with:
jobName: wxWidgets
configuration: Release
simd: "SSE4"
secrets: inherit
build_wx_avx2:
needs: lint_vs_proj_files
name: "AVX2"
uses: ./.github/workflows/windows_build_wx.yml
with:
jobName: wxWidgets
configuration: Release AVX2
secrets: inherit
build_qt_sse4:
needs: lint_vs_proj_files
name: "SSE4"
@@ -57,21 +38,40 @@ jobs:
configuration: Release AVX2
secrets: inherit
# CMAKE
build_wx_sse4_cmake:
name: "CMake SSE4"
uses: ./.github/workflows/windows_build_wx.yml
with:
jobName: wxWidgets
configuration: CMake
buildSystem: cmake
secrets: inherit
build_qt_sse4_cmake:
name: "CMake SSE4"
build_qt_cmake:
name: "CMake"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt
configuration: CMake
buildSystem: cmake
secrets: inherit
build_qt_clang_sse4:
needs: lint_vs_proj_files
name: "SSE4"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt Clang
configuration: Release Clang
simd: "SSE4"
secrets: inherit
build_qt_clang_avx2:
needs: lint_vs_proj_files
name: "AVX2"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt Clang
configuration: Release Clang AVX2
secrets: inherit
build_qt_cmake_clang:
name: "CMake"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt Clang
configuration: CMake
buildSystem: cmake
cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DPCSX2_EXE_NAME=pcsx2-qt-clang
secrets: inherit
+12 -1
View File
@@ -25,6 +25,10 @@ on:
required: false
type: string
default: msbuild
cmakeFlags:
required: false
type: string
default: ""
qt_binary_url:
required: false
type: string
@@ -92,7 +96,7 @@ jobs:
shell: cmd
run: |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake . -B build "-DCMAKE_PREFIX_PATH=%cd%\${{ inputs.qt_dir }}" -DQT_BUILD=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DDISABLE_ADVANCE_SIMD=ON -G Ninja
cmake . -B build ${{ inputs.cmakeFlags }} "-DCMAKE_PREFIX_PATH=%cd%\${{ inputs.qt_dir }}" -DQT_BUILD=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DDISABLE_ADVANCE_SIMD=ON -G Ninja
- name: Build PCSX2
shell: cmd
@@ -105,6 +109,13 @@ jobs:
msbuild "PCSX2_qt.sln" /m /v:m /p:Configuration="${{ inputs.configuration }}" /p:Platform="${{ inputs.platform }}"
)
- name: Run Tests
if: inputs.configuration == 'CMake'
shell: cmd
run: |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake --build build --config Release --target unittests
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
-119
View File
@@ -1,119 +0,0 @@
name: Windows Build Steps - wxWidgets
on:
workflow_call:
inputs:
jobName:
required: true
type: string
os:
required: false
type: string
default: windows-2022
platform:
required: false
type: string
default: x64
simd:
required: false
type: string
default: AVX2
buildSystem:
required: false
type: string
default: msbuild
configuration:
required: true
type: string
cheats_url:
required: false
type: string
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
jobs:
build_windows_wx:
name: ${{ inputs.jobName }}
runs-on: ${{ inputs.os }}
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
timeout-minutes: 60
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
OS: windows
BUILD_SYSTEM: ${{ inputs.buildSystem }}
GUI_FRAMEWORK: wxWidgets
ARCH: ${{ inputs.platform }}
SIMD: ${{ inputs.simd }}
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUM: ${{ github.event.pull_request.number }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
run: ./.github/workflows/scripts/common/name-artifacts.sh
- name: Setup msbuild
if: inputs.configuration != 'CMake'
uses: microsoft/setup-msbuild@v1
- name: Download cheats
shell: cmd
run: |
cd bin/resources
aria2c -Z "${{ inputs.cheats_url }}/cheats_ni.zip" "${{ inputs.cheats_url }}/cheats_ws.zip"
- name: Generate CMake
if: inputs.configuration == 'CMake'
id: cmake
shell: cmd
run: |
if "${{ inputs.platform }}"=="Win32" (SET vcvars=vcvarsamd64_x86.bat) else (SET vcvars=vcvars64.bat)
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\%vcvars%"
echo vcvars=%vcvars%>> %GITHUB_OUTPUT%
cmake . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DDISABLE_ADVANCE_SIMD=ON -G Ninja
- name: Build PCSX2
shell: cmd
run: |
if "${{ inputs.configuration }}"=="CMake" (
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\${{ steps.cmake.outputs.vcvars }}"
cmake --build build --config Release || exit /b
cp build/pcsx2/pcsx2* bin/
) else (
msbuild "PCSX2_suite.sln" /m /v:m /p:Configuration="${{ inputs.configuration }}" /p:Platform="${{ inputs.platform }}"
)
- name: Run Tests
if: inputs.configuration == 'CMake'
shell: cmd
run: |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\${{ steps.cmake.outputs.vcvars }}"
cmake --build build --config Release --target unittests
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: |
./bin
!./bin/**/*.bsc
!./bin/**/*.exp
!./bin/**/*.ilk
!./bin/**/*.iobj
!./bin/**/*.ipdb
!./bin/**/*.pdb
!./bin/**/*.lib
- name: Upload artifact - with symbols
uses: actions/upload-artifact@v3
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}-symbols
path: ./bin/**/*.pdb
+2 -13
View File
@@ -30,15 +30,11 @@
**/x64/Debug*
**/x64/Devel*
**/bin/PCSX2-linux.sh
_ReSharper.*
pcsx2.snapshot_*
svnrev.h
/build
/build_dev
/build_dbg
/build*
/obj-*
*.obj
@@ -47,8 +43,6 @@ Thumbs.db
Debug.txt
install_log.txt
padLog.txt
GS_opengl_debug.txt
bad_shader_*
Debug
@@ -74,10 +68,7 @@ oprofile_data/
/bin/**/*.ilk
/bin/**/*.lib
/bin/**/*.pdb
/bin/pcsx2
/bin/PCSX2-linux.sh
/bin/*ReplayLoader
/bin/GS*.txt
/bin/pcsx2*
/bin/qt.conf
/bin/bios
/bin/cache
@@ -99,8 +90,6 @@ oprofile_data/
/ipch
!/3rdparty/libjpeg/change.log
/3rdparty/**/include/wx/setup.h
/3rdparty/**/wx/msw/rcdefs.h
/pcsx2/gui/Resources/*.h
!/pcsx2/gui/Resources/EmbeddedImage.h
/tools/bin
-1
View File
@@ -10,7 +10,6 @@
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>__WIN32__;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StructMemberAlignment>16Bytes</StructMemberAlignment>
<FunctionLevelLinking>true</FunctionLevelLinking>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
+2 -1
View File
@@ -8,7 +8,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
+2 -1
View File
@@ -9,7 +9,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
+2 -1
View File
@@ -8,7 +8,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
+1 -1
View File
@@ -144,7 +144,7 @@ public:
protected:
virtual void ReleaseThis() { delete this; }
private:
D3D12MA_ATOMIC_UINT32 m_RefCount = 1;
D3D12MA_ATOMIC_UINT32 m_RefCount{1};
};
} // namespace D3D12MA
+2 -2
View File
@@ -6082,7 +6082,7 @@ private:
D3D12MA_ATOMIC_UINT64 m_BlockBytes[DXGI_MEMORY_SEGMENT_GROUP_COUNT] = {};
D3D12MA_ATOMIC_UINT64 m_AllocationBytes[DXGI_MEMORY_SEGMENT_GROUP_COUNT] = {};
D3D12MA_ATOMIC_UINT32 m_OperationsSinceBudgetFetch = 0;
D3D12MA_ATOMIC_UINT32 m_OperationsSinceBudgetFetch{0};
D3D12MA_RW_MUTEX m_BudgetMutex;
UINT64 m_D3D12Usage[DXGI_MEMORY_SEGMENT_GROUP_COUNT] = {};
UINT64 m_D3D12Budget[DXGI_MEMORY_SEGMENT_GROUP_COUNT] = {};
@@ -6317,7 +6317,7 @@ class AllocatorPimpl
friend class Allocator;
friend class Pool;
public:
std::atomic_uint32_t m_RefCount = 1;
std::atomic_uint32_t m_RefCount{1};
CurrentBudgetData m_Budget;
AllocatorPimpl(const ALLOCATION_CALLBACKS& allocationCallbacks, const ALLOCATOR_DESC& desc);
+6
View File
@@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 3.6)
project(demangler CXX)
add_subdirectory(src)
+60
View File
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)common\vsprops\BaseProjectConfig.props" />
<Import Project="$(SolutionDir)common\vsprops\WinSDK.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>{1E3D706C-1D95-4E1B-BDF2-CA3D0007DF7F}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
<UseDebugLibraries Condition="!$(Configuration.Contains(Debug))">false</UseDebugLibraries>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets">
<Import Project="..\DefaultProjectRootDir.props" />
<Import Project="..\3rdparty.props" />
<Import Condition="$(Configuration.Contains(Debug))" Project="..\..\common\vsprops\CodeGen_Debug.props" />
<Import Condition="$(Configuration.Contains(Devel))" Project="..\..\common\vsprops\CodeGen_Devel.props" />
<Import Condition="$(Configuration.Contains(Release))" Project="..\..\common\vsprops\CodeGen_Release.props" />
<Import Condition="!$(Configuration.Contains(Release))" Project="..\..\common\vsprops\IncrementalLinking.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="src\demangler.cpp" />
<ClCompile Include="src\demtools.cpp" />
<ClCompile Include="src\gparser.cpp" />
<ClCompile Include="src\igrams.cpp" />
<ClCompile Include="src\stgrammars\borlandll.cpp" />
<ClCompile Include="src\stgrammars\gccll.cpp" />
<ClCompile Include="src\stgrammars\msll.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="include\demangler\demangler.h" />
<ClInclude Include="include\demangler\demglobal.h" />
<ClInclude Include="include\demangler\demtools.h" />
<ClInclude Include="include\demangler\gparser.h" />
<ClInclude Include="include\demangler\igrams.h" />
<ClInclude Include="include\demangler\stgrammars\borlandll.h" />
<ClInclude Include="include\demangler\stgrammars\gccll.h" />
<ClInclude Include="include\demangler\stgrammars\msll.h" />
</ItemGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
<AdditionalIncludeDirectories>$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>
+22
View File
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="src\demangler.cpp" />
<ClCompile Include="src\demtools.cpp" />
<ClCompile Include="src\gparser.cpp" />
<ClCompile Include="src\igrams.cpp" />
<ClCompile Include="src\stgrammars\borlandll.cpp" />
<ClCompile Include="src\stgrammars\gccll.cpp" />
<ClCompile Include="src\stgrammars\msll.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="include\demangler\demangler.h" />
<ClInclude Include="include\demangler\demglobal.h" />
<ClInclude Include="include\demangler\demtools.h" />
<ClInclude Include="include\demangler\gparser.h" />
<ClInclude Include="include\demangler\igrams.h" />
<ClInclude Include="include\demangler\stgrammars\borlandll.h" />
<ClInclude Include="include\demangler\stgrammars\gccll.h" />
<ClInclude Include="include\demangler\stgrammars\msll.h" />
</ItemGroup>
</Project>
+45
View File
@@ -0,0 +1,45 @@
/**
* @file include/demangler/demangler.h
* @brief Demangler library.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#ifndef DEMANGLER_DEMANGLERL_H
#define DEMANGLER_DEMANGLERL_H
#include <memory>
#include <string>
#include "demangler/gparser.h"
namespace demangler {
/**
* The grammar parser class - the core of the demangler.
*/
class CDemangler {
cGram *pGram;
cName *pName;
std::string compiler = "gcc";
cGram::errcode errState; /// error state; 0 = everyting is ok
public:
CDemangler(std::string gname, bool i = true);
static std::unique_ptr<CDemangler> createGcc(bool i = true);
static std::unique_ptr<CDemangler> createMs(bool i = true);
static std::unique_ptr<CDemangler> createBorland(bool i = true);
virtual ~CDemangler();
bool isOk();
std::string printError();
void resetError();
void createGrammar(std::string inputfilename, std::string outputname);
cName *demangleToClass(std::string inputName);
std::string demangleToString(std::string inputName);
void setSubAnalyze(bool x);
};
} // namespace demangler
#endif
+20
View File
@@ -0,0 +1,20 @@
/**
* @file include/demangler/demglobal.h
* @brief Global variables in demangler namespace.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#ifndef DEMANGLER_DEMGLOBAL_H
#define DEMANGLER_DEMGLOBAL_H
#include "demangler/igrams.h"
namespace demangler {
extern cGram::igram_t internalGrammarStruct;
extern cIgram_msll* igram_msll;
extern cIgram_gccll* igram_gccll;
} // namespace demangler
#endif
+36
View File
@@ -0,0 +1,36 @@
/**
* @file include/demangler/demtools.h
* @brief Tools and extra functions for demangler.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#ifndef DEMANGLER_DEMTOOLS_H
#define DEMANGLER_DEMTOOLS_H
#include <string>
namespace demangler {
/**
* @brief Structure for date and time.
*/
struct sdate_t {
unsigned int y = 0;
unsigned int m = 0;
unsigned int d = 0;
unsigned int h = 0;
unsigned int min = 0;
unsigned int s = 0;
};
bool fileExists(const std::string &filename);
void initSdate_t(sdate_t &x);
sdate_t genTimeStruct();
void xreplace(std::string &source, const std::string &tobereplaced, const std::string &replacement);
} // namespace demangler
#endif
+830
View File
@@ -0,0 +1,830 @@
/**
* @file include/demangler/gparser.h
* @brief Parser of LL grammar.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#ifndef DEMANGLER_GPARSER_H
#define DEMANGLER_GPARSER_H
#include <map>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
//internal grammars
namespace demangler {
/**
* @brief Class which holds a demangled name.
*/
class cName {
public:
/**
* @brief Enum of types of the mangled types (Determines whether a type is built-in or named).
*/
enum ttype { //type of type
TT_UNKNOWN = 0, //can be used for unknown return type
TT_BUILTIN,
TT_NAME,
TT_NUM,
TT_PEXPR
};
/**
* @brief Enum of types of the mangled names.
*/
enum ntype { //type of the mangled name
NT_FUNCTION = 0,
NT_TEMPLFUNCTION,
NT_OPERATOR,
NT_CONSTRUCTOR,
NT_DESTRUCTOR,
NT_DATA,
NT_VTABLE,
NT_R0,
NT_R1,
NT_R2,
NT_R3,
NT_R4,
NT__A,
NT__B,
NT__C,
NT__D,
NT__E,
NT__F,
NT__G,
NT__H,
NT__I,
NT__J,
NT__K,
NT__L,
NT__M,
NT__N,
NT__O,
NT__P,
NT__Q,
NT__R,
NT__S,
NT__T,
NT__U,
NT__V,
NT__W,
NT__X,
NT__Y,
NT__Z,
NT_CLASS
};
/**
* @brief Enum of operator types.
*/
enum optype { //type of operator
OT_NULL = 0,
OT_NEW,
OT_NEWARR,
OT_DEL,
OT_DELARR,
OT_UPLUS,
OT_UMINUS,
OT_UAND,
OT_UAST,
OT_TILDA,
OT_PLUS,
OT_MINUS,
OT_AST,
OT_DIV,
OT_MOD,
OT_AND,
OT_OR,
OT_EXP,
OT_ASSIGN,
OT_PLUSASS,
OT_MINUSASS,
OT_ASTASS,
OT_DIVASS,
OT_MODASS,
OT_ANDASS,
OT_ORASS,
OT_EXPASS,
OT_LSHIFT,
OT_RSHIFT,
OT_LSHIFTASS,
OT_RSHIFTASS,
OT_EQ,
OT_NEQ,
OT_LT,
OT_GT,
OT_LE,
OT_GE,
OT_NOT,
OT_ANDAND,
OT_OROR,
OT_PLUSPLUS,
OT_MINUSMINUS,
OT_COMMA,
OT_PTAST,
OT_PT,
OT_BRACKETS,
OT_ARR,
OT_QUESTION,
OT_SIZEOFT,
OT_SIZEOFE,
OT_ALIGNOFT,
OT_ALIGNOFE,
OT_CAST
};
/**
* @brief Enum of built-in types.
*/
enum st_type { //standard built-in types
T_VOID = 0,
T_WCHAR,
T_BOOL,
T_CHAR,
T_SCHAR,
T_UCHAR,
T_SHORT,
T_USHORT,
T_INT,
T_UINT,
T_LONG,
T_ULONG,
T_LONGLONG,
T_ULONGLONG,
T_INT128,
T_UINT128,
T_FLOAT,
T_DOUBLE,
T_LONGDOUBLE,
T_FLOAT128,
T_ELLIPSIS,
T_DD,
T_DE,
T_DF,
T_DH,
T_CHAR32,
T_CHAR16,
T_AUTO,
T_NULLPTR
};
/**
* @brief Enum of member function accessibility.
*/
enum memfacc_t { //standard built-in types
MFM_NULL = 0,
MFM_PRIVATE,
MFM_PUBLIC,
MFM_PROTECTED
};
/**
* @brief Enum of function call conventions.
*/
enum fcall_t { //standard built-in types
FCC_NULL = 0,
FCC_CDECL,
FCC_PASCAL,
FCC_FORTRAN,
FCC_THISCALL,
FCC_STDCALL,
FCC_FASTCALL,
FCC_INTERRUPT
};
/**
* @brief Enum of named type classifications. Union, Struct, Class, Enum.
*/
enum mstype_t { //standard built-in types
MST_NULL = 0,
MST_UNION,
MST_STRUCT,
MST_CLASS,
MST_ENUM
};
/**
* @brief Structure of an unqualified name.
* @param un String which holds the name.
* @param tpl Pointer to the the template (vector of types) of this unqualified name. If nullptr, the unqualified name consists only of the string.
*/
struct name_t {
std::string un; //unqualified name
void *tpl = nullptr; //std::vector<type_t>
bool op = false; //is it operator name element?
};
/**
* @brief Structure of a type.
* @param type Type of the type.
* @param b Built-in type. This value is defined only if 'type' is TT_BUILTIN.
* @param n Qualified name of the type. This value is defined only if 'type' is TT_NAME.
* @param is_const Bool value which determines whether the type is const.
* @param is_restrict Bool value which determines whether the type is restrict.
* @param is_volatile Bool value which determines whether the type is volatile.
* @param is_pointer Integer value determining the pointer level of the type.
* @param is_reference Bool value which determines whether the type is a reference.
* @param is_rvalue Bool value which determines whether the type is an R-value.
* @param is_cpair Bool value which determines whether the type is a complex pair.
* @param is_imaginary Bool value which determines whether the type is imaginary.
*/
struct type_t {
ttype type = TT_UNKNOWN; //type of type... builtin or named type
st_type b = T_VOID; //builtin type
void *value = nullptr; //expression value
std::vector<name_t> n; //qualified name of named type
std::string modifiers;
mstype_t mst = MST_NULL;
int num = 0;
bool is_array = false;
std::vector<unsigned int> array_dimensions;
bool is_const = false;
bool is_restrict = false;
bool is_volatile = false;
unsigned int is_pointer = 0;
bool is_reference = false;
bool is_rvalue = false; //r-value reference
bool is_cpair = false; //complex pair
bool is_imaginary = false;
std::string getLlvmType();
private:
std::string llvmIr;
std::string getLlvmTypePrivate();
};
ntype name_type = NT_FUNCTION; //name type
optype operator_type = OT_NULL; //type of operator. it is OT_NULL if function is not an operator
type_t return_type;
type_t special_type; //return value for function or conversion type for operator OT_CAST
std::string modifiers;
memfacc_t member_function_access = MFM_NULL;
fcall_t function_call = FCC_NULL;
bool is_static = false;
bool is_virtual = false;
std::string storage_class;
std::vector<long int> rttibcd;
std::vector<type_t> parameters; //function parameters
std::vector<name_t> name; //qualified name composed of unqualified names
void *tf_tpl = nullptr;
bool last_shown_endtpl = false; //an auxiliary variable which helps to add space between multiple '>' at the end of templates
void deleteparams(std::vector<type_t> & vec);
cName(); //constructor
virtual ~cName(); //mass destruction
void type_t_clear(type_t &x);
void addname(const std::vector<name_t> & inname); //set the function name
void addpar(const std::vector<type_t> & inpar); //set the parameters of the name
void setnametype(ntype x); //set type of the mangled name
void setfcall(fcall_t x); //set type of the function call convention
void setmfacc(memfacc_t x); //set type of the member function access level
ntype getnametype(void); //get type of the mangled name
void setop(optype x); //set operator type
void setret(type_t x); //set return type
void setspec(type_t x); //set special type
void setstatic(); //set name's static flag
void setvirtual(); //set name's virtual flag
void addmodifier(char x); //add a modifier to the name modifier string
void addstcl(char x); //add a modifier to the storage class string
void setmodifiers(std::string x); //set modifiers
void settftpl(void* x); //set template function template
void addrttinum(long int x); //add a RTTI Base Class descriptor num
std::string optypetostr(optype x); //operator type to string
std::string printmodifiers(std::string x, bool space);
std::string printpremodifiers(std::string x, bool space);
std::string printpostmodifiers(std::string x, bool space);
std::string printname(std::vector<name_t> & vec, std::string compiler = "gcc");
std::string printparams(std::vector<type_t> & vec, bool ignorevoid = false, std::string compiler = "gcc");
std::string printpexpr(type_t & x);
/**
* @brief Print the calling convention to a string.
* @param callconv The calling convention to be printed.
* @return String containing calling convention.
*/
std::string printcallingconvention(fcall_t callconv);
std::string printall(std::string compiler = "gcc");
std::string printall_old(bool msvcpp = false);
}; //class cName
/**
* @brief Grammar class. It's member functions allow loading an external grammar and demangling a mangled name using the grammar.
*/
class cGram {
public:
/**
* @brief Global array of semantic action names. Used when building internal LL table from external grammar.
*/
static const char *semactname[];
/**
* @brief Enum of error codes.
*/
enum errcode {
ERROR_OK = 0,
ERROR_FILE,
ERROR_FSM,
ERROR_SYN,
ERROR_MEM,
ERROR_GRAM,
ERROR_LL,
ERROR_UNK
};
/**
* @brief An array of error messages.
*/
static const char *errmsg[];
/**
* @brief Type of a grammar element. It can be either a terminal or a non-terminal.
*/
enum gelemtype {
GE_TERM = 0,
GE_NONTERM
};
/**
* @brief Structure of a grammar element.
* @param type Type of the element (terminal or non-terminal).
* @param nt The name of the non-terminal. Only vylid if type is GE_NONTERM.
* @param t The byte value of the terminal. Only valid if type is GE_TERM.
*/
struct gelem_t {
gelem_t(gelemtype t, char* n, unsigned int i, char c) :
type(t),
nt(n),
ntst(i),
t(c)
{}
gelem_t() {}
gelemtype type = GE_TERM;
char* nt = nullptr;
unsigned int ntst = 0;
char t = 0;
};
/**
* @brief Enum of semantic actions.
*/
enum semact {
//do nothing
SA_NULL = 0,
//set type of name (function, operator, constructor, destructor, data)
SA_SETNAMEF,
SA_SETNAMETF,
SA_SETNAMEO,
SA_SETNAMEC,
SA_SETNAMED,
SA_SETNAMEX,
SA_SETNAMEVT,
//set operator type
SA_SETOPXX,
SA_SETOPNW,
SA_SETOPNA,
SA_SETOPDL,
SA_SETOPDA,
SA_SETOPPS,
SA_SETOPNG,
SA_SETOPAD,
SA_SETOPDE,
SA_SETOPCO,
SA_SETOPPL,
SA_SETOPMI,
SA_SETOPML,
SA_SETOPDV,
SA_SETOPRM,
SA_SETOPAN,
SA_SETOPOR,
SA_SETOPEO,
SA_SETOPASS,
SA_SETOPPLL,
SA_SETOPMII,
SA_SETOPMLL,
SA_SETOPDVV,
SA_SETOPRMM,
SA_SETOPANN,
SA_SETOPORR,
SA_SETOPEOO,
SA_SETOPLS,
SA_SETOPRS,
SA_SETOPLSS,
SA_SETOPRSS,
SA_SETOPEQ,
SA_SETOPNE,
SA_SETOPLT,
SA_SETOPGT,
SA_SETOPLE,
SA_SETOPGE,
SA_SETOPNT,
SA_SETOPAA,
SA_SETOPOO,
SA_SETOPPP,
SA_SETOPMM,
SA_SETOPCM,
SA_SETOPPM,
SA_SETOPPT,
SA_SETOPCL,
SA_SETOPIX,
SA_SETOPQU,
SA_SETOPST,
SA_SETOPSZ,
SA_SETOPAT,
SA_SETOPAZ,
SA_SETOPCV,
//builtin types
SA_SETTYPEV,
SA_SETTYPEW,
SA_SETTYPEB,
SA_SETTYPEC,
SA_SETTYPEA,
SA_SETTYPEH,
SA_SETTYPES,
SA_SETTYPET,
SA_SETTYPEI,
SA_SETTYPEJ,
SA_SETTYPEL,
SA_SETTYPEM,
SA_SETTYPEX,
SA_SETTYPEY,
SA_SETTYPEN,
SA_SETTYPEO,
SA_SETTYPEF,
SA_SETTYPED,
SA_SETTYPEE,
SA_SETTYPEG,
SA_SETTYPEZ,
//parameter modifiers
SA_SETCONST,
SA_SETRESTRICT,
SA_SETVOLATILE,
SA_SETPTR,
SA_SETREF,
SA_SETRVAL,
SA_SETCPAIR,
SA_SETIM,
//substitutions
SA_SUBSTD, //::std::
SA_SUBALC, //::std::allocator
SA_SUBSTR, //::std::basic_string
SA_SUBSTRS, //::std::basic_string<char,::std::char_traits<char>,::std::allocator<char>>
SA_SUBISTR, //::std::basic_istream<char, std::char_traits<char>>
SA_SUBOSTR, //::std::basic_ostream<char, std::char_traits<char>>
SA_SUBIOSTR, //::std::basic_iostream<char, std::char_traits<char>>
//other very important semantic actions
SA_LOADID, //load an unqualified name into the qualified vector of names
SA_LOADSUB, //load a substitution
SA_LOADTSUB, //load a template sub
SA_LOADARR, //load an array dimension
SA_STOREPAR, //store current parameter to vector of parameters
SA_STORETEMPARG, //store current parameter to current vector of template arguments
SA_STORETEMPLATE, //store the whole template into the last name element of last name vector
SA_BEGINTEMPL, //begin a template
SA_SKIPTEMPL, //skip a template
SA_PAR2F, //store current vector of parameters into the function
SA_PAR2RET, //store current parameter to the return value
SA_PAR2SPEC, //store current parameter to the special value
SA_UNQ2F, //future identifiers are added to the function name
SA_UNQ2P, //function identifiers are added to parameter name
//substitution expansion modifiers
SA_SSNEST, //nested sub
SA_STUNQ, //unqualified std:: sub
SA_SSNO, //other sub derived from <name>
SA_TYPE2EXPR, //builtin type is converted to primary expression
SA_EXPRVAL, //load expression value
SA_BEGINPEXPR, //begin a primary expression
SA_STOREPEXPR, //end a primary expression
SA_COPYTERM, //copy the terminal on the input into current_name in substitution analyzer
SA_ADDCHARTONAME, //add current character to current unqualified name
SA_STORENAME, //move current unqualified name into current name vector
SA_REVERSENAME,
SA_SETPRIVATE,
SA_SETPUBLIC,
SA_SETPROTECTED,
SA_SETFCDECL,
SA_SETFPASCAL,
SA_SETFFORTRAN,
SA_SETFTHISCALL,
SA_SETFSTDCALL,
SA_SETFFASTCALL,
SA_SETFINTERRUPT,
SA_SETUNION,
SA_SETSTRUCT,
SA_SETCLASS,
SA_SETENUM,
SA_SETSTATIC,
SA_SETVIRTUAL,
SA_STCLCONST,
SA_STCLVOL,
SA_STCLFAR,
SA_STCLHUGE,
SA_SAVENAMESUB,
SA_LOADNAMESUB,
SA_MSTEMPLPSUB,
SA_SETNAMER0,
SA_SETNAMER1,
SA_SETNAMER2,
SA_SETNAMER3,
SA_SETNAMER4,
SA_SETNAME_A,
SA_SETNAME_B,
SA_SETNAME_C,
SA_SETNAME_D,
SA_SETNAME_E,
SA_SETNAME_F,
SA_SETNAME_G,
SA_SETNAME_H,
SA_SETNAME_I,
SA_SETNAME_J,
SA_SETNAME_K,
SA_SETNAME_L,
SA_SETNAME_M,
SA_SETNAME_N,
SA_SETNAME_O,
SA_SETNAME_P,
SA_SETNAME_Q,
SA_SETNAME_R,
SA_SETNAME_S,
SA_SETNAME_T,
SA_SETNAME_U,
SA_SETNAME_V,
SA_SETNAME_W,
SA_SETNAME_X,
SA_SETNAME_Y,
SA_SETNAME_Z,
SA_TEMPL2TFTPL,
SA_BEGINBSUB,
SA_LOADBSUB,
SA_ADDMCONST,
SA_ADDMVOL,
SA_ADDMFAR,
SA_ADDMHUGE,
SA_LOADMSNUM,
SA_NUMTORTTIBCD,
SA_NUMTOTYPE,
SA_BORLANDNORMALIZEPARNAME,
SA_BORLANDID,
SA_LOADBORLANDSUB,
SA_BORLANDARR,
SA_END
};
/**
* @brief Structure of an element in an internal LL table.
* @param n Rule number. Numbered from 1. 0 is reserved for "no rule", which indicates a syntax error.
* @param s Semantic action to be done when this LL element is used.
*/
struct llelem_t {
llelem_t(unsigned int i, semact ss) :
n(i),
s(ss)
{}
llelem_t() {}
unsigned int n = 0;
semact s = SA_NULL;
};
/**
* @brief Struct used to describe a rule boundaries in an internal LL table.
* @param offset Offset from the start of ruleelements array.
* @param size Number of elements in the current rule.
*/
struct ruleaddr_t {
ruleaddr_t(unsigned int o, unsigned int s) :
offset(o),
size(s)
{}
unsigned int offset = 0;
unsigned int size = 0;
};
/**
* @brief Structure of a grammar rule.
* @param n Number of the rule. Numbered from 1. 0 is reserved for "no rule", which indicates a syntax error.
* @param left The left side of the rule, consisting of only one non-terminal.
* @param right The right side of the rule, which is a sequence of terminals or non-terminals. May be empty.
*/
struct rule_t {
unsigned int n = 0;
gelem_t left;
std::vector<gelem_t> right;
};
/**
* @brief Types of substitution expansion.
*/
enum subtype {
ST_NULL = 0,
ST_STUNQ,
ST_SSNEST,
ST_SSNO
};
/**
* @brief States of the FSM for parsing grammar rules from a file.
*/
enum fsmstate {
S_START = 0, //beginning of a line
S_NT_LEFT, //non-terminal on the left side
S_OP1, //:
S_OP2, //:
S_OP3, //=
S_RIGHT, //right side
S_NT_RIGHT, //non-terminal on the right side
S_T, //terminal on the right side
S_QT, //quoted terminal on the right side
S_QT_ESC, //escape sequence of a quoted terminal
S_IGNORE, //ignore the rest of the line
S_ERROR, //error ocurred
S_NULL //just a NULL terminator for the array of final states
};
/**
* @brief Class for comparing two grammar element structures. Used in std::set of grammar elements.
*/
class comparegelem_c {
public:
/**
* @brief Comparison function for two grammar element structures
* @param t1 First grammar element.
* @param t2 Second grammar element.
*/
bool operator() (const gelem_t t1, const gelem_t t2) const {
//if types don't match, terminal is less than non-terminal
if (t1.type!= t2.type) {
return (t1.type == GE_TERM)?true:false;
}
//for two terminals, compare their byte values
if (t1.type == GE_TERM) {
return t1.t < t2.t;
}
//for two non-terminals, compare the non-terminal name strings
else {
return t1.nt < t2.nt;
}
}
};
/**
* @brief Struct for internal grammar.
*/
struct igram_t {
igram_t(unsigned int tsx, unsigned int rax, unsigned int rex, unsigned int lx, unsigned int ly,
gelem_t r, unsigned char* ts, ruleaddr_t* ra, gelem_t* re, llelem_t** lt) :
terminal_static_x(tsx),
ruleaddrs_x(rax),
ruleelements_x(rex),
llst_x(lx),
llst_y(ly),
root(r),
terminal_static(ts),
ruleaddrs(ra),
ruleelements(re),
llst(lt)
{}
igram_t() {}
//dimensions of the arrays
unsigned int terminal_static_x = 0;
unsigned int ruleaddrs_x = 0;
unsigned int ruleelements_x = 0;
unsigned int llst_x = 0; //first one
unsigned int llst_y = 0; //second one
//root element
gelem_t root;
//the arrays
unsigned char* terminal_static = nullptr; //array of used terminals
ruleaddr_t* ruleaddrs = nullptr; //structures defining offset and size of each rule in the ruleelements table
gelem_t* ruleelements = nullptr; //all elements of all rules
llelem_t** llst = nullptr; //the LL table
};
/**
* @brief The struct variable containing pointers to internal grammar data.
*/
cGram::igram_t internalGrammarStruct;
//FSM for parsing external rules
static const fsmstate fsm_final[];
static const gelem_t T_EOF;
bool internalGrammar = false;
std::string compiler;
/*
* Variables used for generation of new internal grammars
*/
std::string createIGrammar; //if this thing is on, new internal grammar will be generated from external grammar file
unsigned int newIG_terminal_static_x = 0;
std::size_t newIG_ruleaddrs_x = 0;
std::size_t newIG_ruleelements_x = 0;
std::size_t newIG_llst_x = 0;
std::size_t newIG_llst_y = 0;
std::string newIG_root;
std::string newIG_terminal_static;
std::string newIG_ruleaddrs;
std::string newIG_ruleelements;
std::string newIG_llst;
/*
* Variables for parsed external grammar
*/
std::vector<rule_t> rules;
std::map<std::string,bool> empty;
std::map<std::string,std::set<gelem_t,comparegelem_c>> first;
std::map<std::string,std::set<gelem_t,comparegelem_c>> follow;
std::map<unsigned int,std::set<gelem_t,comparegelem_c>> predict;
std::map<std::string,std::map<char,std::pair<unsigned int, semact>>> ll;
std::vector<unsigned char> terminals;
std::vector<std::string> nonterminals;
size_t lex_position = 0; //position in the source file
std::fstream *source = nullptr; //pointer to the input filestream
/*
* methods
*/
errcode loadfile(const std::string filename);
bool is_final(fsmstate s); //is s a final state of fsm?
char getc();
bool eof();
bool lf();
errcode getgrammar(const std::string filename);
bool copyset(std::set<gelem_t,comparegelem_c> & src, std::set<gelem_t,comparegelem_c> & dst);
void genempty();
void genfirst();
bool getempty(std::vector<gelem_t> & src);
std::set<gelem_t,comparegelem_c> getfirst(std::vector<gelem_t> & src);
llelem_t getllpair(std::string nt, unsigned int ntst, unsigned char t);
void genfollow();
void genpredict();
errcode genll();
errcode genconstll();
void genllsem();
errcode analyze(std::string input, cName & pName);
std::string subanalyze(const std::string input, cGram::errcode *err);
semact getsem(const std::string input);
void *getbstpl(cName & pName);
void *getstrtpl(cName & pName);
bool issub(std::string candidate,std::vector<std::string> & vec);
void showsubs(std::vector<std::string> & vec);
long int b36toint(std::string x);
void * copynametpl(void * src);
public:
//constructor
cGram();
//destructor
virtual ~cGram();
errcode initialize(std::string gname, bool i = true);
errcode parse(const std::string filename);
cName *perform(const std::string input, errcode *err);
void demangleClassName(const std::string& input, cName* retvalue, cGram::errcode& err_i);
void showrules();
void showempty();
void showfirst();
void showfollow();
void showpredict();
void showll();
unsigned int isnt(std::vector<std::string> & nonterminals, std::string nonterminal);
unsigned int ist(std::vector<unsigned char> & terminals, unsigned char terminal);
void resetError() {errString = "";}
std::string errString; //string containing last error message
bool errValid = false; //is the gParser valid? false if it has not been properly initialized yet
bool SubAnalyzeEnabled = false; //enable substitution analysis for GCC demangler?
void setSubAnalyze(bool x);
errcode generateIgrammar(const std::string inputfilename, const std::string outputname);
std::string generatedTerminalStatic;
}; //class cGram
} // namespace demangler
#endif
+23
View File
@@ -0,0 +1,23 @@
/**
* @file include/demangler/igrams.h
* @brief Internal grammar list.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#ifndef DEMANGLER_IGRAMS_H
#define DEMANGLER_IGRAMS_H
//[igram] add internal grammar headers here
#include "demangler/stgrammars/borlandll.h"
#include "demangler/stgrammars/gccll.h"
#include "demangler/stgrammars/msll.h"
namespace demangler {
bool initIgram(std::string gname, cGram* gParser);
void deleteIgrams(cGram* gParser);
} // namespace demangler
#endif
@@ -0,0 +1,25 @@
/**
* @file include/demangler/stgrammars/borlandll.h
* @brief Internal LL grammar for demangler.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#ifndef DEMANGLER_STGRAMMARS_BORLANDLL_H
#define DEMANGLER_STGRAMMARS_BORLANDLL_H
#include "demangler/gparser.h"
namespace demangler {
class cIgram_borlandll {
public:
static unsigned char terminal_static[256];
static cGram::llelem_t llst[280][69];
static cGram::ruleaddr_t ruleaddrs[467];
static cGram::gelem_t ruleelements[603];
static cGram::gelem_t root;
cGram::igram_t getInternalGrammar();
};
} // namespace demangler
#endif
+25
View File
@@ -0,0 +1,25 @@
/**
* @file include/demangler/stgrammars/gccll.h
* @brief Internal LL grammar for demangler.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#ifndef DEMANGLER_STGRAMMARS_GCCLL_H
#define DEMANGLER_STGRAMMARS_GCCLL_H
#include "demangler/gparser.h"
namespace demangler {
class cIgram_gccll {
public:
static unsigned char terminal_static[256];
static cGram::llelem_t llst[254][64];
static cGram::ruleaddr_t ruleaddrs[423];
static cGram::gelem_t ruleelements[445];
static cGram::gelem_t root;
cGram::igram_t getInternalGrammar();
};
} // namespace demangler
#endif
+26
View File
@@ -0,0 +1,26 @@
/**
* @file include/demangler/stgrammars/msll.h
* @brief Internal LL grammar for demangler.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#ifndef DEMANGLER_STGRAMMARS_MSLL_H
#define DEMANGLER_STGRAMMARS_MSLL_H
#include "demangler/gparser.h"
namespace demangler {
class cIgram_msll {
public:
static unsigned char terminal_static[256];
static cGram::llelem_t llst[249][68];
static cGram::ruleaddr_t ruleaddrs[534];
static cGram::gelem_t ruleelements[796];
static cGram::gelem_t root;
cGram::igram_t getInternalGrammar();
};
} // namespace demangler
#endif
+16
View File
@@ -0,0 +1,16 @@
set(DEMANGLER_SOURCES
demangler.cpp
demtools.cpp
gparser.cpp
igrams.cpp
stgrammars/borlandll.cpp
stgrammars/gccll.cpp
stgrammars/msll.cpp
)
add_library(demangler STATIC ${DEMANGLER_SOURCES})
target_include_directories(demangler PUBLIC ${PROJECT_SOURCE_DIR}/include/)
set_property(TARGET demangler PROPERTY CXX_STANDARD 17)
set_property(TARGET demangler PROPERTY CXX_STANDARD_REQUIRED ON)
+131
View File
@@ -0,0 +1,131 @@
/**
* @file src/demangler/demangler.cpp
* @brief Demangler library.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#include <iostream>
#include <string>
#include "demangler/demangler.h"
namespace demangler {
/**
* @brief Constructor of CDemangler class.
* @param gname Grammar name. If internal grammar is used, internal grammar of this name must exist.
* If external grammar is used file with this name must exist and it used as external grammar.
* @param i Use internal grammar? Default setting is true. If set to false, external grammar is used.
*/
CDemangler::CDemangler(std::string gname, bool i):
pGram(new cGram()),
pName(nullptr),
errState(cGram::ERROR_OK) {
//if gname is empty, pGram will not be initialized (may be used for creating new internal grammars)
if (!gname.empty()) {
errState = pGram->initialize(gname, i);
compiler = gname;
}
}
std::unique_ptr<CDemangler> CDemangler::createGcc(bool i)
{
return std::make_unique<CDemangler>("gcc", i);
}
std::unique_ptr<CDemangler> CDemangler::createMs(bool i)
{
return std::make_unique<CDemangler>("ms", i);
}
std::unique_ptr<CDemangler> CDemangler::createBorland(bool i)
{
return std::make_unique<CDemangler>("borland", i);
}
/**
* @brief Destructor of CDemangler class.
*/
CDemangler::~CDemangler() {
delete pGram;
}
/**
* @brief Check if the error state of demangler is ok. Returns false if an error has ocurred during the last action.
* @return Boolean value determining whether everything is ok.
*/
bool CDemangler::isOk() {
if (errState == cGram::ERROR_OK) {
return true;
}
else {
return false;
}
}
/**
* @brief Returns string describing the last error.
*/
std::string CDemangler::printError() {
if (pGram != nullptr) {
return pGram->errString;
}
else {
return "No grammar class allocated. Cannot get error state.";
}
}
/**
* @brief Reset error state.
*/
void CDemangler::resetError() {
if (pGram != nullptr) {
pGram->resetError();
errState = cGram::ERROR_OK;
}
}
/**
* @brief Function which converts external grammar into internal grammar.
* After using this function the demangler object must not be used for demangling.S
* errState may be set if an error occurs.
* @param inputfilename The name of the file which contains grammar rules.
* @param outputname The name of the output grammar.
*/
void CDemangler::createGrammar(std::string inputfilename, std::string outputname) {
errState = pGram->generateIgrammar(inputfilename, outputname);
}
/**
* @brief Demangle the input string and return the demangled name class. errState may be set if an error occurs.
* @param inputName The name to be demangled.
* @return Pointer to a cName object containing all info anout the demangled name.
*/
cName *CDemangler::demangleToClass(std::string inputName) {
return pGram->perform(inputName,&errState);
}
/**
* @brief Demangle the input string and return the demangled name as a string. errState may be set if an error occurs.
* @param inputName The name to be demangled.
* @return String containing the declaration of the demangled name.
*/
std::string CDemangler::demangleToString(std::string inputName) {
std::string retvalue;
resetError();
pName = pGram->perform(inputName,&errState);
retvalue = pName->printall(compiler);
delete pName;
return retvalue;
}
/**
* @brief Set substitution analysis manually to enabled or disabled.
* @param x Boolean value. True means enable, false means disable.
*/
void CDemangler::setSubAnalyze(bool x) {
pGram->setSubAnalyze(x);
}
} // namespace demangler
+82
View File
@@ -0,0 +1,82 @@
/**
* @file src/demangler/demtools.cpp
* @brief Tools and extra functions for demangler.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#include <ctime>
#include <fstream>
#include <sstream>
#include <string>
#include "demangler/demtools.h"
using namespace std;
namespace demangler {
/**
* @brief Function which finds out whether a file exists.
* @param filename Name of the file to be checked.
* @return Boolean value determining whether the file exists or not.
*/
bool fileExists(const std::string &filename) {
ifstream ifile(filename);
return ifile.is_open();
}
/**
* @brief Initializes a sdate_t to default values.
* @param x sdate_t to be initialized..
*/
void initSdate_t(sdate_t &x) {
x.y = 0;
x.m = 0;
x.d = 0;
x.h = 0;
x.min = 0;
x.s = 0;
}
/**
* @brief Get stuct with current date and time.
* @return Struct with current date and time.
*/
sdate_t genTimeStruct() {
sdate_t retvalue;
initSdate_t(retvalue);
time_t t = time(nullptr); // get time now
struct tm * now = localtime( & t );
//year
retvalue.y = now->tm_year + 1900;
//month
retvalue.m = (now->tm_mon + 1);
//day
retvalue.d = now->tm_mday;
//hour
retvalue.h = now->tm_hour;
//minute
retvalue.min = now->tm_min;
//second
retvalue.s = now->tm_sec;
return retvalue;
}
/**
* @brief Replaces strings "tobereplaced" in source with "replacement".
* @param source Source string.
* @param tobereplaced Substring which will be searched for and all of its instances will be replaced.
* @param replacement The replacement string.
*/
void xreplace(string &source, const string &tobereplaced, const string &replacement) {
std::size_t lastfound = 0;
if (tobereplaced != "") {
while (source.find(tobereplaced,lastfound) != source.npos) {
lastfound = source.find(tobereplaced,lastfound);
source.replace(source.find(tobereplaced,lastfound),tobereplaced.length(),replacement);
lastfound += replacement.length();
}
}
}
} // namespace demangler
+467
View File
@@ -0,0 +1,467 @@
<mangled-name> ::= <template-prefix> @ <qualified-name> <sem-unq2f> <function-section> <sem-end>
<template-prefix> ::=
<template-section> ::= % <name-element> $ t <sem-begintempl> <sem-beginbsub> <type> <type-more-template> %
<qualified-name> ::= <name-element> <name-element-more>
<name-element-more> ::=
<name-element-more> ::= @ <name-element> <name-element-more>
<name-element> ::= @ <name-element> #double @ for __linksys__ - ignore that for now and just use qualified name
<name-element> ::= $ <op>
<name-element> ::= <template-section>
<name-element> ::= <name-char> <name-char-more>
<name-char-more> ::= <sem-storename> #no more characters in name, store the name
<name-char-more> ::= <name-char> <name-char-more>
<name-char> ::= <sem-addchartoname> _
<name-char> ::= <sem-addchartoname> a
<name-char> ::= <sem-addchartoname> b
<name-char> ::= <sem-addchartoname> c
<name-char> ::= <sem-addchartoname> d
<name-char> ::= <sem-addchartoname> e
<name-char> ::= <sem-addchartoname> f
<name-char> ::= <sem-addchartoname> g
<name-char> ::= <sem-addchartoname> h
<name-char> ::= <sem-addchartoname> i
<name-char> ::= <sem-addchartoname> j
<name-char> ::= <sem-addchartoname> k
<name-char> ::= <sem-addchartoname> l
<name-char> ::= <sem-addchartoname> m
<name-char> ::= <sem-addchartoname> n
<name-char> ::= <sem-addchartoname> o
<name-char> ::= <sem-addchartoname> p
<name-char> ::= <sem-addchartoname> q
<name-char> ::= <sem-addchartoname> r
<name-char> ::= <sem-addchartoname> s
<name-char> ::= <sem-addchartoname> t
<name-char> ::= <sem-addchartoname> u
<name-char> ::= <sem-addchartoname> v
<name-char> ::= <sem-addchartoname> w
<name-char> ::= <sem-addchartoname> x
<name-char> ::= <sem-addchartoname> y
<name-char> ::= <sem-addchartoname> z
<name-char> ::= <sem-addchartoname> A
<name-char> ::= <sem-addchartoname> B
<name-char> ::= <sem-addchartoname> C
<name-char> ::= <sem-addchartoname> D
<name-char> ::= <sem-addchartoname> E
<name-char> ::= <sem-addchartoname> F
<name-char> ::= <sem-addchartoname> G
<name-char> ::= <sem-addchartoname> H
<name-char> ::= <sem-addchartoname> I
<name-char> ::= <sem-addchartoname> J
<name-char> ::= <sem-addchartoname> K
<name-char> ::= <sem-addchartoname> L
<name-char> ::= <sem-addchartoname> M
<name-char> ::= <sem-addchartoname> N
<name-char> ::= <sem-addchartoname> O
<name-char> ::= <sem-addchartoname> P
<name-char> ::= <sem-addchartoname> Q
<name-char> ::= <sem-addchartoname> R
<name-char> ::= <sem-addchartoname> S
<name-char> ::= <sem-addchartoname> T
<name-char> ::= <sem-addchartoname> U
<name-char> ::= <sem-addchartoname> V
<name-char> ::= <sem-addchartoname> W
<name-char> ::= <sem-addchartoname> X
<name-char> ::= <sem-addchartoname> Y
<name-char> ::= <sem-addchartoname> Z
<name-char> ::= <sem-addchartoname> 0
<name-char> ::= <sem-addchartoname> 1
<name-char> ::= <sem-addchartoname> 2
<name-char> ::= <sem-addchartoname> 3
<name-char> ::= <sem-addchartoname> 4
<name-char> ::= <sem-addchartoname> 5
<name-char> ::= <sem-addchartoname> 6
<name-char> ::= <sem-addchartoname> 7
<name-char> ::= <sem-addchartoname> 8
<name-char> ::= <sem-addchartoname> 9
<function-section> ::= <sem-setnamex>
<function-section> ::= $ <const-vol> q <calling-convention> <parameters>
<const-vol> ::=
<const-vol> ::= <sem-addmconst> x <const-vol>
<const-vol> ::= <sem-addmvol> w <const-vol>
<calling-convention> ::=
<calling-convention> ::= <sem-setfpascal> Q
<calling-convention> ::= q <calling-convention-q>
<calling-convention-q> ::= <sem-setffortran> f
<calling-convention-q> ::= <sem-setfstdcall> s
<calling-convention-q> ::= <sem-setffastcall> r
<calling-convention-q> ::= <sem-setfinterrupt> i
<parameters> ::= <sem-beginbsub> <type> <type-more>
<type-more> ::= <sem-par2f>
<type-more> ::= <sem-storepar> <sem-beginbsub> <type> <type-more>
<type-more-template> ::= <sem-storetemplate>
<type-more-template> ::= <sem-storetemparg> <sem-beginbsub> <type> <type-more-template>
<type> ::= <sem-settypev> v #void
<type> ::= <sem-settypec> c #char
<type> ::= <sem-settypes> s #short int
<type> ::= <sem-settypei> i #int
<type> ::= <sem-settypex> j #__int64
<type> ::= <sem-settypel> l #long int
<type> ::= <sem-settypew> b #wchar_t
<type> ::= <sem-settypef> f #float
<type> ::= <sem-settyped> d #double
<type> ::= <sem-settypee> g #long double
<type> ::= <sem-settypeb> o #bool
<type> ::= z <type-z>
<type> ::= u <type-u>
<type> ::= x <sem-setconst> <type>
<type> ::= p <sem-setptr> <type>
<type> ::= w <sem-setvolatile> <type>
<type> ::= r <sem-setref> <type>
<type> ::= t <typesub>
<type> ::= a <array-number> $ <type>
<array-number> ::= <sem-borlandarr> <number>
<type> ::= <source-name>
<type-z> ::= <sem-settypea> c #signed char
<type-u> ::= <sem-settypeh> c #unsigned char
<type-u> ::= <sem-settypet> s #unsigned short int
<type-u> ::= <sem-settypej> i #unsigned int
<type-u> ::= <sem-settypem> l #unsigned long int
<typesub> ::= <sem-loadborlandsub> 1
<typesub> ::= <sem-loadborlandsub> 2
<typesub> ::= <sem-loadborlandsub> 3
<typesub> ::= <sem-loadborlandsub> 4
<typesub> ::= <sem-loadborlandsub> 5
<typesub> ::= <sem-loadborlandsub> 6
<typesub> ::= <sem-loadborlandsub> 7
<typesub> ::= <sem-loadborlandsub> 8
<typesub> ::= <sem-loadborlandsub> 9
<typesub> ::= <sem-loadborlandsub> a
<typesub> ::= <sem-loadborlandsub> b
<typesub> ::= <sem-loadborlandsub> c
<typesub> ::= <sem-loadborlandsub> d
<typesub> ::= <sem-loadborlandsub> e
<typesub> ::= <sem-loadborlandsub> f
<typesub> ::= <sem-loadborlandsub> g
<typesub> ::= <sem-loadborlandsub> h
<typesub> ::= <sem-loadborlandsub> i
<typesub> ::= <sem-loadborlandsub> j
<typesub> ::= <sem-loadborlandsub> k
<typesub> ::= <sem-loadborlandsub> l
<typesub> ::= <sem-loadborlandsub> m
<typesub> ::= <sem-loadborlandsub> n
<typesub> ::= <sem-loadborlandsub> o
<typesub> ::= <sem-loadborlandsub> p
<typesub> ::= <sem-loadborlandsub> q
<typesub> ::= <sem-loadborlandsub> r
<typesub> ::= <sem-loadborlandsub> s
<typesub> ::= <sem-loadborlandsub> t
<typesub> ::= <sem-loadborlandsub> u
<typesub> ::= <sem-loadborlandsub> v
<typesub> ::= <sem-loadborlandsub> w
<typesub> ::= <sem-loadborlandsub> x
<typesub> ::= <sem-loadborlandsub> y
<typesub> ::= <sem-loadborlandsub> z
<source-name> ::= <source-number>
<source-number> ::= <sem-borlandid> <number> <qualified-name> <sem-unq2p> |
<number> ::= 0
<number> ::= 1
<number> ::= 2
<number> ::= 3
<number> ::= 4
<number> ::= 5
<number> ::= 6
<number> ::= 7
<number> ::= 8
<number> ::= 9
<op> ::= b <op-b>
<op-b> ::= a <op-ba>
<op-ba> ::= d <op-bad>
<op-bad> ::= <sem-setnameo> <sem-setoppl> d #operator +
<op-bad> ::= <sem-setnameo> <sem-setopad> r #operator & (unary)
<op-ba> ::= n <op-ban>
<op-ban> ::= <sem-setnameo> <sem-setopan> d #operator &
<op-ba> ::= r <op-bar>
<op-bar> ::= o <op-baro>
<op-baro> ::= <sem-setnameo> <sem-setoppt> w #operator ->
<op-bar> ::= w <op-barw>
<op-barw> ::= <sem-setnameo> <sem-setoppm> m #operator ->*
<op-ba> ::= s <op-bas>
<op-bas> ::= <sem-setnameo> <sem-setopass> g #operator =
<op-b> ::= c <op-bc>
<op-bc> ::= a <op-bca>
<op-bca> ::= l <op-bcal>
<op-bcal> ::= <sem-setnameo> <sem-setopcl> l #operator ()
<op-bc> ::= m <op-bcm>
<op-bcm> ::= <sem-setnameo> <sem-setopco> p #operator ~
<op-bc> ::= o <op-bco>
<op-bco> ::= m <op-bcom>
<op-bcom> ::= <sem-setnameo> <sem-setopcm> a #operator ,
<op-bc> ::= t <op-bct>
<op-bct> ::= <sem-setnamec> r #constructor
<op-b> ::= d <op-bd>
<op-bd> ::= e <op-bde>
<op-bde> ::= <sem-setnameo> <sem-setopmm> c #operator --
<op-bde> ::= l <op-bdel>
<op-bdel> ::= <sem-setnameo> <sem-setopdl> e #operator delete
<op-bd> ::= i <op-bdi>
<op-bdi> ::= <sem-setnameo> <sem-setopdv> v #operator /
<op-bd> ::= l <op-bdl>
<op-bdl> ::= <sem-setnameo> <sem-setopda> a #operator delete[]
<op-bd> ::= t <op-bdt>
<op-bdt> ::= <sem-setnamed> r #destructor
<op-b> ::= e <op-be>
<op-be> ::= q <op-beq>
<op-beq> ::= <sem-setnameo> <sem-setopeq> l #operator ==
<op-b> ::= g <op-bg>
<op-bg> ::= e <op-bge>
<op-bge> ::= <sem-setnameo> <sem-setopge> q #operator >=
<op-bg> ::= t <op-bgt>
<op-bgt> ::= <sem-setnameo> <sem-setopgt> r #operator >
<op-b> ::= i <op-bi>
<op-bi> ::= n <op-bin>
<op-bin> ::= <sem-setnameo> <sem-setoppp> c #operator ++
<op-bin> ::= <sem-setnameo> <sem-setopde> d #operator * (unary)
<op-b> ::= l <op-bl>
<op-bl> ::= a <op-bla>
<op-bla> ::= n <op-blan>
<op-blan> ::= <sem-setnameo> <sem-setopaa> d #operator &&
<op-bl> ::= e <op-ble>
<op-ble> ::= <sem-setnameo> <sem-setople> q #operator <=
<op-bl> ::= o <op-blo>
<op-blo> ::= <sem-setnameo> <sem-setopoo> r #operator ||
<op-bl> ::= s <op-bls>
<op-bls> ::= <sem-setnameo> <sem-setopls> h #operator <<
<op-bls> ::= <sem-setnameo> <sem-setoplt> s #operator <
<op-b> ::= m <op-bm>
<op-bm> ::= o <op-bmo>
<op-bmo> ::= <sem-setnameo> <sem-setoprm> d #operator %
<op-bm> ::= u <op-bmu>
<op-bmu> ::= <sem-setnameo> <sem-setopml> l #operator *
<op-b> ::= n <op-bn>
<op-bn> ::= e <op-bne>
<op-bne> ::= <sem-setnameo> <sem-setopne> q #operator !=
<op-bne> ::= <sem-setnameo> <sem-setopnw> w #operator new
<op-bn> ::= o <op-bno>
<op-bno> ::= <sem-setnameo> <sem-setopnt> t #operator !
<op-bn> ::= w <op-bnw>
<op-bnw> ::= <sem-setnameo> <sem-setopna> a #operator new[]
<op-b> ::= o <op-bo>
<op-bo> ::= <sem-setnameo> <sem-setopor> r #operator |
<op-b> ::= r <op-br>
<op-br> ::= a <op-bra>
<op-bra> ::= n <op-bran>
<op-bran> ::= <sem-setnameo> <sem-setopann> d #operator &=
<op-br> ::= d <op-brd>
<op-brd> ::= i <op-brdi>
<op-brdi> ::= <sem-setnameo> <sem-setopdvv> v #operator /=
<op-br> ::= l <op-brl>
<op-brl> ::= s <op-brls>
<op-brls> ::= <sem-setnameo> <sem-setoplss> h #operator <<=
<op-br> ::= m <op-brm>
<op-brm> ::= i <op-brmi>
<op-brmi> ::= <sem-setnameo> <sem-setopmii> n #operator -=
<op-brm> ::= o <op-brmo>
<op-brmo> ::= <sem-setnameo> <sem-setoprmm> d #operator %=
<op-brm> ::= u <op-brmu>
<op-brmu> ::= <sem-setnameo> <sem-setopmll> l #operator *=
<op-br> ::= o <op-bro>
<op-bro> ::= <sem-setnameo> <sem-setoporr> r #operator |=
<op-br> ::= p <op-brp>
<op-brp> ::= l <op-brpl>
<op-brpl> ::= <sem-setnameo> <sem-setoppll> u #operator +=
<op-br> ::= r <op-brr>
<op-brr> ::= s <op-brrs>
<op-brrs> ::= <sem-setnameo> <sem-setoprss> h #operator >>=
<op-br> ::= s <op-brs>
<op-brs> ::= <sem-setnameo> <sem-setoprs> h #operator >>
<op-br> ::= x <op-brx>
<op-brx> ::= o <op-brxo>
<op-brxo> ::= <sem-setnameo> <sem-setopeoo> r #operator ^=
<op-b> ::= s <op-bs>
<op-bs> ::= u <op-bsu>
<op-bsu> ::= b <op-bsub>
<op-bsub> ::= <sem-setnameo> <sem-setopmi> #operator -
<op-bsub> ::= <sem-setnameo> <sem-setopix> s #operator []
<op-b> ::= x <op-bx>
<op-bx> ::= o <op-bxo>
<op-bxo> ::= <sem-setnameo> <sem-setopeo> r #operator ^
<sem-addchartoname> ::=
<sem-storename> ::=
<sem-loadid> ::=
<sem-loadarr> ::=
<sem-ssno> ::=
<sem-ssnest> ::=
<sem-stunq> ::=
<sem-loadtsub> ::=
<sem-type2expr> ::=
<sem-exprval> ::=
<sem-beginexpr> ::=
<sem-storeexpr> ::=
<sem-copyexpr> ::=
<sem-storepar> ::=
<sem-begintempl> ::=
<sem-skiptempl> ::=
<sem-storetemparg> ::=
<sem-storetemplate> ::=
<sem-setnametf> ::=
<sem-par2f> ::=
<sem-unq2f> ::=
<sem-unq2p> ::=
<sem-setnamex> ::=
<sem-setnameo> ::=
<sem-par2spec> ::=
<sem-par2ret> ::=
<sem-settypev> ::=
<sem-settypew> ::=
<sem-settypeb> ::=
<sem-settypec> ::=
<sem-settypea> ::=
<sem-settypeh> ::=
<sem-settypes> ::=
<sem-settypet> ::=
<sem-settypei> ::=
<sem-settypej> ::=
<sem-settypel> ::=
<sem-settypem> ::=
<sem-settypex> ::=
<sem-settypey> ::=
<sem-settypen> ::=
<sem-settypeo> ::=
<sem-settypef> ::=
<sem-settyped> ::=
<sem-settypee> ::=
<sem-settypeg> ::=
<sem-settypez> ::=
<sem-setrestrict> ::=
<sem-setvolatile> ::=
<sem-setconst> ::=
<sem-setptr> ::=
<sem-setref> ::=
<sem-setrval> ::=
<sem-setcpair> ::=
<sem-setim> ::=
<sem-substd> ::=
<sem-subalc> ::=
<sem-substr> ::=
<sem-substrs> ::=
<sem-subistr> ::=
<sem-subostr> ::=
<sem-subiostr> ::=
<sem-loadsub> ::=
<sem-setnamec> ::=
<sem-setnamed> ::=
<sem-setopnw> ::=
<sem-setopna> ::=
<sem-setopdl> ::=
<sem-setopda> ::=
<sem-setopps> ::=
<sem-setopng> ::=
<sem-setopad> ::=
<sem-setopde> ::=
<sem-setopco> ::=
<sem-setoppl> ::=
<sem-setopmi> ::=
<sem-setopml> ::=
<sem-setopdv> ::=
<sem-setoprm> ::=
<sem-setopan> ::=
<sem-setopor> ::=
<sem-setopeo> ::=
<sem-setopass> ::=
<sem-setoppll> ::=
<sem-setopmii> ::=
<sem-setopmll> ::=
<sem-setopdvv> ::=
<sem-setoprmm> ::=
<sem-setopann> ::=
<sem-setoporr> ::=
<sem-setopeoo> ::=
<sem-setopls> ::=
<sem-setoprs> ::=
<sem-setoplss> ::=
<sem-setoprss> ::=
<sem-setopeq> ::=
<sem-setopne> ::=
<sem-setoplt> ::=
<sem-setopgt> ::=
<sem-setople> ::=
<sem-setopnt> ::=
<sem-setopaa> ::=
<sem-setopoo> ::=
<sem-setoppp> ::=
<sem-setopmm> ::=
<sem-setopcm> ::=
<sem-setoppm> ::=
<sem-setoppt> ::=
<sem-setopcl> ::=
<sem-setopix> ::=
<sem-setopge> ::=
<sem-setopqu> ::=
<sem-setopst> ::=
<sem-setopsz> ::=
<sem-setopat> ::=
<sem-setopaz> ::=
<sem-setopcv> ::=
<sem-setopxx> ::=
<sem-setnamef> ::=
<sem-setnamevt> ::=
<sem-reversename> ::=
<sem-setprivate> ::=
<sem-setpublic> ::=
<sem-setprotected> ::=
<sem-setfcdecl> ::=
<sem-setfpascal> ::=
<sem-setffortran> ::=
<sem-setfthiscall> ::=
<sem-setfstdcall> ::=
<sem-setffastcall> ::=
<sem-setfinterrupt> ::=
<sem-setunion> ::=
<sem-setstruct> ::=
<sem-setclass> ::=
<sem-setenum> ::=
<sem-setstatic> ::=
<sem-setvirtual> ::=
<sem-stclconst> ::=
<sem-stclvol> ::=
<sem-stclfar> ::=
<sem-stclhuge> ::=
<sem-savenamesub> ::=
<sem-loadnamesub> ::=
<sem-mstemplsub> ::=
<sem-setnamer0> ::=
<sem-setnamer1> ::=
<sem-setnamer2> ::=
<sem-setnamer3> ::=
<sem-setnamer4> ::=
<sem-setname_a> ::=
<sem-setname_b> ::=
<sem-setname_c> ::=
<sem-setname_d> ::=
<sem-setname_e> ::=
<sem-setname_f> ::=
<sem-setname_g> ::=
<sem-setname_h> ::=
<sem-setname_i> ::=
<sem-setname_j> ::=
<sem-setname_k> ::=
<sem-setname_l> ::=
<sem-setname_m> ::=
<sem-setname_n> ::=
<sem-setname_o> ::=
<sem-setname_p> ::=
<sem-setname_q> ::=
<sem-setname_r> ::=
<sem-setname_s> ::=
<sem-setname_t> ::=
<sem-setname_u> ::=
<sem-setname_v> ::=
<sem-setname_w> ::=
<sem-setname_x> ::=
<sem-setname_y> ::=
<sem-setname_z> ::=
<sem-templ2tftpl> ::=
<sem-beginbsub> ::= #begin built-in substitution
<sem-loadbsub> ::=
<sem-addmconst> ::=
<sem-addmvol> ::=
<sem-addmfar> ::=
<sem-addmhuge> ::=
<sem-loadmsnum> ::=
<sem-numtorttibcd> ::=
<sem-numtotype> ::=
<sem-normalizeparname> ::=
<sem-borlandid> ::=
<sem-loadborlandsub> ::=
<sem-borlandarr> ::=
<sem-end> ::=
+423
View File
@@ -0,0 +1,423 @@
<mangled-name> ::= _ <mangled-name2>
<mangled-name2> ::= <mangled-name3> <sem-end>
<mangled-name2> ::= _ <mangled-name3> <sem-end>
<mangled-name3> ::= Z <encoding>
<encoding> ::= <name> <bare-function-type>
<name> ::= <nested-name>
<name> ::= <source-name> <template-args>
<name> ::= S <name-sub> #deciding rule
<name-sub> ::= <sem-ssno> <substitution2-t> <unqualified-name>
<name-sub> ::= <sem-ssno> <substitution2> <template-args>
<template-args> ::= <sem-skiptempl>
<template-args> ::= <sem-begintempl> I <template-arg> <template-arg-more> E
<template-args-nostore> ::= <sem-skiptempl>
<template-args-nostore> ::= <sem-begintempl> I <template-arg-nostore> <template-arg-nostore-more> E
<template-arg-more> ::= <sem-storetemparg> <template-arg> <template-arg-more>
<template-arg-more> ::= <sem-storetemplate>
<template-arg> ::= <type>
<template-arg> ::= <expr-primary>
<template-arg-nostore> ::= <type>
<template-arg-nostore> ::= <expr-primary>
<template-arg-nostore-more> ::= <sem-storetemparg> <template-arg> <template-arg-more>
<template-arg-nostore-more> ::= <sem-templ2tftpl>
<template-param> ::= T <template-param2>
<template-param2> ::= <sem-loadtsub> _
<template-param2> ::= <sem-loadtsub> <number> _ #<unscoped-name> ::= <unqualified-name> #<unscoped-name> ::= St <unqualified-name> # unused, but may be useful in the future
<nested-name> ::= <sem-ssnest> N <CV-qualifiers> <unqualified-name> <unqualified-name-more> E
<prefix> ::=
<prefix> ::= <substitution>
<prefix> ::= <template-param>
<unqualified-function-name> ::= <unqualified-name>
<unqualified-function-name> ::= <ctor-dtor-name> <template-args-nostore>
<unqualified-function-name> ::= <operator-name-setname>
<operator-name-setname> ::= <sem-setnameo> <operator-name> <template-args>
<operator-name-setname> ::= <sem-setnameo> <operator-name-cv>
<unqualified-name> ::= <source-name> <template-args>
<unqualified-name> ::= <substitution> <template-args>
<unqualified-name-more> ::= <unqualified-function-name> <unqualified-name-more>
<unqualified-name-more> ::=
<source-name> ::= <source-number>
<source-number> ::= <sem-loadid> <number>
<number> ::= 0
<number> ::= 1
<number> ::= 2
<number> ::= 3
<number> ::= 4
<number> ::= 5
<number> ::= 6
<number> ::= 7
<number> ::= 8
<number> ::= 9
<ctor-dtor-name> ::= <sem-setnamec> C <ctor>
<ctor> ::= 1 # complete object constructor
<ctor> ::= 2 # base object constructor
<ctor> ::= 3 # complete object allocating constructor
<ctor-dtor-name> ::= <sem-setnamed> D <dtor>
<dtor> ::= 0 # deleting destructor
<dtor> ::= 1 # complete object destructor
<dtor> ::= 2 # base object destructor
<CV-qualifiers> ::= <r> <V> <K>
<r> ::= <sem-setrestrict> r # restrict
<r> ::=
<V> ::= <sem-setvolatile> V # volatile
<V> ::=
<K> ::= <sem-setconst> K # const
<K> ::=
<bare-function-type> ::= <sem-unq2f> <bare-function-type2>
<bare-function-type2> ::= <type> <another-type> <sem-par2f>
<bare-function-type2> ::= <sem-setnamex>
<another-type> ::= <sem-storepar> <type> <another-type>
<another-type> ::=
<type> ::= <type-qualifier> <type2>
<type-qualifier> ::=
<type-qualifier> ::= <sem-setrestrict> r <type-qualifier>
<type-qualifier> ::= <sem-setvolatile> V <type-qualifier>
<type-qualifier> ::= <sem-setconst> K <type-qualifier>
<type-qualifier> ::= <sem-setptr> P <type-qualifier>
<type-qualifier> ::= <sem-setref> R <type-qualifier>
<type-qualifier> ::= <sem-setrval> O <type-qualifier>
<type-qualifier> ::= <sem-setcpair> C <type-qualifier>
<type-qualifier> ::= <sem-setim> G <type-qualifier>
<type2> ::= <template-param>
<type2> ::= <builtin-type>
<type2> ::= <class-enum-type>
<type2> ::= <array-type>
<array-type> ::= A <array-number> _ <type>
<array-number> ::= <sem-loadarr> <number>
<class-enum-type> ::= <name>
<builtin-type> ::= <sem-settypev> v # void
<builtin-type> ::= <sem-settypew> w # wchar_t
<builtin-type> ::= <sem-settypeb> b # bool
<builtin-type> ::= <sem-settypec> c # char
<builtin-type> ::= <sem-settypea> a # signed char
<builtin-type> ::= <sem-settypeh> h # unsigned char
<builtin-type> ::= <sem-settypes> s # short
<builtin-type> ::= <sem-settypet> t # unsigned short
<builtin-type> ::= <sem-settypei> i # int
<builtin-type> ::= <sem-settypej> j # unsigned int
<builtin-type> ::= <sem-settypel> l # long
<builtin-type> ::= <sem-settypem> m # unsigned long
<builtin-type> ::= <sem-settypex> x # long long, __int64
<builtin-type> ::= <sem-settypey> y # unsigned long long, __int64
<builtin-type> ::= <sem-settypen> n # __int128
<builtin-type> ::= <sem-settypeo> o # unsigned __int128
<builtin-type> ::= <sem-settypef> f # float
<builtin-type> ::= <sem-settyped> d # double
<builtin-type> ::= <sem-settypee> e # long double, __float80
<builtin-type> ::= <sem-settypeg> g # __float128
<builtin-type> ::= <sem-settypez> z # ellipsis
<builtin-type> ::= D <builtin-type2>
<builtin-type2> ::= d # IEEE 754r decimal floating point (64 bits)
<builtin-type2> ::= e # IEEE 754r decimal floating point (128 bits)
<builtin-type2> ::= f # IEEE 754r decimal floating point (32 bits)
<builtin-type2> ::= h # IEEE 754r half-precision floating point (16 bits)
<builtin-type2> ::= i # char32_t
<builtin-type2> ::= s # char16_t
<builtin-type2> ::= a # auto (in dependent new-expressions)
<builtin-type2> ::= n # std::nullptr_t (i.e., decltype(nullptr))
<substitution> ::= S <subst>
<subst> ::= <substitution2-t> # separating St
<subst> ::= <substitution2>
<substitution2> ::= <seq-id> _
<substitution2> ::= <sem-loadsub> _
<seq-id> ::= <sem-loadsub> 0
<seq-id> ::= <sem-loadsub> 1
<seq-id> ::= <sem-loadsub> 2
<seq-id> ::= <sem-loadsub> 3
<seq-id> ::= <sem-loadsub> 4
<seq-id> ::= <sem-loadsub> 5
<seq-id> ::= <sem-loadsub> 6
<seq-id> ::= <sem-loadsub> 7
<seq-id> ::= <sem-loadsub> 8
<seq-id> ::= <sem-loadsub> 9
<seq-id> ::= <sem-loadsub> A
<seq-id> ::= <sem-loadsub> B
<seq-id> ::= <sem-loadsub> C
<seq-id> ::= <sem-loadsub> D
<seq-id> ::= <sem-loadsub> E
<seq-id> ::= <sem-loadsub> F
<seq-id> ::= <sem-loadsub> G
<seq-id> ::= <sem-loadsub> H
<seq-id> ::= <sem-loadsub> I
<seq-id> ::= <sem-loadsub> J
<seq-id> ::= <sem-loadsub> K
<seq-id> ::= <sem-loadsub> L
<seq-id> ::= <sem-loadsub> M
<seq-id> ::= <sem-loadsub> N
<seq-id> ::= <sem-loadsub> O
<seq-id> ::= <sem-loadsub> P
<seq-id> ::= <sem-loadsub> Q
<seq-id> ::= <sem-loadsub> R
<seq-id> ::= <sem-loadsub> S
<seq-id> ::= <sem-loadsub> T
<seq-id> ::= <sem-loadsub> U
<seq-id> ::= <sem-loadsub> V
<seq-id> ::= <sem-loadsub> W
<seq-id> ::= <sem-loadsub> X
<seq-id> ::= <sem-loadsub> Y
<seq-id> ::= <sem-loadsub> Z
<substitution2-t> ::= <sem-substd> t # ::std::
<substitution2> ::= <sem-subalc> a # ::std::allocator
<substitution2> ::= <sem-substr> b # ::std::basic_string
<substitution2> ::= <sem-substrs> s # ::std::basic_string<char,::std::char_traits<char>,::std::allocator<char>>
<substitution2> ::= <sem-subistr> i # ::std::basic_istream<char, std::char_traits<char> >
<substitution2> ::= <sem-subostr> o # ::std::basic_ostream<char, std::char_traits<char> >
<substitution2> ::= <sem-subiostr> d # ::std::basic_iostream<char, std::char_traits<char> >
<operator-name> ::= a <operator-name-a>
<operator-name> ::= c <operator-name-c>
<operator-name> ::= d <operator-name-d>
<operator-name> ::= e <operator-name-e>
<operator-name> ::= g <operator-name-g>
<operator-name> ::= i <operator-name-i>
<operator-name> ::= l <operator-name-l>
<operator-name> ::= m <operator-name-m>
<operator-name> ::= n <operator-name-n>
<operator-name> ::= o <operator-name-o>
<operator-name> ::= p <operator-name-p>
<operator-name> ::= q <operator-name-q>
<operator-name> ::= r <operator-name-r>
<operator-name> ::= s <operator-name-s>
<operator-name-a> ::= <sem-setopaa> a # &&
<operator-name-a> ::= <sem-setopad> d # & (unary)
<operator-name-a> ::= <sem-setopan> n # &
<operator-name-a> ::= <sem-setopat> t # alignof (a type)
<operator-name-a> ::= <sem-setopaz> z # alignof (an expression)
<operator-name-a> ::= <sem-setopass> S # =
<operator-name-a> ::= <sem-setopann> N # &=
<operator-name-c> ::= <sem-setopcm> m # ,
<operator-name-c> ::= <sem-setopcl> l # ()
<operator-name-c> ::= <sem-setopco> o # ~
<operator-name-cv> ::= <sem-setopcv> v <type> <sem-par2spec> # (cast)
<operator-name-d> ::= <sem-setopdl> l # delete
<operator-name-d> ::= <sem-setopda> a # delete[]
<operator-name-d> ::= <sem-setopde> e # * (unary)
<operator-name-d> ::= <sem-setopdv> v # /
<operator-name-d> ::= <sem-setopdvv> V # /=
<operator-name-e> ::= <sem-setopeo> o # ^
<operator-name-e> ::= <sem-setopeoo> O # ^=
<operator-name-e> ::= <sem-setopeq> q # ==
<operator-name-g> ::= <sem-setopgt> t # >
<operator-name-g> ::= <sem-setopge> e # >=
<operator-name-i> ::= <sem-setopix> x # []
<operator-name-l> ::= <sem-setopls> s # <<
<operator-name-l> ::= <sem-setoplss> S # <<=
<operator-name-l> ::= <sem-setoplt> t # <
<operator-name-l> ::= <sem-setople> e # <=
<operator-name-m> ::= <sem-setopmi> i # -
<operator-name-m> ::= <sem-setopml> l # *
<operator-name-m> ::= <sem-setopmii> I # -=
<operator-name-m> ::= <sem-setopmll> L # *=
<operator-name-m> ::= <sem-setopmm> m # -- (postfix in <expression> context)
<operator-name-n> ::= <sem-setopnw> w # new
<operator-name-n> ::= <sem-setopna> a # new[]
<operator-name-n> ::= <sem-setopng> g # - (unary)
<operator-name-n> ::= <sem-setopne> e # !=
<operator-name-n> ::= <sem-setopnt> t # !
<operator-name-o> ::= <sem-setopor> r # |
<operator-name-o> ::= <sem-setoporr> R # |=
<operator-name-o> ::= <sem-setopoo> o # ||
<operator-name-p> ::= <sem-setopps> s # + (unary)
<operator-name-p> ::= <sem-setoppl> l # +
<operator-name-p> ::= <sem-setoppll> L # +=
<operator-name-p> ::= <sem-setoppp> p # ++ (postfix in <expression> context)
<operator-name-p> ::= <sem-setoppm> m # ->*
<operator-name-p> ::= <sem-setoppt> t # ->
<operator-name-q> ::= <sem-setopqu> u # ?
<operator-name-r> ::= <sem-setoprm> m # %
<operator-name-r> ::= <sem-setoprmm> M # %=
<operator-name-r> ::= <sem-setoprs> s # >>
<operator-name-r> ::= <sem-setoprss> S # >>=
<operator-name-s> ::= <sem-setopst> t # sizeof (a type)
<operator-name-s> ::= <sem-setopsz> z # sizeof (an expression)
<expr-primary> ::= <sem-beginexpr> L <builtin-type> <sem-type2expr> <expr-number> E <sem-storeexpr>
<expr-number> ::= <sem-exprval> <number>
<sem-addchartoname> ::=
<sem-storename> ::=
<sem-loadid> ::=
<sem-loadarr> ::=
<sem-ssno> ::=
<sem-ssnest> ::=
<sem-stunq> ::=
<sem-loadtsub> ::=
<sem-type2expr> ::=
<sem-exprval> ::=
<sem-beginexpr> ::=
<sem-storeexpr> ::=
<sem-copyexpr> ::=
<sem-storepar> ::=
<sem-begintempl> ::=
<sem-skiptempl> ::=
<sem-storetemparg> ::=
<sem-storetemplate> ::=
<sem-setnametf> ::=
<sem-par2f> ::=
<sem-unq2f> ::=
<sem-unq2p> ::=
<sem-setnamex> ::=
<sem-setnameo> ::=
<sem-par2spec> ::=
<sem-par2ret> ::=
<sem-settypev> ::=
<sem-settypew> ::=
<sem-settypeb> ::=
<sem-settypec> ::=
<sem-settypea> ::=
<sem-settypeh> ::=
<sem-settypes> ::=
<sem-settypet> ::=
<sem-settypei> ::=
<sem-settypej> ::=
<sem-settypel> ::=
<sem-settypem> ::=
<sem-settypex> ::=
<sem-settypey> ::=
<sem-settypen> ::=
<sem-settypeo> ::=
<sem-settypef> ::=
<sem-settyped> ::=
<sem-settypee> ::=
<sem-settypeg> ::=
<sem-settypez> ::=
<sem-setrestrict> ::=
<sem-setvolatile> ::=
<sem-setconst> ::=
<sem-setptr> ::=
<sem-setref> ::=
<sem-setrval> ::=
<sem-setcpair> ::=
<sem-setim> ::=
<sem-substd> ::=
<sem-subalc> ::=
<sem-substr> ::=
<sem-substrs> ::=
<sem-subistr> ::=
<sem-subostr> ::=
<sem-subiostr> ::=
<sem-loadsub> ::=
<sem-setnamec> ::=
<sem-setnamed> ::=
<sem-setopnw> ::=
<sem-setopna> ::=
<sem-setopdl> ::=
<sem-setopda> ::=
<sem-setopps> ::=
<sem-setopng> ::=
<sem-setopad> ::=
<sem-setopde> ::=
<sem-setopco> ::=
<sem-setoppl> ::=
<sem-setopmi> ::=
<sem-setopml> ::=
<sem-setopdv> ::=
<sem-setoprm> ::=
<sem-setopan> ::=
<sem-setopor> ::=
<sem-setopeo> ::=
<sem-setopass> ::=
<sem-setoppll> ::=
<sem-setopmii> ::=
<sem-setopmll> ::=
<sem-setopdvv> ::=
<sem-setoprmm> ::=
<sem-setopann> ::=
<sem-setoporr> ::=
<sem-setopeoo> ::=
<sem-setopls> ::=
<sem-setoprs> ::=
<sem-setoplss> ::=
<sem-setoprss> ::=
<sem-setopeq> ::=
<sem-setopne> ::=
<sem-setoplt> ::=
<sem-setopgt> ::=
<sem-setople> ::=
<sem-setopnt> ::=
<sem-setopaa> ::=
<sem-setopoo> ::=
<sem-setoppp> ::=
<sem-setopmm> ::=
<sem-setopcm> ::=
<sem-setoppm> ::=
<sem-setoppt> ::=
<sem-setopcl> ::=
<sem-setopix> ::=
<sem-setopge> ::=
<sem-setopqu> ::=
<sem-setopst> ::=
<sem-setopsz> ::=
<sem-setopat> ::=
<sem-setopaz> ::=
<sem-setopcv> ::=
<sem-setopxx> ::=
<sem-setnamef> ::=
<sem-setnamevt> ::=
<sem-reversename> ::=
<sem-setprivate> ::=
<sem-setpublic> ::=
<sem-setprotected> ::=
<sem-setfcdecl> ::=
<sem-setfpascal> ::=
<sem-setffortran> ::=
<sem-setfthiscall> ::=
<sem-setfstdcall> ::=
<sem-setffastcall> ::=
<sem-setfinterrupt> ::=
<sem-setunion> ::=
<sem-setstruct> ::=
<sem-setclass> ::=
<sem-setenum> ::=
<sem-setstatic> ::=
<sem-setvirtual> ::=
<sem-stclconst> ::=
<sem-stclvol> ::=
<sem-stclfar> ::=
<sem-stclhuge> ::=
<sem-savenamesub> ::=
<sem-loadnamesub> ::=
<sem-mstemplsub> ::=
<sem-setnamer0> ::=
<sem-setnamer1> ::=
<sem-setnamer2> ::=
<sem-setnamer3> ::=
<sem-setnamer4> ::=
<sem-setname_a> ::=
<sem-setname_b> ::=
<sem-setname_c> ::=
<sem-setname_d> ::=
<sem-setname_e> ::=
<sem-setname_f> ::=
<sem-setname_g> ::=
<sem-setname_h> ::=
<sem-setname_i> ::=
<sem-setname_j> ::=
<sem-setname_k> ::=
<sem-setname_l> ::=
<sem-setname_m> ::=
<sem-setname_n> ::=
<sem-setname_o> ::=
<sem-setname_p> ::=
<sem-setname_q> ::=
<sem-setname_r> ::=
<sem-setname_s> ::=
<sem-setname_t> ::=
<sem-setname_u> ::=
<sem-setname_v> ::=
<sem-setname_w> ::=
<sem-setname_x> ::=
<sem-setname_y> ::=
<sem-setname_z> ::=
<sem-templ2tftpl> ::=
<sem-beginbsub> ::= #begin built-in substitution
<sem-loadbsub> ::=
<sem-addmconst> ::=
<sem-addmvol> ::=
<sem-addmfar> ::=
<sem-addmhuge> ::=
<sem-loadmsnum> ::=
<sem-numtorttibcd> ::=
<sem-numtotype> ::=
<sem-normalizeparname> ::=
<sem-borlandid> ::=
<sem-loadborlandsub> ::=
<sem-borlandarr> ::=
<sem-end> ::=
+534
View File
@@ -0,0 +1,534 @@
<mangled-name> ::= ? <mangled-name-2>
<mangled-name-2> ::= ? <mangled-name-qs>
<mangled-name-qs> ::= _ <mangled-name-qssub>
<mangled-name-qs> ::= 0 <name-cover> <sem-setnamec> <sem-unq2f> <modif> <const-vol> <calling-conv> @ <parameters> <terma> Z <sem-end>
<mangled-name-qs> ::= 1 <name-cover> <sem-setnamed> <sem-unq2f> <modif> <const-vol> <calling-conv> @ <parameters> <terma>Z <sem-end>
<mangled-name-qs> ::= <sem-setnameo> <optype> <name-cover> <sem-unq2f> <mangled-name-data>
<optype> ::= <sem-setopdl> 3
<optype> ::= <sem-setopix> A
<optype> ::= <sem-setopcl> R
<optype> ::= <sem-setoppt> C
<optype> ::= <sem-setoppp> E
<optype> ::= <sem-setopmm> F
<optype> ::= <sem-setopnw> 2
<optype> ::= <sem-setopde> D
<optype> ::= <sem-setopad> I
<optype> ::= <sem-setopps> H
<optype> ::= <sem-setopng> G
<optype> ::= <sem-setopnt> 7
<optype> ::= <sem-setopco> S
<optype> ::= <sem-setoppm> J
<optype> ::= <sem-setopdv> K
<optype> ::= <sem-setoprm> L
<optype> ::= <sem-setopls> 6
<optype> ::= <sem-setoprs> 5
<optype> ::= <sem-setoplt> M
<optype> ::= <sem-setopgt> O
<optype> ::= <sem-setople> N
<optype> ::= <sem-setopge> P
<optype> ::= <sem-setopeq> 8
<optype> ::= <sem-setopne> 9
<optype> ::= <sem-setopor> U
<optype> ::= <sem-setopeo> T
<optype> ::= <sem-setopaa> V
<optype> ::= <sem-setopoo> W
<optype> ::= <sem-setopass> 4
<optype> ::= <sem-setopmll> X
<optype> ::= <sem-setoppll> Y
<optype> ::= <sem-setopmii> Z
<optype> ::= <sem-setopcm> Q
<optype> ::= <sem-setopcv> B
<optype_> ::= <sem-setopna> U
<optype_> ::= <sem-setopda> V
<optype_> ::= <sem-setopdvv> 0
<optype_> ::= <sem-setoprmm> 1
<optype_> ::= <sem-setoprss> 2
<optype_> ::= <sem-setoplss> 3
<optype_> ::= <sem-setopann> 4
<optype_> ::= <sem-setoporr> 5
<optype_> ::= <sem-setopeoo> 6
<terma> ::=
<terma> ::= @
<mangled-name-qssub> ::= 7 <name-cover> <sem-setnamevt> <sem-unq2f> <mangled-name-data>
<mangled-name-qssub> ::= R <mangled-name-qssub-r>
<mangled-name-qssub-r> ::= <r-num> <name-cover> <sem-unq2f> 8 <sem-end>
<mangled-name-qssub-r> ::= <sem-setnamer4> 4 <name-cover> <sem-unq2f> <mangled-name-data>
<mangled-name-qssub-r> ::= <sem-setnamer1> 1 <sem-loadmsnum> <msnum> <sem-numtorttibcd> <sem-loadmsnum> <msnum> <sem-numtorttibcd> <sem-loadmsnum> <msnum> <sem-numtorttibcd> <sem-loadmsnum> <msnum> <sem-numtorttibcd> <name-cover> <sem-unq2f> <terma> 8 <sem-end>
<mangled-name-qssub-r> ::= <sem-setnamer0> 0 <storage-return> <type> <sem-par2ret> @ 8 <sem-end>
<r-num> ::= <sem-setnamer2> 2
<r-num> ::= <sem-setnamer3> 3
<mangled-name-qssub> ::= <sem-setnameo> <optype_> <name-cover> <sem-unq2f> <mangled-name-data>
<mangled-name-qssub> ::= <qssub> <name-cover> <sem-unq2f> <mangled-name-data>
<qssub> ::= <sem-setname_a> A
<qssub> ::= <sem-setname_b> B
<qssub> ::= <sem-setname_d> D
<qssub> ::= <sem-setname_e> E
<qssub> ::= <sem-setname_f> F
<qssub> ::= <sem-setname_g> G
<qssub> ::= <sem-setname_h> H
<qssub> ::= <sem-setname_i> I
<qssub> ::= <sem-setname_j> J
<qssub> ::= <sem-setname_k> K
<qssub> ::= <sem-setname_l> L
<qssub> ::= <sem-setname_m> M
<qssub> ::= <sem-setname_n> N
<qssub> ::= <sem-setname_o> O
<qssub> ::= <sem-setname_q> Q
<qssub> ::= <sem-setname_s> S
<qssub> ::= <sem-setname_t> T
<qssub> ::= <sem-setname_x> X
<qssub> ::= <sem-setname_y> Y
<storage-return> ::=
<storage-return> ::= ? <storage-return-2>
<storage-return-2> ::= A
<storage-return-2> ::= <sem-setconst> B
<storage-return-2> ::= <sem-setvol> C
<storage-return-2> ::= <sem-setconst> <sem-setvol> D
<mangled-name-qs> ::= <name-cover-qs> <sem-unq2f> <mangled-name-data>
<mangled-name-2> ::= <name-cover-noqs> <sem-unq2f> <mangled-name-data>
<mangled-name-data> ::= <data-object> <sem-end>
<mangled-name-data> ::= <modif> <const-vol> <calling-conv> <storage-return> <type> <sem-par2ret> <parameters> <terma> Z <sem-end>
<mangled-name-data> ::= <near-far> <calling-conv> <storage-return> <type> <sem-par2ret> <parameters> <terma> Z <sem-end>
<data-object> ::= 6 <storage-class> <terma>
<data-object> ::= 3 <sem-setnamex> <type> <sem-par2ret> <storage-class> #global object
<data-object> ::= 2 <sem-setnamex> <sem-setpublic> <sem-setstatic> <type> <sem-par2ret> <storage-class> #static class member object
<data-object> ::= 1 <sem-setnamex> <sem-setprotected> <sem-setstatic> <type> <sem-par2ret> <storage-class> #static class member object
<data-object> ::= 0 <sem-setnamex> <sem-setprivate> <sem-setstatic> <type> <sem-par2ret> <storage-class> #static class member object
<msnum> ::= ?
<msnum> ::= 0
<msnum> ::= 1
<msnum> ::= 2
<msnum> ::= 3
<msnum> ::= 4
<msnum> ::= 5
<msnum> ::= 6
<msnum> ::= 7
<msnum> ::= 8
<msnum> ::= 9
<msnum> ::= A
<msnum> ::= B
<msnum> ::= C
<msnum> ::= D
<msnum> ::= E
<msnum> ::= F
<msnum> ::= G
<msnum> ::= H
<msnum> ::= I
<msnum> ::= J
<msnum> ::= K
<msnum> ::= L
<msnum> ::= M
<msnum> ::= N
<msnum> ::= O
<msnum> ::= P
<storage-class> ::= Q1@ #member pointers, member function pointers
<storage-class> ::= A #near
<storage-class> ::= <sem-stclconst> B #const
<storage-class> ::= <sem-stclvol> C #volatile
<storage-class> ::= <sem-stclconst> <sem-stclvol> D #const volatile
<storage-class> ::= <sem-stclfar> E #far
<storage-class> ::= <sem-stclconst> <sem-stclfar> F #const far
<storage-class> ::= <sem-stclvol> <sem-stclfar> G #volatile far
<storage-class> ::= <sem-stclconst> <sem-stclvol> <sem-stclfar> H #const volatile far
<storage-class> ::= <sem-stclhuge> I #huge
<modif> ::= <sem-setprivate> A #private default
<modif> ::= <sem-setprivate> B #private far
<modif> ::= <sem-setprivate> <sem-setstatic> C #private static
<modif> ::= <sem-setprivate> <sem-setstatic> D #private static far
<modif> ::= <sem-setprivate> <sem-setvirtual> E #private virtual
<modif> ::= <sem-setprivate> <sem-setvirtual> F #private virtual far
<modif> ::= <sem-setprotected> I #protected default
<modif> ::= <sem-setprotected> J #protected far
<modif> ::= <sem-setprotected> <sem-setstatic> K #protected static
<modif> ::= <sem-setprotected> <sem-setstatic> L #protected static far
<modif> ::= <sem-setprotected> <sem-setvirtual> M #protected virtual
<modif> ::= <sem-setprotected> <sem-setvirtual> N #protected virtual far
<modif> ::= <sem-setpublic> Q #public default
<modif> ::= <sem-setpublic> R #public far
<modif> ::= <sem-setpublic> <sem-setstatic> S #public static
<modif> ::= <sem-setpublic> <sem-setstatic> T #public static far
<modif> ::= <sem-setpublic> <sem-setvirtual> U #public virtual
<modif> ::= <sem-setpublic> <sem-setvirtual> V #public virtual far
<const-vol-e> ::=
<const-vol-e> ::= <const-vol>
<const-vol> ::= A #default
<const-vol> ::= <sem-addmconst> B #const
<const-vol> ::= <sem-addmvol> C #volatile
<const-vol> ::= <sem-addmconst> <sem-addmvol> D #const volatile
<calling-conv> ::= <sem-setfcdecl> A #__cdecl
<calling-conv> ::= <sem-setfpascal> C #__pascal
<calling-conv> ::= <sem-setfthiscall> E #__thiscall
<calling-conv> ::= <sem-setfstdcall> G #__stdcall
<calling-conv> ::= <sem-setffastcall> I #__fastcall
<name-cover-qs> ::= <name-qs> @ <namespace-x> @
<name-cover-noqs> ::= <name-element-noqs> <namespace-x> @
<name-cover> ::= <name-element> <namespace-x> @
<name-cover> ::= @
<name-element> ::= <name> @
<name-element> ::= <name-sub>
<name-element-noqs> ::= <name-noqs> @
<name-element-noqs> ::= <name-sub>
<name-sub> ::= <sem-loadnamesub> 0
<name-sub> ::= <sem-loadnamesub> 1
<name-sub> ::= <sem-loadnamesub> 2
<name-sub> ::= <sem-loadnamesub> 3
<name-sub> ::= <sem-loadnamesub> 4
<name-sub> ::= <sem-loadnamesub> 5
<name-sub> ::= <sem-loadnamesub> 6
<name-sub> ::= <sem-loadnamesub> 7
<name-sub> ::= <sem-loadnamesub> 8
<name-sub> ::= <sem-loadnamesub> 9
<name-elemental> ::= <name-char-first> <name-char-more>
<template-header> ::= <name-elemental> @
<template-header> ::= ? <template-op>
<template-op> ::= <sem-setnameo> <optype>
<template-op> ::= <sem-setnameo> _ <optype_>
<name-qs> ::= $ <template-header> <sem-begintempl> <sem-mstemplsub> <template-arg> <template-arg-more> <sem-savenamesub>
<name-noqs> ::= <name-elemental> <sem-savenamesub>
<name> ::= ? <name-qs>
<name> ::= <name-noqs>
<name-char-more> ::= <name-char> <name-char-more>
<name-char-more> ::= <name-char-first> <name-char-more>
<name-char-more> ::= <sem-storename>
<namespace-x> ::= <sem-reversename>
<namespace-x> ::= <name-element> <namespace-x>
<template-arg-more> ::= <sem-storetemplate>
<template-arg-more> ::= <sem-storetemparg> <template-arg> <template-arg-more>
<template-arg> ::= <type>
<parameters> ::= <parameter> <parameter-more>
<parameter> ::= <type>
<parameter-more> ::= <sem-storepar> <parameter> <parameter-more>
<parameter-more> ::= <sem-par2f>
<near-far> ::= Y #near
<near-far> ::= Z #far
<name-char-first> ::= <sem-addchartoname> _
<name-char-first> ::= <sem-addchartoname> a
<name-char-first> ::= <sem-addchartoname> b
<name-char-first> ::= <sem-addchartoname> c
<name-char-first> ::= <sem-addchartoname> d
<name-char-first> ::= <sem-addchartoname> e
<name-char-first> ::= <sem-addchartoname> f
<name-char-first> ::= <sem-addchartoname> g
<name-char-first> ::= <sem-addchartoname> h
<name-char-first> ::= <sem-addchartoname> i
<name-char-first> ::= <sem-addchartoname> j
<name-char-first> ::= <sem-addchartoname> k
<name-char-first> ::= <sem-addchartoname> l
<name-char-first> ::= <sem-addchartoname> m
<name-char-first> ::= <sem-addchartoname> n
<name-char-first> ::= <sem-addchartoname> o
<name-char-first> ::= <sem-addchartoname> p
<name-char-first> ::= <sem-addchartoname> q
<name-char-first> ::= <sem-addchartoname> r
<name-char-first> ::= <sem-addchartoname> s
<name-char-first> ::= <sem-addchartoname> t
<name-char-first> ::= <sem-addchartoname> u
<name-char-first> ::= <sem-addchartoname> v
<name-char-first> ::= <sem-addchartoname> w
<name-char-first> ::= <sem-addchartoname> x
<name-char-first> ::= <sem-addchartoname> y
<name-char-first> ::= <sem-addchartoname> z
<name-char-first> ::= <sem-addchartoname> A
<name-char-first> ::= <sem-addchartoname> B
<name-char-first> ::= <sem-addchartoname> C
<name-char-first> ::= <sem-addchartoname> D
<name-char-first> ::= <sem-addchartoname> E
<name-char-first> ::= <sem-addchartoname> F
<name-char-first> ::= <sem-addchartoname> G
<name-char-first> ::= <sem-addchartoname> H
<name-char-first> ::= <sem-addchartoname> I
<name-char-first> ::= <sem-addchartoname> J
<name-char-first> ::= <sem-addchartoname> K
<name-char-first> ::= <sem-addchartoname> L
<name-char-first> ::= <sem-addchartoname> M
<name-char-first> ::= <sem-addchartoname> N
<name-char-first> ::= <sem-addchartoname> O
<name-char-first> ::= <sem-addchartoname> P
<name-char-first> ::= <sem-addchartoname> Q
<name-char-first> ::= <sem-addchartoname> R
<name-char-first> ::= <sem-addchartoname> S
<name-char-first> ::= <sem-addchartoname> T
<name-char-first> ::= <sem-addchartoname> U
<name-char-first> ::= <sem-addchartoname> V
<name-char-first> ::= <sem-addchartoname> W
<name-char-first> ::= <sem-addchartoname> X
<name-char-first> ::= <sem-addchartoname> Y
<name-char-first> ::= <sem-addchartoname> Z
<name-char> ::= <sem-addchartoname> 0
<name-char> ::= <sem-addchartoname> 1
<name-char> ::= <sem-addchartoname> 2
<name-char> ::= <sem-addchartoname> 3
<name-char> ::= <sem-addchartoname> 4
<name-char> ::= <sem-addchartoname> 5
<name-char> ::= <sem-addchartoname> 6
<name-char> ::= <sem-addchartoname> 7
<name-char> ::= <sem-addchartoname> 8
<name-char> ::= <sem-addchartoname> 9
<name-char> ::= <sem-addchartoname> $
<type> ::= <typesub>
<type> ::= _ <sem-beginbsub> <type_>
<type> ::= $ <type-ds>
<type-ds> ::= $ <type-dsds>
<type-ds> ::= 0 <sem-loadmsnum> <msnum> <sem-numtotype>
<type-dsds> ::= C <dsds-modifier> <type>
<dsds-modifier> ::= A
<dsds-modifier> ::= <sem-setconst> B
<dsds-modifier> ::= <sem-setvolatile> C
<dsds-modifier> ::= <sem-setvolatile> <sem-setconst> D
<dsds-modifier> ::= E
<dsds-modifier> ::= F
<dsds-modifier> ::= <sem-setvolatile> G
<dsds-modifier> ::= <sem-setvolatile> <sem-setconst> H
<dsds-modifier> ::= I
<dsds-modifier> ::= <sem-setconst> J
<dsds-modifier> ::= <sem-setvolatile> K
<dsds-modifier> ::= <sem-setvolatile> <sem-setconst> L
<typesub> ::= <sem-loadbsub> 0
<typesub> ::= <sem-loadbsub> 1
<typesub> ::= <sem-loadbsub> 2
<typesub> ::= <sem-loadbsub> 3
<typesub> ::= <sem-loadbsub> 4
<typesub> ::= <sem-loadbsub> 5
<typesub> ::= <sem-loadbsub> 6
<typesub> ::= <sem-loadbsub> 7
<typesub> ::= <sem-loadbsub> 8
<typesub> ::= <sem-loadbsub> 9
<type> ::= <sem-settypev> X #void
<type> ::= <sem-settypec> D #char
<type> ::= <sem-settypea> C #signed char
<type> ::= <sem-settypeh> E #unsigned char
<type> ::= <sem-settypes> F #short int
<type> ::= <sem-settypet> G #unsigned short int
<type> ::= <sem-settypei> H #int
<type> ::= <sem-settypej> I #unsigned int
<type> ::= <sem-settypel> J #long int
<type> ::= <sem-settypem> K #unsigned long int
<type> ::= <sem-settypef> M #float
<type> ::= <sem-settyped> N #double
<type> ::= <sem-settypee> O #long double (64-bit precision)
<type> ::= T <sem-beginbsub> <type-t>
<type> ::= U <sem-beginbsub> <type-u>
<type> ::= V <sem-beginbsub> <sem-setclass> <name-cover> <sem-unq2p> #class
<type> ::= W <sem-beginbsub> <type-w>
<type-t> ::= <sem-setunion> <name-cover> <sem-unq2p> #union
<type-u> ::= <sem-setstruct> <name-cover> <sem-unq2p> #struct
<type-w> ::= 4 <sem-setenum> <name-cover> <sem-unq2p> #enum
<type> ::= P <e> <sem-beginbsub> <type-pe> <type>
<type> ::= Q <e> <sem-beginbsub> <type-qe> <type>
<type> ::= R <e> <sem-beginbsub> <type-re> <type>
<type> ::= S <e> <sem-beginbsub> <type-se> <type>
<type> ::= A <e> <sem-beginbsub> <type-ae> <type>
<type-pe> ::= <sem-setptr> A #X *
<type-pe> ::= <sem-setptr> <sem-setconst> B #const X *
<type-pe> ::= <sem-setptr> <sem-setvolatile> C #volatile X *
<type-pe> ::= <sem-setptr> <sem-setvolatile> <sem-setconst> D #const volatile X *
<type-qe> ::= <sem-setptr> A #X * const
<type-qe> ::= <sem-setptr> <sem-setconst> B #const X * const
<type-qe> ::= <sem-setptr> <sem-setvolatile> C #volatile X *
<type-qe> ::= <sem-setptr> <sem-setvolatile> <sem-setconst> D #const volatile X *
<type-re> ::= A #X * volatile
<type-se> ::= A #X * const volatile
<type-pe> ::= IA #X * __restrict
<type-ae> ::= <sem-setref> A #X &
<type-ae> ::= <sem-setref> <sem-setconst> B #const X &
<type-ae> ::= <sem-setref> <sem-setvolatile> C #volatile X &
<type-ae> ::= <sem-setref> <sem-setvolatile> <sem-setconst> D #const volatile X &
<type-pa> ::= #X[] (as global object)
<type_> ::= <sem-settypeb> N #bool
<type_> ::= <sem-settypex> J #long long (__int64)
<type_> ::= <sem-settypey> K #unsigned long long (unsigned __int64)
<type_> ::= <sem-settypew> W #wchar_t
<type_> ::= T #long double (80-bit precision Intel compiler)
<type_> ::= Z #long double (80-bit precision Symantec/Digital Mars compiler)
<e> ::= E
<e> ::=
<sem-addchartoname> ::=
<sem-storename> ::=
<sem-loadid> ::=
<sem-loadarr> ::=
<sem-ssno> ::=
<sem-ssnest> ::=
<sem-stunq> ::=
<sem-loadtsub> ::=
<sem-type2expr> ::=
<sem-exprval> ::=
<sem-beginexpr> ::=
<sem-storeexpr> ::=
<sem-copyexpr> ::=
<sem-storepar> ::=
<sem-begintempl> ::=
<sem-skiptempl> ::=
<sem-storetemparg> ::=
<sem-storetemplate> ::=
<sem-setnametf> ::=
<sem-par2f> ::=
<sem-unq2f> ::=
<sem-unq2p> ::=
<sem-setnamex> ::=
<sem-setnameo> ::=
<sem-par2spec> ::=
<sem-par2ret> ::=
<sem-settypev> ::=
<sem-settypew> ::=
<sem-settypeb> ::=
<sem-settypec> ::=
<sem-settypea> ::=
<sem-settypeh> ::=
<sem-settypes> ::=
<sem-settypet> ::=
<sem-settypei> ::=
<sem-settypej> ::=
<sem-settypel> ::=
<sem-settypem> ::=
<sem-settypex> ::=
<sem-settypey> ::=
<sem-settypen> ::=
<sem-settypeo> ::=
<sem-settypef> ::=
<sem-settyped> ::=
<sem-settypee> ::=
<sem-settypeg> ::=
<sem-settypez> ::=
<sem-setrestrict> ::=
<sem-setvolatile> ::=
<sem-setconst> ::=
<sem-setptr> ::=
<sem-setref> ::=
<sem-setrval> ::=
<sem-setcpair> ::=
<sem-setim> ::=
<sem-substd> ::=
<sem-subalc> ::=
<sem-substr> ::=
<sem-substrs> ::=
<sem-subistr> ::=
<sem-subostr> ::=
<sem-subiostr> ::=
<sem-loadsub> ::=
<sem-setnamec> ::=
<sem-setnamed> ::=
<sem-setopnw> ::=
<sem-setopna> ::=
<sem-setopdl> ::=
<sem-setopda> ::=
<sem-setopps> ::=
<sem-setopng> ::=
<sem-setopad> ::=
<sem-setopde> ::=
<sem-setopco> ::=
<sem-setoppl> ::=
<sem-setopmi> ::=
<sem-setopml> ::=
<sem-setopdv> ::=
<sem-setoprm> ::=
<sem-setopan> ::=
<sem-setopor> ::=
<sem-setopeo> ::=
<sem-setopass> ::=
<sem-setoppll> ::=
<sem-setopmii> ::=
<sem-setopmll> ::=
<sem-setopdvv> ::=
<sem-setoprmm> ::=
<sem-setopann> ::=
<sem-setoporr> ::=
<sem-setopeoo> ::=
<sem-setopls> ::=
<sem-setoprs> ::=
<sem-setoplss> ::=
<sem-setoprss> ::=
<sem-setopeq> ::=
<sem-setopne> ::=
<sem-setoplt> ::=
<sem-setopgt> ::=
<sem-setople> ::=
<sem-setopnt> ::=
<sem-setopaa> ::=
<sem-setopoo> ::=
<sem-setoppp> ::=
<sem-setopmm> ::=
<sem-setopcm> ::=
<sem-setoppm> ::=
<sem-setoppt> ::=
<sem-setopcl> ::=
<sem-setopix> ::=
<sem-setopge> ::=
<sem-setopqu> ::=
<sem-setopst> ::=
<sem-setopsz> ::=
<sem-setopat> ::=
<sem-setopaz> ::=
<sem-setopcv> ::=
<sem-setopxx> ::=
<sem-setnamef> ::=
<sem-setnamevt> ::=
<sem-reversename> ::=
<sem-setprivate> ::=
<sem-setpublic> ::=
<sem-setprotected> ::=
<sem-setfcdecl> ::=
<sem-setfpascal> ::=
<sem-setffortran> ::=
<sem-setfthiscall> ::=
<sem-setfstdcall> ::=
<sem-setffastcall> ::=
<sem-setfinterrupt> ::=
<sem-setunion> ::=
<sem-setstruct> ::=
<sem-setclass> ::=
<sem-setenum> ::=
<sem-setstatic> ::=
<sem-setvirtual> ::=
<sem-stclconst> ::=
<sem-stclvol> ::=
<sem-stclfar> ::=
<sem-stclhuge> ::=
<sem-savenamesub> ::=
<sem-loadnamesub> ::=
<sem-mstemplsub> ::=
<sem-setnamer0> ::=
<sem-setnamer1> ::=
<sem-setnamer2> ::=
<sem-setnamer3> ::=
<sem-setnamer4> ::=
<sem-setname_a> ::=
<sem-setname_b> ::=
<sem-setname_c> ::=
<sem-setname_d> ::=
<sem-setname_e> ::=
<sem-setname_f> ::=
<sem-setname_g> ::=
<sem-setname_h> ::=
<sem-setname_i> ::=
<sem-setname_j> ::=
<sem-setname_k> ::=
<sem-setname_l> ::=
<sem-setname_m> ::=
<sem-setname_n> ::=
<sem-setname_o> ::=
<sem-setname_p> ::=
<sem-setname_q> ::=
<sem-setname_r> ::=
<sem-setname_s> ::=
<sem-setname_t> ::=
<sem-setname_u> ::=
<sem-setname_v> ::=
<sem-setname_w> ::=
<sem-setname_x> ::=
<sem-setname_y> ::=
<sem-setname_z> ::=
<sem-templ2tftpl> ::=
<sem-beginbsub> ::= #begin built-in substitution
<sem-loadbsub> ::=
<sem-addmconst> ::=
<sem-addmvol> ::=
<sem-addmfar> ::=
<sem-addmhuge> ::=
<sem-loadmsnum> ::=
<sem-numtorttibcd> ::=
<sem-numtotype> ::=
<sem-normalizeparname> ::=
<sem-borlandid> ::=
<sem-loadborlandsub> ::=
<sem-borlandarr> ::=
<sem-end> ::=
+6145
View File
File diff suppressed because it is too large Load Diff
+91
View File
@@ -0,0 +1,91 @@
/**
* @file src/demangler/igrams.cpp
* @brief Internal grammar list.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#include <cstdlib>
#include "demangler/demglobal.h"
#include "demangler/igrams.h"
using namespace std;
namespace demangler {
/**
* @brief Classes containing internal grammar.
*/
cIgram_msll* igram_msll = nullptr; //Microsoft Visual C++
cIgram_gccll* igram_gccll = nullptr; //GCC
cIgram_borlandll* igram_borlandll = nullptr; //Borland
//[igram] add pointers to internal grammars here
/**
* @brief Function which allocates an internal grammar class and sets the internal grammar structure.
* @param gname Grammar name. The particular internal grammar is selected using this name.
* @param gParser Pointer to a cGram to send pointers to newly allocated grammar to.
* @return Was the initialisation successful?
* @retval false Grammar with the specified name was not found.
*/
bool initIgram(string gname, cGram* gParser) {
bool retvalue = false;
//Microsoft Visual C++ (msll)
if (gname == "ms") {
igram_msll = new cIgram_msll;
gParser->internalGrammarStruct = igram_msll->getInternalGrammar();
return true;
}
//GCC (gccll)
else if (gname == "gcc") {
igram_gccll = new cIgram_gccll;
gParser->internalGrammarStruct = igram_gccll->getInternalGrammar();
return true;
}
//Borland (borlandll)
else if (gname == "borland") {
igram_borlandll = new cIgram_borlandll;
gParser->internalGrammarStruct = igram_borlandll->getInternalGrammar();
return true;
}
//[igram] add allocation of internal grammars here
return retvalue;
}
/**
* @brief Function which deallocates all used internal grammar classes.
* @param gParser Pointer to a cGram to clean internal grammars from.
*/
void deleteIgrams(cGram* gParser) {
//first, delete the dynamically allocated internal llst if there is any
if (gParser->internalGrammarStruct.llst != nullptr) {
free(gParser->internalGrammarStruct.llst);
gParser->internalGrammarStruct.llst = nullptr;
}
//dealocate all internal grammars here...
if (igram_msll != nullptr) {
delete igram_msll;
igram_msll = nullptr;
}
if (igram_gccll != nullptr) {
delete igram_gccll;
igram_gccll = nullptr;
}
if (igram_borlandll != nullptr) {
delete igram_borlandll;
igram_borlandll = nullptr;
}
//[igram] add deallocation of internal grammars here
}
} // namespace demangler
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -8,7 +8,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
+2 -1
View File
@@ -9,7 +9,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
+2 -1
View File
@@ -8,7 +8,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
+2 -1
View File
@@ -9,7 +9,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
+1 -1
+2 -1
View File
@@ -8,7 +8,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
+2 -1
View File
@@ -8,7 +8,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
+2 -1
View File
@@ -9,7 +9,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
+2 -1
View File
@@ -8,7 +8,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
+3 -2
View File
@@ -8,7 +8,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
@@ -29,7 +30,7 @@
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pngpriv.h</PrecompiledHeaderFile>
<IntrinsicFunctions>true</IntrinsicFunctions>
<CompileAs>CompileAsC</CompileAs>
+2 -1
View File
@@ -8,7 +8,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
+2 -1
View File
@@ -8,7 +8,8 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
+1 -1
View File
@@ -506,7 +506,7 @@ void MatchFinder_Init(CMatchFinder *p)
#ifdef MY_CPU_X86_OR_AMD64
#if defined(MY_CPU_X86_OR_AMD64) && (!defined(_MSC_VER) || !defined(__clang__))
#if defined(__clang__) && (__clang_major__ >= 8) \
|| defined(__GNUC__) && (__GNUC__ >= 8) \
|| defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1900)
-483
View File
@@ -1,483 +0,0 @@
PTHREADS-WIN32 RELEASE 2.9.0 (2012-05-25)
-----------------------------------------
Web Site: http://sourceware.org/pthreads-win32/
FTP Site: ftp://sourceware.org/pub/pthreads-win32
Maintainer: Ross Johnson <ross.johnson@loungebythelake.net>
We are pleased to announce the availability of a new release of
Pthreads-win32, an Open Source Software implementation of the
Threads component of the POSIX 1003.1 2001 Standard for Microsoft's
Win32 environment. Some functions from other sections of POSIX
1003.1 2001 are also supported including semaphores and scheduling
functions.
Some common non-portable functions are also implemented for
additional compatibility, as are a few functions specific
to pthreads-win32 for easier integration with Win32 applications.
Pthreads-win32 is free software, distributed under the GNU Lesser
General Public License (LGPL).
Acknowledgements
----------------
This library is based originally on a Win32 pthreads
implementation contributed by John Bossom.
The implementation of Condition Variables uses algorithms developed
by Alexander Terekhov and Louis Thomas.
The implementation of POSIX mutexes has been improved by Thomas Pfaff
and later by Alexander Terekhov.
The implementation of Spinlocks and Barriers was contributed
by Ross Johnson.
The implementation of read/write locks was contributed by
Aurelio Medina and improved by Alexander Terekhov.
Many others have contributed significant time and effort to solve crutial
problems in order to make the library workable, robust and reliable.
Thanks to Xavier Leroy for granting permission to use and modify his
LinuxThreads manual pages.
Thanks to The Open Group for making the Single Unix Specification
publicly available - many of the manual pages included in the package
were extracted from it.
There is also a separate CONTRIBUTORS file. This file and others are
on the web site:
http://sourceware.org/pthreads-win32
As much as possible, the ChangeLog file acknowledges contributions to the
code base in more detail.
Changes since the last release
------------------------------
These are now documented in the NEWS file.
See the ChangeLog file also.
Known Bugs
----------
These are now documented in the BUGS file.
Level of standards conformance
------------------------------
The following POSIX 1003.1 2001 options are defined and set to 200112L:
_POSIX_THREADS
_POSIX_THREAD_SAFE_FUNCTIONS
_POSIX_THREAD_ATTR_STACKSIZE
_POSIX_THREAD_PRIORITY_SCHEDULING
_POSIX_SEMAPHORES
_POSIX_READER_WRITER_LOCKS
_POSIX_SPIN_LOCKS
_POSIX_BARRIERS
The following POSIX 1003.1 2001 options are defined and set to -1:
_POSIX_THREAD_ATTR_STACKADDR
_POSIX_THREAD_PRIO_INHERIT
_POSIX_THREAD_PRIO_PROTECT
_POSIX_THREAD_PROCESS_SHARED
The following POSIX 1003.1 2001 limits are defined and set:
_POSIX_THREAD_THREADS_MAX
_POSIX_SEM_VALUE_MAX
_POSIX_SEM_NSEMS_MAX
_POSIX_THREAD_KEYS_MAX
_POSIX_THREAD_DESTRUCTOR_ITERATIONS
PTHREAD_STACK_MIN
PTHREAD_THREADS_MAX
SEM_VALUE_MAX
SEM_NSEMS_MAX
PTHREAD_KEYS_MAX
PTHREAD_DESTRUCTOR_ITERATIONS
The following functions are implemented:
---------------------------
PThreads
---------------------------
pthread_attr_init
pthread_attr_destroy
pthread_attr_getdetachstate
pthread_attr_getstackaddr
pthread_attr_getstacksize
pthread_attr_setdetachstate
pthread_attr_setstackaddr
pthread_attr_setstacksize
pthread_create
pthread_detach
pthread_equal
pthread_exit
pthread_join
pthread_once
pthread_self
pthread_cancel
pthread_cleanup_pop
pthread_cleanup_push
pthread_setcancelstate
pthread_setcanceltype
pthread_testcancel
---------------------------
Thread Specific Data
---------------------------
pthread_key_create
pthread_key_delete
pthread_setspecific
pthread_getspecific
---------------------------
Mutexes
---------------------------
pthread_mutexattr_init
pthread_mutexattr_destroy
pthread_mutexattr_getpshared
pthread_mutexattr_setpshared
pthread_mutexattr_gettype
pthread_mutexattr_settype (types: PTHREAD_MUTEX_DEFAULT
PTHREAD_MUTEX_NORMAL
PTHREAD_MUTEX_ERRORCHECK
PTHREAD_MUTEX_RECURSIVE )
pthread_mutexattr_getrobust
pthread_mutexattr_setrobust (values: PTHREAD_MUTEX_STALLED
PTHREAD_MUTEX_ROBUST)
pthread_mutex_init
pthread_mutex_destroy
pthread_mutex_lock
pthread_mutex_trylock
pthread_mutex_timedlock
pthread_mutex_unlock
pthread_mutex_consistent
---------------------------
Condition Variables
---------------------------
pthread_condattr_init
pthread_condattr_destroy
pthread_condattr_getpshared
pthread_condattr_setpshared
pthread_cond_init
pthread_cond_destroy
pthread_cond_wait
pthread_cond_timedwait
pthread_cond_signal
pthread_cond_broadcast
---------------------------
Read/Write Locks
---------------------------
pthread_rwlock_init
pthread_rwlock_destroy
pthread_rwlock_tryrdlock
pthread_rwlock_trywrlock
pthread_rwlock_rdlock
pthread_rwlock_timedrdlock
pthread_rwlock_rwlock
pthread_rwlock_timedwrlock
pthread_rwlock_unlock
pthread_rwlockattr_init
pthread_rwlockattr_destroy
pthread_rwlockattr_getpshared
pthread_rwlockattr_setpshared
---------------------------
Spin Locks
---------------------------
pthread_spin_init
pthread_spin_destroy
pthread_spin_lock
pthread_spin_unlock
pthread_spin_trylock
---------------------------
Barriers
---------------------------
pthread_barrier_init
pthread_barrier_destroy
pthread_barrier_wait
pthread_barrierattr_init
pthread_barrierattr_destroy
pthread_barrierattr_getpshared
pthread_barrierattr_setpshared
---------------------------
Semaphores
---------------------------
sem_init
sem_destroy
sem_post
sem_wait
sem_trywait
sem_timedwait
sem_getvalue (# free if +ve, # of waiters if -ve)
sem_open (returns an error ENOSYS)
sem_close (returns an error ENOSYS)
sem_unlink (returns an error ENOSYS)
---------------------------
RealTime Scheduling
---------------------------
pthread_attr_getschedparam
pthread_attr_setschedparam
pthread_attr_getinheritsched
pthread_attr_setinheritsched
pthread_attr_getschedpolicy (only supports SCHED_OTHER)
pthread_attr_setschedpolicy (only supports SCHED_OTHER)
pthread_getschedparam
pthread_setschedparam
pthread_getconcurrency
pthread_setconcurrency
pthread_attr_getscope
pthread_attr_setscope (only supports PTHREAD_SCOPE_SYSTEM)
sched_get_priority_max
sched_get_priority_min
sched_rr_get_interval (returns an error ENOTSUP)
sched_setscheduler (only supports SCHED_OTHER)
sched_getscheduler (only supports SCHED_OTHER)
sched_yield
---------------------------
Signals
---------------------------
pthread_sigmask
pthread_kill (only supports zero sig value,
for thread validity checking)
---------------------------
Non-portable routines (see the README.NONPORTABLE file for usage)
---------------------------
pthread_getw32threadhandle_np
pthread_timechange_handler_np
pthread_delay_np
pthread_getunique_np
pthread_mutexattr_getkind_np
pthread_mutexattr_setkind_np (types: PTHREAD_MUTEX_FAST_NP,
PTHREAD_MUTEX_ERRORCHECK_NP,
PTHREAD_MUTEX_RECURSIVE_NP,
PTHREAD_MUTEX_ADAPTIVE_NP,
PTHREAD_MUTEX_TIMED_NP)
pthread_num_processors_np
(The following four routines may be required when linking statically.
The process_* routines should not be needed for MSVC or GCC.)
pthread_win32_process_attach_np
pthread_win32_process_detach_np
(The following routines should only be needed to manage implicit
POSIX handles i.e. when Win native threads call POSIX thread routines
(other than pthread_create))
pthread_win32_thread_attach_np
pthread_win32_thread_detach_np
---------------------------
Static Initializers
---------------------------
PTHREAD_ONCE_INIT
PTHREAD_MUTEX_INITIALIZER
PTHREAD_RECURSIVE_MUTEX_INITIALIZER
PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
PTHREAD_ERRORCHECK_MUTEX_INITIALIZER
PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
PTHREAD_COND_INITIALIZER
PTHREAD_RWLOCK_INITIALIZER
PTHREAD_SPINLOCK_INITIALIZER
The library includes two non-API functions for creating cancellation
points in applications and libraries:
pthreadCancelableWait
pthreadCancelableTimedWait
The following functions are not implemented:
---------------------------
RealTime Scheduling
---------------------------
pthread_mutex_getprioceiling
pthread_mutex_setprioceiling
pthread_mutex_attr_getprioceiling
pthread_mutex_attr_getprotocol
pthread_mutex_attr_setprioceiling
pthread_mutex_attr_setprotocol
---------------------------
Fork Handlers
---------------------------
pthread_atfork
---------------------------
Stdio
---------------------------
flockfile
ftrylockfile
funlockfile
getc_unlocked
getchar_unlocked
putc_unlocked
putchar_unlocked
---------------------------
Thread-Safe C Runtime Library
---------------------------
readdir_r
getgrgid_r
getgrnam_r
getpwuid_r
getpwnam_r
---------------------------
Signals
---------------------------
sigtimedwait
sigwait
sigwaitinfo
---------------------------
General
---------------------------
sysconf
---------------------------
Thread-Safe C Runtime Library (macros)
---------------------------
strtok_r
asctime_r
ctime_r
gmtime_r
localtime_r
rand_r
Availability
------------
The prebuilt DLL, export libs (for both MSVC and Mingw32), and the header
files (pthread.h, semaphore.h, sched.h) are available along with the
complete source code.
The source code can be found at:
ftp://sources.redhat.com/pub/pthreads-win32
and as individual source code files at
ftp://sources.redhat.com/pub/pthreads-win32/source
The pre-built DLL, export libraries and include files can be found at:
ftp://sources.redhat.com/pub/pthreads-win32/dll-latest
Mailing List
------------
There is a mailing list for discussing pthreads on Win32. To join,
send email to:
pthreads-win32-subscribe@sourceware.cygnus.com
Application Development Environments
------------------------------------
See the README file for more information.
MSVC:
MSVC using SEH works. Distribute pthreadVSE.dll with your application.
MSVC using C++ EH works. Distribute pthreadVCE.dll with your application.
MSVC using C setjmp/longjmp works. Distribute pthreadVC.dll with your application.
Mingw32:
See the FAQ, Questions 6 and 10.
Mingw using C++ EH works. Distribute pthreadGCE.dll with your application.
Mingw using C setjmp/longjmp works. Distribute pthreadGC.dll with your application.
Cygwin: (http://sourceware.cygnus.com/cygwin/)
Developers using Cygwin do not need pthreads-win32 since it has POSIX threads
support. Refer to its documentation for details and extent.
UWIN:
UWIN is a complete Unix-like environment for Windows from AT&T. Pthreads-win32
doesn't currently support UWIN (and vice versa), but that may change in the
future.
Generally:
For convenience, the following pre-built files are available on the FTP site
(see Availability above):
pthread.h - for POSIX threads
semaphore.h - for POSIX semaphores
sched.h - for POSIX scheduling
pthreadVCE.dll - built with MSVC++ compiler using C++ EH
pthreadVCE.lib
pthreadVC.dll - built with MSVC compiler using C setjmp/longjmp
pthreadVC.lib
pthreadVSE.dll - built with MSVC compiler using SEH
pthreadVSE.lib
pthreadGCE.dll - built with Mingw32 G++ 2.95.2-1
pthreadGC.dll - built with Mingw32 GCC 2.95.2-1 using setjmp/longjmp
libpthreadGCE.a - derived from pthreadGCE.dll
libpthreadGC.a - derived from pthreadGC.dll
gcc.dll - needed if distributing applications that use
pthreadGCE.dll (but see the FAQ Q 10 for the latest
related information)
These are the only files you need in order to build POSIX threads
applications for Win32 using either MSVC or Mingw32.
See the FAQ file in the source tree for additional information.
Documentation
-------------
For the authoritative reference, see the online POSIX
standard reference at:
http://www.OpenGroup.org
For POSIX Thread API programming, several reference books are
available:
Programming with POSIX Threads
David R. Butenhof
Addison-Wesley (pub)
Pthreads Programming
By Bradford Nichols, Dick Buttlar & Jacqueline Proulx Farrell
O'Reilly (pub)
On the web: see the links at the bottom of the pthreads-win32 site:
http://sources.redhat.com/pthreads-win32/
Currently, there is no documentation included in the package apart
from the copious comments in the source code.
Enjoy!
Ross Johnson
-141
View File
@@ -1,141 +0,0 @@
----------
Known bugs
----------
1. Not strictly a bug, more of a gotcha.
Under MS VC++ (only tested with version 6.0), a term_func
set via the standard C++ set_terminate() function causes the
application to abort.
Notes from the MSVC++ manual:
1) A term_func() should call exit(), otherwise
abort() will be called on return to the caller.
A call to abort() raises SIGABRT and the default signal handler
for all signals terminates the calling program with
exit code 3.
2) A term_func() must not throw an exception. Therefore
term_func() should not call pthread_exit(), which
works by throwing an exception (pthreadVCE or pthreadVSE)
or by calling longjmp (pthreadVC).
Workaround: avoid using pthread_exit() in C++ applications. Exit
threads by dropping through the end of the thread routine.
2. Cancellation problems in C++ builds
- Milan Gardian
[Note: It's not clear if this problem isn't simply due to the context
switch in pthread_cancel() which occurs unless the QueueUserAPCEx
library and driver are installed and used. Just like setjmp/longjmp,
this is probably not going to work well in C++. In any case, unless for
some very unusual reason you really must use the C++ build then please
use the C build pthreadVC2.dll or pthreadGC2.dll, i.e. for C++
applications.]
This is suspected to be a compiler bug in VC6.0, and also seen in
VC7.0 and VS .NET 2003. The GNU C++ compiler does not have a problem
with this, and it has been reported that the Intel C++ 8.1 compiler
and Visual C++ 2005 Express Edition Beta2 pass tests\semaphore4.c
(which exposes the bug).
Workaround [rpj - 2 Feb 2002]
-----------------------------
[Please note: this workaround did not solve a similar problem in
snapshot-2004-11-03 or later, even though similar symptoms were seen.
tests\semaphore4.c fails in that snapshot for the VCE version of the
DLL.]
The problem disappears when /Ob0 is used, i.e. /O2 /Ob0 works OK,
but if you want to use inlining optimisation you can be much more
specific about where it's switched off and on by using a pragma.
So the inlining optimisation is interfering with the way that cleanup
handlers are run. It appears to relate to auto-inlining of class methods
since this is the only auto inlining that is performed at /O1 optimisation
(functions with the "inline" qualifier are also inlined, but the problem
doesn't appear to involve any such functions in the library or testsuite).
In order to confirm the inlining culprit, the following use of pragmas
eliminate the problem but I don't know how to make it transparent, putting
it in, say, pthread.h where pthread_cleanup_push defined as a macro.
#pragma inline_depth(0)
pthread_cleanup_push(handlerFunc, (void *) &arg);
/* ... */
pthread_cleanup_pop(0);
#pragma inline_depth()
Note the empty () pragma value after the pop macro. This resets depth to the
default. Or you can specify a non-zero depth here.
The pragma is also needed (and now used) within the library itself wherever
cleanup handlers are used (condvar.c and rwlock.c).
Use of these pragmas allows compiler optimisations /O1 and /O2 to be
used for either or both the library and applications.
Experimenting further, I found that wrapping the actual cleanup handler
function with #pragma auto_inline(off|on) does NOT work.
MSVC6.0 doesn't appear to support the C99 standard's _Pragma directive,
however, later versions may. This form is embeddable inside #define
macros, which would be ideal because it would mean that it could be added
to the push/pop macro definitions in pthread.h and hidden from the
application programmer.
[/rpj]
Original problem description
----------------------------
The cancellation (actually, cleanup-after-cancel) tests fail when using VC
(professional) optimisation switches (/O1 or /O2) in pthreads library. I
have not investigated which concrete optimisation technique causes this
problem (/Og, /Oi, /Ot, /Oy, /Ob1, /Gs, /Gf, /Gy, etc.), but here is a
summary of builds and corresponding failures:
* pthreads VSE (optimised tests): OK
* pthreads VCE (optimised tests): Failed "cleanup1" test (runtime)
* pthreads VSE (DLL in CRT, optimised tests): OK
* pthreads VCE (DLL in CRT, optimised tests): Failed "cleanup1" test
(runtime)
Please note that while in VSE version of the pthreads library the
optimisation does not really have any impact on the tests (they pass OK), in
VCE version addition of optimisation (/O2 in this case) causes the tests to
fail uniformly - either in "cleanup0" or "cleanup1" test cases.
Please note that all the tests above use default pthreads DLL (no
optimisations, linked with either static or DLL CRT, based on test type).
Therefore the problem lies not within the pthreads DLL but within the
compiled client code (the application using pthreads -> involvement of
"pthread.h").
I think the message of this section is that usage of VCE version of pthreads
in applications relying on cancellation/cleanup AND using optimisations for
creation of production code is highly unreliable for the current version of
the pthreads library.
3. The Borland Builder 5.5 version of the library produces memory read exceptions
in some tests.
4. pthread_barrier_wait() can deadlock if the number of potential calling
threads for a particular barrier is greater than the barrier count parameter
given to pthread_barrier_init() for that barrier.
This is due to the very lightweight implementation of pthread-win32 barriers.
To cope with more than "count" possible waiters, barriers must effectively
implement all the same safeguards as condition variables, making them much
"heavier" than at present.
The workaround is to ensure that no more than "count" threads attempt to wait
at the barrier.
5. Canceling a thread blocked on pthread_once appears not to work in the MSVC++
version of the library "pthreadVCE.dll". The test case "once3.c" hangs. I have no
clues on this at present. All other versions pass this test ok - pthreadsVC.dll,
pthreadsVSE.dll, pthreadsGC.dll and pthreadsGCE.dll.
-268
View File
@@ -1,268 +0,0 @@
# This makefile is compatible with BCB make. Use "make -fBMakefile" to compile.
#
# The variables $DLLDEST and $LIBDEST hold the destination directories for the
# dll and the lib, respectively. Probably all that needs to change is $DEVROOT.
#
# Currently only the recommended pthreadBC.dll is built by this makefile.
#
DLL_VER = 2
DEVROOT = .
DLLDEST = $(DEVROOT)\DLL
LIBDEST = $(DEVROOT)\DLL
DLLS = pthreadBC$(DLL_VER).dll
OPTIM = /O2
RC = brcc32
RCFLAGS = -i.
CFLAGS = /q /I. /D_WIN32_WINNT=0x400 /DHAVE_PTW32_CONFIG_H=1 /4 /tWD /tWM \
/w-aus /w-asc /w-par
#C cleanup code
BCFLAGS = $(PTW32_FLAGS) $(CFLAGS)
# Agregate modules for inlinability
DLL_OBJS = \
attr.obj \
barrier.obj \
cancel.obj \
cleanup.obj \
condvar.obj \
create.obj \
dll.obj \
errno.obj \
exit.obj \
fork.obj \
global.obj \
misc.obj \
mutex.obj \
nonportable.obj \
private.obj \
rwlock.obj \
sched.obj \
semaphore.obj \
signal.obj \
spin.obj \
sync.obj \
tsd.obj
INCL = config.h implement.h semaphore.h pthread.h need_errno.h
ATTR_SRCS = \
pthread_attr_init.c \
pthread_attr_destroy.c \
pthread_attr_getdetachstate.c \
pthread_attr_setdetachstate.c \
pthread_attr_getstackaddr.c \
pthread_attr_setstackaddr.c \
pthread_attr_getstacksize.c \
pthread_attr_setstacksize.c \
pthread_attr_getscope.c \
pthread_attr_setscope.c
BARRIER_SRCS = \
pthread_barrier_init.c \
pthread_barrier_destroy.c \
pthread_barrier_wait.c \
pthread_barrierattr_init.c \
pthread_barrierattr_destroy.c \
pthread_barrierattr_setpshared.c \
pthread_barrierattr_getpshared.c
CANCEL_SRCS = \
pthread_setcancelstate.c \
pthread_setcanceltype.c \
pthread_testcancel.c \
pthread_cancel.c
CONDVAR_SRCS = \
ptw32_cond_check_need_init.c \
pthread_condattr_destroy.c \
pthread_condattr_getpshared.c \
pthread_condattr_init.c \
pthread_condattr_setpshared.c \
pthread_cond_destroy.c \
pthread_cond_init.c \
pthread_cond_signal.c \
pthread_cond_wait.c
EXIT_SRCS = \
pthread_exit.c
MISC_SRCS = \
pthread_equal.c \
pthread_getconcurrency.c \
pthread_once.c \
pthread_self.c \
pthread_setconcurrency.c \
ptw32_calloc.c \
ptw32_MCS_lock.c \
ptw32_new.c \
w32_CancelableWait.c
MUTEX_SRCS = \
ptw32_mutex_check_need_init.c \
pthread_mutex_init.c \
pthread_mutex_destroy.c \
pthread_mutexattr_init.c \
pthread_mutexattr_destroy.c \
pthread_mutexattr_getpshared.c \
pthread_mutexattr_setpshared.c \
pthread_mutexattr_settype.c \
pthread_mutexattr_gettype.c \
pthread_mutexattr_setrobust.c \
pthread_mutexattr_getrobust.c \
pthread_mutex_lock.c \
pthread_mutex_timedlock.c \
pthread_mutex_unlock.c \
pthread_mutex_trylock.c \
pthread_mutex_consistent.c
NONPORTABLE_SRCS = \
pthread_mutexattr_setkind_np.c \
pthread_mutexattr_getkind_np.c \
pthread_getw32threadhandle_np.c \
pthread_delay_np.c \
pthread_num_processors_np.c \
pthread_win32_attach_detach_np.c \
pthread_timechange_handler_np.c
PRIVATE_SRCS = \
ptw32_is_attr.c \
ptw32_processInitialize.c \
ptw32_processTerminate.c \
ptw32_threadStart.c \
ptw32_threadDestroy.c \
ptw32_tkAssocCreate.c \
ptw32_tkAssocDestroy.c \
ptw32_callUserDestroyRoutines.c \
ptw32_timespec.c \
ptw32_relmillisecs.c \
ptw32_throw.c \
ptw32_getprocessors.c
RWLOCK_SRCS = \
ptw32_rwlock_check_need_init.c \
ptw32_rwlock_cancelwrwait.c \
pthread_rwlock_init.c \
pthread_rwlock_destroy.c \
pthread_rwlockattr_init.c \
pthread_rwlockattr_destroy.c \
pthread_rwlockattr_getpshared.c \
pthread_rwlockattr_setpshared.c \
pthread_rwlock_rdlock.c \
pthread_rwlock_timedrdlock.c \
pthread_rwlock_wrlock.c \
pthread_rwlock_timedwrlock.c \
pthread_rwlock_unlock.c \
pthread_rwlock_tryrdlock.c \
pthread_rwlock_trywrlock.c
SCHED_SRCS = \
pthread_attr_setschedpolicy.c \
pthread_attr_getschedpolicy.c \
pthread_attr_setschedparam.c \
pthread_attr_getschedparam.c \
pthread_attr_setinheritsched.c \
pthread_attr_getinheritsched.c \
pthread_setschedparam.c \
pthread_getschedparam.c \
sched_get_priority_max.c \
sched_get_priority_min.c \
sched_setscheduler.c \
sched_getscheduler.c \
sched_yield.c
SEMAPHORE_SRCS = \
sem_init.c \
sem_destroy.c \
sem_trywait.c \
sem_timedwait.c \
sem_wait.c \
sem_post.c \
sem_post_multiple.c \
sem_getvalue.c \
sem_open.c \
sem_close.c \
sem_unlink.c
SPIN_SRCS = \
ptw32_spinlock_check_need_init.c \
pthread_spin_init.c \
pthread_spin_destroy.c \
pthread_spin_lock.c \
pthread_spin_unlock.c \
pthread_spin_trylock.c
SYNC_SRCS = \
pthread_detach.c \
pthread_join.c
TSD_SRCS = \
pthread_key_create.c \
pthread_key_delete.c \
pthread_setspecific.c \
pthread_getspecific.c
all: clean $(DLLS)
realclean: clean
if exist pthread*.dll del pthread*.dll
if exist pthread*.lib del pthread*.lib
if exist *.stamp del *.stamp
clean:
if exist *.obj del *.obj
if exist *.ilk del *.ilk
if exist *.ilc del *.ilc
if exist *.ild del *.ild
if exist *.ilf del *.ilf
if exist *.ils del *.ils
if exist *.tds del *.tds
if exist *.pdb del *.pdb
if exist *.exp del *.exp
if exist *.map del *.map
if exist *.o del *.o
if exist *.i del *.i
if exist *.res del *.res
install: $(DLLS)
copy pthread*.dll $(DLLDEST)
copy pthread*.lib $(LIBDEST)
$(DLLS): $(DLL_OBJS) version.res
ilink32 /Tpd /Gi c0d32x.obj $(DLL_OBJS), \
$@, ,\
cw32mti.lib import32.lib, ,\
version.res
.c.obj:
$(CC) $(OPTIM) $(BCFLAGS) -c $<
.rc.res:
$(RC) $(RCFLAGS) $<
attr.obj: attr.c $(ATTR_SRCS) $(INCL)
barrier.obj: barrier.c $(BARRIER_SRCS) $(INCL)
cancel.obj: cancel.c $(CANCEL_SRCS) $(INCL)
condvar.obj: condvar.c $(CONDVAR_SRCS) $(INCL)
exit.obj: exit.c $(EXIT_SRCS) $(INCL)
misc.obj: misc.c $(MISC_SRCS) $(INCL)
mutex.obj: mutex.c $(MUTEX_SRCS) $(INCL)
nonportable.obj: nonportable.c $(NONPORTABLE_SRCS) $(INCL)
private.obj: private.c $(PRIVATE_SRCS) $(INCL)
rwlock.obj: rwlock.c $(RWLOCK_SRCS) $(INCL)
sched.obj: sched.c $(SCHED_SRCS) $(INCL)
semaphore.obj: semaphore.c $(SEMAPHORE_SRCS) $(INCL)
spin.obj: spin.c $(SPIN_SRCS) $(INCL)
sync.obj: sync.c $(SYNC_SRCS) $(INCL)
tsd.obj: tsd.c $(TSD_SRCS) $(INCL)
version.res: version.rc $(INCL)
-11
View File
@@ -1,11 +0,0 @@
add_library(pthreads4w
pthread.c
config.h
context.h
include/pthread.h
include/sched.h
include/semaphore.h
need_errno.h
)
target_compile_definitions(pthreads4w PUBLIC PTW32_STATIC_LIB __CLEANUP_SEH PRIVATE HAVE_PTW32_CONFIG_H PTW32_BUILD_INLINED)
target_include_directories(pthreads4w PUBLIC include)
-140
View File
@@ -1,140 +0,0 @@
Contributors (in approximate order of appearance)
[See also the ChangeLog file where individuals are
attributed in log entries. Likewise in the FAQ file.]
Ben Elliston bje at cygnus dot com
Initiated the project;
setup the project infrastructure (CVS, web page, etc.);
early prototype routines.
Ross Johnson Ross dot Johnson at dot homemail dot com dot au
early prototype routines;
ongoing project coordination/maintenance;
implementation of spin locks and barriers;
various enhancements;
bug fixes;
documentation;
testsuite.
Robert Colquhoun rjc at trump dot net dot au
Early bug fixes.
John E. Bossom John dot Bossom at cognos dot com
Contributed substantial original working implementation;
bug fixes;
ongoing guidance and standards interpretation.
Anders Norlander anorland at hem2 dot passagen dot se
Early enhancements and runtime checking for supported
Win32 routines.
Tor Lillqvist tml at iki dot fi
General enhancements;
early bug fixes to condition variables.
Scott Lightner scott at curriculum dot com
Bug fix.
Kevin Ruland Kevin dot Ruland at anheuser-busch dot com
Various bug fixes.
Mike Russo miker at eai dot com
Bug fix.
Mark E. Armstrong avail at pacbell dot net
Bug fixes.
Lorin Hochstein lmh at xiphos dot ca
general bug fixes; bug fixes to condition variables.
Peter Slacik Peter dot Slacik at tatramed dot sk
Bug fixes.
Mumit Khan khan at xraylith dot wisc dot edu
Fixes to work with Mingw32.
Milan Gardian mg at tatramed dot sk
Bug fixes and reports/analyses of obscure problems.
Aurelio Medina aureliom at crt dot com
First implementation of read-write locks.
Graham Dumpleton Graham dot Dumpleton at ra dot pad dot otc dot telstra dot com dot au
Bug fix in condition variables.
Tristan Savatier tristan at mpegtv dot com
WinCE port.
Erik Hensema erik at hensema dot xs4all dot nl
Bug fixes.
Rich Peters rpeters at micro-magic dot com
Todd Owen towen at lucidcalm dot dropbear dot id dot au
Bug fixes to dll loading.
Jason Nye jnye at nbnet dot nb dot ca
Implementation of async cancelation.
Fred Forester fforest at eticomm dot net
Kevin D. Clark kclark at cabletron dot com
David Baggett dmb at itasoftware dot com
Bug fixes.
Paul Redondo paul at matchvision dot com
Scott McCaskill scott at 3dfx dot com
Bug fixes.
Jef Gearhart jgearhart at tpssys dot com
Bug fix.
Arthur Kantor akantor at bexusa dot com
Mutex enhancements.
Steven Reddie smr at essemer dot com dot au
Bug fix.
Alexander Terekhov TEREKHOV at de dot ibm dot com
Re-implemented and improved read-write locks;
(with Louis Thomas) re-implemented and improved
condition variables;
enhancements to semaphores;
enhancements to mutexes;
new mutex implementation in 'futex' style;
suggested a robust implementation of pthread_once
similar to that implemented by V.Kliathcko;
system clock change handling re CV timeouts;
bug fixes.
Thomas Pfaff tpfaff at gmx dot net
Changes to make C version usable with C++ applications;
re-implemented mutex routines to avoid Win32 mutexes
and TryEnterCriticalSection;
procedure to fix Mingw32 thread-safety issues.
Franco Bez franco dot bez at gmx dot de
procedure to fix Mingw32 thread-safety issues.
Louis Thomas lthomas at arbitrade dot com
(with Alexander Terekhov) re-implemented and improved
condition variables.
David Korn dgk at research dot att dot com
Ported to UWIN.
Phil Frisbie, Jr. phil at hawksoft dot com
Bug fix.
Ralf Brese Ralf dot Brese at pdb4 dot siemens dot de
Bug fix.
prionx at juno dot com prionx at juno dot com
Bug fixes.
Max Woodbury mtew at cds dot duke dot edu
POSIX versioning conditionals;
reduced namespace pollution;
idea to separate routines to reduce statically
linked image sizes.
Rob Fanner rfanner at stonethree dot com
Bug fix.
Michael Johnson michaelj at maine dot rr dot com
Bug fix.
Nicolas Barry boozai at yahoo dot com
Bug fixes.
Piet van Bruggen pietvb at newbridges dot nl
Bug fix.
Makoto Kato raven at oldskool dot jp
AMD64 port.
Panagiotis E. Hadjidoukas peh at hpclab dot ceid dot upatras dot gr
phadjido at cs dot uoi dot gr
Contributed the QueueUserAPCEx package which
makes preemptive async cancelation possible.
Will Bryant will dot bryant at ecosm dot com
Borland compiler patch and makefile.
Anuj Goyal anuj dot goyal at gmail dot com
Port to Digital Mars compiler.
Gottlob Frege gottlobfrege at gmail dot com
re-implemented pthread_once (version 2)
(pthread_once cancellation added by rpj).
Vladimir Kliatchko vladimir at kliatchko dot com
reimplemented pthread_once with the same form
as described by A.Terekhov (later version 2);
implementation of MCS (Mellor-Crummey/Scott) locks.
Ramiro Polla ramiro.polla at gmail dot com
static library auto init/cleanup on application
start/exit via RT hooks (MSC and GCC compilers only).
Daniel Richard G. skunk at iSKUNK dot org
Patches and cleanups for x86 and x64, particularly
across a range of MS build environments.
John Kamp john dot kamp at globalgraphics dot com
Patches to fix various problems on x64; brutal testing
particularly using high memory run environments.
-150
View File
@@ -1,150 +0,0 @@
pthreads-win32 - a POSIX threads library for Microsoft Windows
This file is Copyrighted
------------------------
This file is covered under the following Copyright:
Copyright (C) 2001,2006 Ross P. Johnson
All rights reserved.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Pthreads-win32 is covered by the GNU Lesser General Public License
------------------------------------------------------------------
Pthreads-win32 is open software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation version 2.1 of the
License.
Pthreads-win32 is several binary link libraries, several modules,
associated interface definition files and scripts used to control
its compilation and installation.
Pthreads-win32 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
A copy of the GNU Lesser General Public License is distributed with
pthreads-win32 under the filename:
COPYING.LIB
You should have received a copy of the version 2.1 GNU Lesser General
Public License with pthreads-win32; if not, write to:
Free Software Foundation, Inc.
59 Temple Place
Suite 330
Boston, MA 02111-1307
USA
The contact addresses for pthreads-win32 is as follows:
Web: http://sources.redhat.com/pthreads-win32
Email: Ross Johnson
Please use: Firstname.Lastname@homemail.com.au
Pthreads-win32 copyrights and exception files
---------------------------------------------
With the exception of the files listed below, Pthreads-win32
is covered under the following GNU Lesser General Public License
Copyrights:
Pthreads-win32 - POSIX Threads Library for Win32
Copyright(C) 1998 John E. Bossom
Copyright(C) 1999,2006 Pthreads-win32 contributors
The current list of contributors is contained
in the file CONTRIBUTORS included with the source
code distribution. The current list of CONTRIBUTORS
can also be seen at the following WWW location:
http://sources.redhat.com/pthreads-win32/contributors.html
Contact Email: Ross Johnson
Please use: Firstname.Lastname@homemail.com.au
These files are not covered under one of the Copyrights listed above:
COPYING
COPYING.LIB
tests/rwlock7.c
This file, COPYING, is distributed under the Copyright found at the
top of this file. It is important to note that you may distribute
verbatim copies of this file but you may not modify this file.
The file COPYING.LIB, which contains a copy of the version 2.1
GNU Lesser General Public License, is itself copyrighted by the
Free Software Foundation, Inc. Please note that the Free Software
Foundation, Inc. does NOT have a copyright over Pthreads-win32,
only the COPYING.LIB that is supplied with pthreads-win32.
The file tests/rwlock7.c is derived from code written by
Dave Butenhof for his book 'Programming With POSIX(R) Threads'.
The original code was obtained by free download from his website
http://home.earthlink.net/~anneart/family/Threads/source.html
and did not contain a copyright or author notice. It is assumed to
be freely distributable.
In all cases one may use and distribute these exception files freely.
And because one may freely distribute the LGPL covered files, the
entire pthreads-win32 source may be freely used and distributed.
General Copyleft and License info
---------------------------------
For general information on Copylefts, see:
http://www.gnu.org/copyleft/
For information on GNU Lesser General Public Licenses, see:
http://www.gnu.org/copyleft/lesser.html
http://www.gnu.org/copyleft/lesser.txt
Why pthreads-win32 did not use the GNU General Public License
-------------------------------------------------------------
The goal of the pthreads-win32 project has been to
provide a quality and complete implementation of the POSIX
threads API for Microsoft Windows within the limits imposed
by virtue of it being a stand-alone library and not
linked directly to other POSIX compliant libraries. For
example, some functions and features, such as those based
on POSIX signals, are missing.
Pthreads-win32 is a library, available in several different
versions depending on supported compilers, and may be used
as a dynamically linked module or a statically linked set of
binary modules. It is not an application on it's own.
It was fully intended that pthreads-win32 be usable with
commercial software not covered by either the GPL or the LGPL
licenses. Pthreads-win32 has many contributors to it's
code base, many of whom have done so because they have
used the library in commercial or proprietry software
projects.
Releasing pthreads-win32 under the LGPL ensures that the
library can be used widely, while at the same time ensures
that bug fixes and improvements to the pthreads-win32 code
itself is returned to benefit all current and future users
of the library.
Although pthreads-win32 makes it possible for applications
that use POSIX threads to be ported to Win32 platforms, the
broader goal of the project is to encourage the use of open
standards, and in particular, to make it just a little easier
for developers writing Win32 applications to consider
widening the potential market for their products.
-504
View File
@@ -1,504 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
-5211
View File
File diff suppressed because it is too large Load Diff
-451
View File
@@ -1,451 +0,0 @@
=========================================
PTHREADS-WIN32 Frequently Asked Questions
=========================================
INDEX
-----
Q 1 What is it?
Q 2 Which of the several dll versions do I use?
or,
What are all these pthread*.dll and pthread*.lib files?
Q 3 What is the library naming convention?
Q 4 Cleanup code default style or: it used to work when I built
the library myself, but now it doesn't - why?
Q 5 Why is the default library version now less exception-friendly?
Q 6 Should I use Cygwin or Mingw32 as a development environment?
Q 7 Now that pthreads-win32 builds under Mingw32, why do I get
memory access violations (segfaults)?
Q 8 How do I use pthread.dll for Win32 (Visual C++ 5.0)
Q 9 Cancelation doesn't work for me, why?
Q 10 How do I generate pthreadGCE.dll and libpthreadw32.a for use
with Mingw32?
Q 11 Why isn't pthread_t defined as a scalar (e.g. pointer or int)
like it is for other POSIX threads implementations?
=============================================================================
Q 1 What is it?
---
Pthreads-win32 is an Open Source Software implementation of the
Threads component of the POSIX 1003.1c 1995 Standard for Microsoft's
Win32 environment. Some functions from POSIX 1003.1b are also
supported including semaphores. Other related functions include
the set of read-write lock functions. The library also supports
some of the functionality of the Open Group's Single Unix
specification, version 2, namely mutex types.
See the file "ANNOUNCE" for more information including standards
conformance details and list of supported routines.
------------------------------------------------------------------------------
Q 2 Which of the several dll versions do I use?
--- or,
What are all these pthread*.dll and pthread*.lib files?
Simply, you only use one of them, but you need to choose carefully.
The most important choice you need to make is whether to use a
version that uses exceptions internally, or not (there are versions
of the library that use exceptions as part of the thread
cancelation and cleanup implementation, and one that uses
setjmp/longjmp instead).
There is some contension amongst POSIX threads experts as
to how POSIX threads cancelation and exit should work
with languages that include exceptions and handlers, e.g.
C++ and even C (Microsoft's Structured Exceptions).
The issue is: should cancelation of a thread in, say,
a C++ application cause object destructors and C++ exception
handlers to be invoked as the stack unwinds during thread
exit, or not?
There seems to be more opinion in favour of using the
standard C version of the library (no EH) with C++ applications
since this appears to be the assumption commercial pthreads
implementations make. Therefore, if you use an EH version
of pthreads-win32 then you may be under the illusion that
your application will be portable, when in fact it is likely to
behave very differently linked with other pthreads libraries.
Now you may be asking: why have you kept the EH versions of
the library?
There are a couple of reasons:
- there is division amongst the experts and so the code may
be needed in the future. (Yes, it's in the repository and we
can get it out anytime in the future, but ...)
- pthreads-win32 is one of the few implementations, and possibly
the only freely available one, that has EH versions. It may be
useful to people who want to play with or study application
behaviour under these conditions.
------------------------------------------------------------------------------
Q 3 What is the library naming convention?
---
Because the library is being built using various exception
handling schemes and compilers - and because the library
may not work reliably if these are mixed in an application,
each different version of the library has it's own name.
Note 1: the incompatibility is really between EH implementations
of the different compilers. It should be possible to use the
standard C version from either compiler with C++ applications
built with a different compiler. If you use an EH version of
the library, then you must use the same compiler for the
application. This is another complication and dependency that
can be avoided by using only the standard C library version.
Note 2: if you use a standard C pthread*.dll with a C++
application, then any functions that you define that are
intended to be called via pthread_cleanup_push() must be
__cdecl.
Note 3: the intention is to also name either the VC or GC
version (it should be arbitrary) as pthread.dll, including
pthread.lib and libpthread.a as appropriate.
In general:
pthread[VG]{SE,CE,C}.dll
pthread[VG]{SE,CE,C}.lib
where:
[VG] indicates the compiler
V - MS VC
G - GNU C
{SE,CE,C} indicates the exception handling scheme
SE - Structured EH
CE - C++ EH
C - no exceptions - uses setjmp/longjmp
For example:
pthreadVSE.dll (MSVC/SEH)
pthreadGCE.dll (GNUC/C++ EH)
pthreadGC.dll (GNUC/not dependent on exceptions)
The GNU library archive file names have changed to:
libpthreadGCE.a
libpthreadGC.a
------------------------------------------------------------------------------
Q 4 Cleanup code default style or: it used to work when I built
--- the library myself, but now it doesn't - why?
Up to and including snapshot 2001-07-12, if not defined, the cleanup
style was determined automatically from the compiler used, and one
of the following was defined accordingly:
__CLEANUP_SEH MSVC only
__CLEANUP_CXX C++, including MSVC++, GNU G++
__CLEANUP_C C, including GNU GCC, not MSVC
These defines determine the style of cleanup (see pthread.h) and,
most importantly, the way that cancelation and thread exit (via
pthread_exit) is performed (see the routine ptw32_throw() in private.c).
In short, the exceptions versions of the library throw an exception
when a thread is canceled or exits (via pthread_exit()), which is
caught by a handler in the thread startup routine, so that the
the correct stack unwinding occurs regardless of where the thread
is when it's canceled or exits via pthread_exit().
After snapshot 2001-07-12, unless your build explicitly defines (e.g.
via a compiler option) __CLEANUP_SEH, __CLEANUP_CXX, or __CLEANUP_C, then
the build now ALWAYS defaults to __CLEANUP_C style cleanup. This style
uses setjmp/longjmp in the cancelation and pthread_exit implementations,
and therefore won't do stack unwinding even when linked to applications
that have it (e.g. C++ apps). This is for consistency with most/all
commercial Unix POSIX threads implementations.
Although it was not clearly documented before, it is still necessary to
build your application using the same __CLEANUP_* define as was
used for the version of the library that you link with, so that the
correct parts of pthread.h are included. That is, the possible
defines require the following library versions:
__CLEANUP_SEH pthreadVSE.dll
__CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll
__CLEANUP_C pthreadVC.dll or pthreadGC.dll
THE POINT OF ALL THIS IS: if you have not been defining one of these
explicitly, then the defaults have been set according to the compiler
and language you are using, as described at the top of this
section.
THIS NOW CHANGES, as has been explained above. For example:
If you were building your application with MSVC++ i.e. using C++
exceptions (rather than SEH) and not explicitly defining one of
__CLEANUP_*, then __CLEANUP_C++ was defined for you in pthread.h.
You should have been linking with pthreadVCE.dll, which does
stack unwinding.
If you now build your application as you had before, pthread.h will now
set __CLEANUP_C as the default style, and you will need to link
with pthreadVC.dll. Stack unwinding will now NOT occur when a
thread is canceled, nor when the thread calls pthread_exit().
Your application will now most likely behave differently to previous
versions, and in non-obvious ways. Most likely is that local
objects may not be destroyed or cleaned up after a thread
is canceled.
If you want the same behaviour as before, then you must now define
__CLEANUP_C++ explicitly using a compiler option and link with
pthreadVCE.dll as you did before.
------------------------------------------------------------------------------
Q 5 Why is the default library version now less exception-friendly?
---
Because most commercial Unix POSIX threads implementations don't allow you to
choose to have stack unwinding. (Compaq's TRU64 Unix is possibly an exception.)
Therefore, providing it in pthread-win32 as a default could be dangerous
and non-portable. We still provide the choice but you must now consciously
make it.
WHY NOT REMOVE THE EXCEPTIONS VERSIONS OF THE LIBRARY ALTOGETHER?
There are a few reasons:
- because there are well respected POSIX threads people who believe
that POSIX threads implementations should be exceptions-aware and
do the expected thing in that context. (There are equally respected
people who believe it should not be easily accessible, if it's there
at all.)
- because pthreads-win32 is one of the few implementations that has
the choice, perhaps the only freely available one, and so offers
a laboratory to people who may want to explore the effects;
- although the code will always be around somewhere for anyone who
wants it, once it's removed from the current version it will not be
nearly as visible to people who may have a use for it.
------------------------------------------------------------------------------
Q 6 Should I use Cygwin or Mingw32 as a development environment?
---
Important: see Q7 also.
Use Mingw32 with the MSVCRT library to build applications that use
the pthreads DLL.
Cygwin's own internal support for POSIX threads is growing.
Consult that project's documentation for more information.
------------------------------------------------------------------------------
Q 7 Now that pthreads-win32 builds under Mingw32, why do I get
--- memory access violations (segfaults)?
The latest Mingw32 package has thread-safe exception handling (see Q10).
Also, see Q6 above.
------------------------------------------------------------------------------
Q 8 How do I use pthread.dll for Win32 (Visual C++ 5.0)
---
>
> I'm a "rookie" when it comes to your pthread implementation. I'm currently
> desperately trying to install the prebuilt .dll file into my MSVC compiler.
> Could you please provide me with explicit instructions on how to do this (or
> direct me to a resource(s) where I can acquire such information)?
>
> Thank you,
>
You should have a .dll, .lib, .def, and three .h files. It is recommended
that you use pthreadVC.dll, rather than pthreadVCE.dll or pthreadVSE.dll
(see Q2 above).
The .dll can go in any directory listed in your PATH environment
variable, so putting it into C:\WINDOWS should work.
The .lib file can go in any directory listed in your LIB environment
variable.
The .h files can go in any directory listed in your INCLUDE
environment variable.
Or you might prefer to put the .lib and .h files into a new directory
and add its path to LIB and INCLUDE. You can probably do this easiest
by editing the file:-
C:\Program Files\DevStudio\vc\bin\vcvars32.bat
The .def file isn't used by anything in the pre-compiled version but
is included for information.
Cheers.
Ross
------------------------------------------------------------------------------
Q 9 Cancelation doesn't work for me, why?
---
> I'm investigating a problem regarding thread cancelation. The thread I want
> to cancel has PTHREAD_CANCEL_ASYNCHRONOUS, however, this piece of code
> blocks on the join():
>
> if ((retv = Pthread_cancel( recvThread )) == 0)
> {
> retv = Pthread_join( recvThread, 0 );
> }
>
> Pthread_* are just macro's; they call pthread_*.
>
> The thread recvThread seems to block on a select() call. It doesn't get
> cancelled.
>
> Two questions:
>
> 1) is this normal behaviour?
>
> 2) if not, how does the cancel mechanism work? I'm not very familliar to
> win32 programming, so I don't really understand how the *Event() family of
> calls work.
The answer to your first question is, normal POSIX behaviour would
be to asynchronously cancel the thread. However, even that doesn't
guarantee cancelation as the standard only says it should be
cancelled as soon as possible.
Snapshot 99-11-02 or earlier only partially supports asynchronous cancellation.
Snapshots since then simulate async cancelation by poking the address of
a cancelation routine into the PC of the threads context. This requires
the thread to be resumed in some way for the cancelation to actually
proceed. This is not true async cancelation, but it is as close as we've
been able to get to it.
If the thread you're trying to cancel is blocked (for instance, it could be
waiting for data from the network), it will only get cancelled when it unblocks
(when the data arrives). For true pre-emptive cancelation in these cases,
pthreads-win32 from snapshot 2004-05-16 can automatically recognise and use the
QueueUserAPCEx package by Panagiotis E. Hadjidoukas. This package is available
from the pthreads-win32 ftp site and is included in the pthreads-win32
self-unpacking zip from 2004-05-16 onwards.
Using deferred cancelation would normally be the way to go, however,
even though the POSIX threads standard lists a number of C library
functions that are defined as deferred cancelation points, there is
no hookup between those which are provided by Windows and the
pthreads-win32 library.
Incidently, it's worth noting for code portability that the older POSIX
threads standards cancelation point lists didn't include "select" because
(as I read in Butenhof) it wasn't part of POSIX. However, it does appear in
the SUSV3.
Effectively, the only mandatory cancelation points that pthreads-win32
recognises are those the library implements itself, ie.
pthread_testcancel
pthread_cond_wait
pthread_cond_timedwait
pthread_join
sem_wait
sem_timedwait
pthread_delay_np
The following routines from the non-mandatory list in SUSV3 are
cancelation points in pthreads-win32:
pthread_rwlock_wrlock
pthread_rwlock_timedwrlock
The following routines from the non-mandatory list in SUSV3 are not
cancelation points in pthreads-win32:
pthread_rwlock_rdlock
pthread_rwlock_timedrdlock
Pthreads-win32 also provides two functions that allow you to create
cancelation points within your application, but only for cases where
a thread is going to block on a Win32 handle. These are:
pthreadCancelableWait(HANDLE waitHandle) /* Infinite wait */
pthreadCancelableTimedWait(HANDLE waitHandle, DWORD timeout)
------------------------------------------------------------------------------
Q 10 How do I create thread-safe applications using
---- pthreadGCE.dll, libpthreadw32.a and Mingw32?
This should not be a problem with recent versions of MinGW32.
For early versions, see Thomas Pfaff's email at:
http://sources.redhat.com/ml/pthreads-win32/2002/msg00000.html
------------------------------------------------------------------------------
Q 11 Why isn't pthread_t defined as a scalar (e.g. pointer or int)
like it is for other POSIX threads implementations?
----
Originally pthread_t was defined as a pointer (to the opaque pthread_t_
struct) and later it was changed to a struct containing the original
pointer plus a sequence counter. This is allowed under both the original
POSIX Threads Standard and the current Single Unix Specification.
When pthread_t is a simple pointer to a struct some very difficult to
debug problems arise from the process of freeing and later allocing
thread structs because new pthread_t handles can acquire the identity of
previously detached threads. The change to a struct was made, along with
some changes to their internal managment, in order to guarantee (for
practical applications) that the pthread_t handle will be unique over the
life of the running process.
Where application code attempts to compare one pthread_t against another
directly, a compiler error will be emitted because structs can't be
compared at that level. This should signal a potentially serious problem
in the code design, which would go undetected if pthread_t was a scalar.
The POSIX Threading API provides a function named pthread_equal() to
compare pthread_t thread handles.
Other pthreads implementations, such as Sun's, use an int as the handle
but do guarantee uniqueness within the process scope. Win32 scalar typed
thread handles also guarantee uniqueness in system scope. It wasn't clear
how well the internal management of these handles would scale as the
number of threads and the fragmentation of the sequence numbering
increased for applications where thousands or millions of threads are
created and detached over time. The current management of threads within
pthreads-win32 using structs for pthread_t, and reusing without ever
freeing them, reduces the management time overheads to a constant, which
could be important given that pthreads-win32 threads are built on top of
Win32 threads and will therefore include that management overhead on top
of their own. The cost is that the memory resources used for thread
handles will remain at the peak level until the process exits.
While it may be inconvenient for developers to be forced away from making
assumptions about the internals of pthread_t, the advantage for the
future development of pthread-win32, as well as those applications that
use it and other pthread implementations, is that the library is free to
change pthread_t internals and management as better methods arise.
-593
View File
@@ -1,593 +0,0 @@
#
# --------------------------------------------------------------------------
#
# Pthreads-win32 - POSIX Threads Library for Win32
# Copyright(C) 1998 John E. Bossom
# Copyright(C) 1999,2005 Pthreads-win32 contributors
#
# Contact Email: rpj@callisto.canberra.edu.au
#
# The current list of contributors is contained
# in the file CONTRIBUTORS included with the source
# code distribution. The list can also be seen at the
# following World Wide Web location:
# http://sources.redhat.com/pthreads-win32/contributors.html
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library in the file COPYING.LIB;
# if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
#
DLL_VER = 2
DLL_VERD= $(DLL_VER)d
DEVROOT = C:\PTHREADS
DLLDEST = $(DEVROOT)\DLL
LIBDEST = $(DEVROOT)\DLL
# If Running MsysDTK
RM = rm -f
MV = mv -f
CP = cp -f
# If not.
#RM = erase
#MV = rename
#CP = copy
# For cross compiling use e.g.
# make CROSS=x86_64-w64-mingw32- clean GC-inlined
CROSS =
AR = $(CROSS)ar
DLLTOOL = $(CROSS)dlltool
CC = $(CROSS)gcc
CXX = $(CROSS)g++
RANLIB = $(CROSS)ranlib
RC = $(CROSS)windres
OPT = $(CLEANUP) -O3 # -finline-functions -findirect-inlining
XOPT =
RCFLAGS = --include-dir=.
# Uncomment this if config.h defines RETAIN_WSALASTERROR
#LFLAGS = -lws2_32
# ----------------------------------------------------------------------
# The library can be built with some alternative behaviour to
# facilitate development of applications on Win32 that will be ported
# to other POSIX systems. Nothing definable here will make the library
# non-compliant, but applications that make assumptions that POSIX
# does not garrantee may fail or misbehave under some settings.
#
# PTW32_THREAD_ID_REUSE_INCREMENT
# Purpose:
# POSIX says that applications should assume that thread IDs can be
# recycled. However, Solaris and some other systems use a [very large]
# sequence number as the thread ID, which provides virtual uniqueness.
# Pthreads-win32 provides pseudo-unique IDs when the default increment
# (1) is used, but pthread_t is not a scalar type like Solaris's.
#
# Usage:
# Set to any value in the range: 0 <= value <= 2^wordsize
#
# Examples:
# Set to 0 to emulate non recycle-unique behaviour like Linux or *BSD.
# Set to 1 for recycle-unique thread IDs (this is the default).
# Set to some other +ve value to emulate smaller word size types
# (i.e. will wrap sooner).
#
#PTW32_FLAGS = "-DPTW32_THREAD_ID_REUSE_INCREMENT=0"
#
# ----------------------------------------------------------------------
GC_CFLAGS = $(PTW32_FLAGS)
GCE_CFLAGS = $(PTW32_FLAGS) -mthreads
## Mingw
MAKE ?= make
CFLAGS = $(OPT) $(XOPT) -I. -DHAVE_PTW32_CONFIG_H -Wall
DLL_INLINED_OBJS = \
pthread.o \
version.o
# Agregate modules for inlinability
DLL_OBJS = \
attr.o \
barrier.o \
cancel.o \
cleanup.o \
condvar.o \
create.o \
dll.o \
errno.o \
exit.o \
fork.o \
global.o \
misc.o \
mutex.o \
nonportable.o \
private.o \
rwlock.o \
sched.o \
semaphore.o \
signal.o \
spin.o \
sync.o \
tsd.o \
version.o
# Separate modules for minimum size statically linked images
SMALL_STATIC_OBJS = \
pthread_attr_init.o \
pthread_attr_destroy.o \
pthread_attr_getdetachstate.o \
pthread_attr_setdetachstate.o \
pthread_attr_getstackaddr.o \
pthread_attr_setstackaddr.o \
pthread_attr_getstacksize.o \
pthread_attr_setstacksize.o \
pthread_attr_getscope.o \
pthread_attr_setscope.o \
pthread_attr_setschedpolicy.o \
pthread_attr_getschedpolicy.o \
pthread_attr_setschedparam.o \
pthread_attr_getschedparam.o \
pthread_attr_setinheritsched.o \
pthread_attr_getinheritsched.o \
pthread_barrier_init.o \
pthread_barrier_destroy.o \
pthread_barrier_wait.o \
pthread_barrierattr_init.o \
pthread_barrierattr_destroy.o \
pthread_barrierattr_setpshared.o \
pthread_barrierattr_getpshared.o \
pthread_setcancelstate.o \
pthread_setcanceltype.o \
pthread_testcancel.o \
pthread_cancel.o \
cleanup.o \
pthread_condattr_destroy.o \
pthread_condattr_getpshared.o \
pthread_condattr_init.o \
pthread_condattr_setpshared.o \
pthread_cond_destroy.o \
pthread_cond_init.o \
pthread_cond_signal.o \
pthread_cond_wait.o \
create.o \
dll.o \
autostatic.o \
errno.o \
pthread_exit.o \
fork.o \
global.o \
pthread_mutex_init.o \
pthread_mutex_destroy.o \
pthread_mutexattr_init.o \
pthread_mutexattr_destroy.o \
pthread_mutexattr_getpshared.o \
pthread_mutexattr_setpshared.o \
pthread_mutexattr_settype.o \
pthread_mutexattr_gettype.o \
pthread_mutexattr_setrobust.o \
pthread_mutexattr_getrobust.o \
pthread_mutex_lock.o \
pthread_mutex_timedlock.o \
pthread_mutex_unlock.o \
pthread_mutex_trylock.o \
pthread_mutex_consistent.o \
pthread_mutexattr_setkind_np.o \
pthread_mutexattr_getkind_np.o \
pthread_getw32threadhandle_np.o \
pthread_getunique_np.o \
pthread_delay_np.o \
pthread_num_processors_np.o \
pthread_win32_attach_detach_np.o \
pthread_equal.o \
pthread_getconcurrency.o \
pthread_once.o \
pthread_self.o \
pthread_setconcurrency.o \
pthread_rwlock_init.o \
pthread_rwlock_destroy.o \
pthread_rwlockattr_init.o \
pthread_rwlockattr_destroy.o \
pthread_rwlockattr_getpshared.o \
pthread_rwlockattr_setpshared.o \
pthread_rwlock_rdlock.o \
pthread_rwlock_wrlock.o \
pthread_rwlock_unlock.o \
pthread_rwlock_tryrdlock.o \
pthread_rwlock_trywrlock.o \
pthread_setschedparam.o \
pthread_getschedparam.o \
pthread_timechange_handler_np.o \
ptw32_is_attr.o \
ptw32_cond_check_need_init.o \
ptw32_MCS_lock.o \
ptw32_mutex_check_need_init.o \
ptw32_processInitialize.o \
ptw32_processTerminate.o \
ptw32_threadStart.o \
ptw32_threadDestroy.o \
ptw32_tkAssocCreate.o \
ptw32_tkAssocDestroy.o \
ptw32_callUserDestroyRoutines.o \
ptw32_timespec.o \
ptw32_throw.o \
ptw32_getprocessors.o \
ptw32_calloc.o \
ptw32_new.o \
ptw32_reuse.o \
ptw32_semwait.o \
ptw32_relmillisecs.o \
ptw32_rwlock_check_need_init.o \
sched_get_priority_max.o \
sched_get_priority_min.o \
sched_setscheduler.o \
sched_getscheduler.o \
sched_yield.o \
sem_init.o \
sem_destroy.o \
sem_trywait.o \
sem_timedwait.o \
sem_wait.o \
sem_post.o \
sem_post_multiple.o \
sem_getvalue.o \
sem_open.o \
sem_close.o \
sem_unlink.o \
signal.o \
pthread_kill.o \
ptw32_spinlock_check_need_init.o \
pthread_spin_init.o \
pthread_spin_destroy.o \
pthread_spin_lock.o \
pthread_spin_unlock.o \
pthread_spin_trylock.o \
pthread_detach.o \
pthread_join.o \
pthread_key_create.o \
pthread_key_delete.o \
pthread_setspecific.o \
pthread_getspecific.o \
w32_CancelableWait.o \
version.o
INCL = \
config.h \
implement.h \
semaphore.h \
pthread.h \
need_errno.h
ATTR_SRCS = \
pthread_attr_init.c \
pthread_attr_destroy.c \
pthread_attr_getdetachstate.c \
pthread_attr_setdetachstate.c \
pthread_attr_getstackaddr.c \
pthread_attr_setstackaddr.c \
pthread_attr_getstacksize.c \
pthread_attr_setstacksize.c \
pthread_attr_getscope.c \
pthread_attr_setscope.c
BARRIER_SRCS = \
pthread_barrier_init.c \
pthread_barrier_destroy.c \
pthread_barrier_wait.c \
pthread_barrierattr_init.c \
pthread_barrierattr_destroy.c \
pthread_barrierattr_setpshared.c \
pthread_barrierattr_getpshared.c
CANCEL_SRCS = \
pthread_setcancelstate.c \
pthread_setcanceltype.c \
pthread_testcancel.c \
pthread_cancel.c
CONDVAR_SRCS = \
ptw32_cond_check_need_init.c \
pthread_condattr_destroy.c \
pthread_condattr_getpshared.c \
pthread_condattr_init.c \
pthread_condattr_setpshared.c \
pthread_cond_destroy.c \
pthread_cond_init.c \
pthread_cond_signal.c \
pthread_cond_wait.c
EXIT_SRCS = \
pthread_exit.c
MISC_SRCS = \
pthread_equal.c \
pthread_getconcurrency.c \
pthread_kill.c \
pthread_once.c \
pthread_self.c \
pthread_setconcurrency.c \
ptw32_calloc.c \
ptw32_MCS_lock.c \
ptw32_new.c \
ptw32_reuse.c \
w32_CancelableWait.c
MUTEX_SRCS = \
ptw32_mutex_check_need_init.c \
pthread_mutex_init.c \
pthread_mutex_destroy.c \
pthread_mutexattr_init.c \
pthread_mutexattr_destroy.c \
pthread_mutexattr_getpshared.c \
pthread_mutexattr_setpshared.c \
pthread_mutexattr_settype.c \
pthread_mutexattr_gettype.c \
pthread_mutexattr_setrobust.c \
pthread_mutexattr_getrobust.c \
pthread_mutex_lock.c \
pthread_mutex_timedlock.c \
pthread_mutex_unlock.c \
pthread_mutex_trylock.c \
pthread_mutex_consistent.c
NONPORTABLE_SRCS = \
pthread_mutexattr_setkind_np.c \
pthread_mutexattr_getkind_np.c \
pthread_getw32threadhandle_np.c \
pthread_getunique_np.c \
pthread_delay_np.c \
pthread_num_processors_np.c \
pthread_win32_attach_detach_np.c \
pthread_timechange_handler_np.c
PRIVATE_SRCS = \
ptw32_is_attr.c \
ptw32_processInitialize.c \
ptw32_processTerminate.c \
ptw32_threadStart.c \
ptw32_threadDestroy.c \
ptw32_tkAssocCreate.c \
ptw32_tkAssocDestroy.c \
ptw32_callUserDestroyRoutines.c \
ptw32_semwait.c \
ptw32_relmillisecs.c \
ptw32_timespec.c \
ptw32_throw.c \
ptw32_getprocessors.c
RWLOCK_SRCS = \
ptw32_rwlock_check_need_init.c \
ptw32_rwlock_cancelwrwait.c \
pthread_rwlock_init.c \
pthread_rwlock_destroy.c \
pthread_rwlockattr_init.c \
pthread_rwlockattr_destroy.c \
pthread_rwlockattr_getpshared.c \
pthread_rwlockattr_setpshared.c \
pthread_rwlock_rdlock.c \
pthread_rwlock_timedrdlock.c \
pthread_rwlock_wrlock.c \
pthread_rwlock_timedwrlock.c \
pthread_rwlock_unlock.c \
pthread_rwlock_tryrdlock.c \
pthread_rwlock_trywrlock.c
SCHED_SRCS = \
pthread_attr_setschedpolicy.c \
pthread_attr_getschedpolicy.c \
pthread_attr_setschedparam.c \
pthread_attr_getschedparam.c \
pthread_attr_setinheritsched.c \
pthread_attr_getinheritsched.c \
pthread_setschedparam.c \
pthread_getschedparam.c \
sched_get_priority_max.c \
sched_get_priority_min.c \
sched_setscheduler.c \
sched_getscheduler.c \
sched_yield.c
SEMAPHORE_SRCS = \
sem_init.c \
sem_destroy.c \
sem_trywait.c \
sem_timedwait.c \
sem_wait.c \
sem_post.c \
sem_post_multiple.c \
sem_getvalue.c \
sem_open.c \
sem_close.c \
sem_unlink.c
SPIN_SRCS = \
ptw32_spinlock_check_need_init.c \
pthread_spin_init.c \
pthread_spin_destroy.c \
pthread_spin_lock.c \
pthread_spin_unlock.c \
pthread_spin_trylock.c
SYNC_SRCS = \
pthread_detach.c \
pthread_join.c
TSD_SRCS = \
pthread_key_create.c \
pthread_key_delete.c \
pthread_setspecific.c \
pthread_getspecific.c
GCE_DLL = pthreadGCE$(DLL_VER).dll
GCED_DLL= pthreadGCE$(DLL_VERD).dll
GCE_LIB = libpthreadGCE$(DLL_VER).a
GCED_LIB= libpthreadGCE$(DLL_VERD).a
GCE_INLINED_STAMP = pthreadGCE$(DLL_VER).stamp
GCED_INLINED_STAMP = pthreadGCE$(DLL_VERD).stamp
GCE_STATIC_STAMP = libpthreadGCE$(DLL_VER).stamp
GCED_STATIC_STAMP = libpthreadGCE$(DLL_VERD).stamp
GC_DLL = pthreadGC$(DLL_VER).dll
GCD_DLL = pthreadGC$(DLL_VERD).dll
GC_LIB = libpthreadGC$(DLL_VER).a
GCD_LIB = libpthreadGC$(DLL_VERD).a
GC_INLINED_STAMP = pthreadGC$(DLL_VER).stamp
GCD_INLINED_STAMP = pthreadGC$(DLL_VERD).stamp
GC_STATIC_STAMP = libpthreadGC$(DLL_VER).stamp
GCD_STATIC_STAMP = libpthreadGC$(DLL_VERD).stamp
PTHREAD_DEF = pthread.def
help:
@ echo "Run one of the following command lines:"
@ echo "make clean GC (to build the GNU C dll with C cleanup code)"
@ echo "make clean GCE (to build the GNU C dll with C++ exception handling)"
@ echo "make clean GC-inlined (to build the GNU C inlined dll with C cleanup code)"
@ echo "make clean GCE-inlined (to build the GNU C inlined dll with C++ exception handling)"
@ echo "make clean GC-static (to build the GNU C inlined static lib with C cleanup code)"
@ echo "make clean GC-debug (to build the GNU C debug dll with C cleanup code)"
@ echo "make clean GCE-debug (to build the GNU C debug dll with C++ exception handling)"
@ echo "make clean GC-inlined-debug (to build the GNU C inlined debug dll with C cleanup code)"
@ echo "make clean GCE-inlined-debug (to build the GNU C inlined debug dll with C++ exception handling)"
@ echo "make clean GC-static-debug (to build the GNU C inlined static debug lib with C cleanup code)"
all:
@ $(MAKE) clean GCE
@ $(MAKE) clean GC
GC:
$(MAKE) CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL)
GC-debug:
$(MAKE) CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_DLL)
GCE:
$(MAKE) CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL)
GCE-debug:
$(MAKE) CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_DLL)
GC-inlined:
$(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" $(GC_INLINED_STAMP)
GC-inlined-debug:
$(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_INLINED_STAMP)
GCE-inlined:
$(MAKE) CC=$(CXX) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" $(GCE_INLINED_STAMP)
GCE-inlined-debug:
$(MAKE) CC=$(CXX) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_INLINED_STAMP)
GC-static:
$(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" $(GC_STATIC_STAMP)
GC-static-debug:
$(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_INLINED_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_STATIC_STAMP)
tests:
@ cd tests
@ $(MAKE) auto
%.pre: %.c
$(CC) -E -o $@ $(CFLAGS) $^
%.s: %.c
$(CC) -c $(CFLAGS) -DPTW32_BUILD_INLINED -Wa,-ahl $^ > $@
%.o: %.rc
$(RC) $(RCFLAGS) $(CLEANUP) -o $@ -i $<
.SUFFIXES: .dll .rc .c .o
.c.o:; $(CC) -c -o $@ $(CFLAGS) $(XC_FLAGS) $<
$(GC_DLL) $(GCD_DLL): $(DLL_OBJS)
$(CC) $(OPT) -shared -o $(GC_DLL) $(DLL_OBJS) $(LFLAGS)
$(DLLTOOL) -z pthread.def $(DLL_OBJS)
$(DLLTOOL) -k --dllname $@ --output-lib $(GC_LIB) --def $(PTHREAD_DEF)
$(GCE_DLL): $(DLL_OBJS)
$(CC) $(OPT) -mthreads -shared -o $(GCE_DLL) $(DLL_OBJS) $(LFLAGS)
$(DLLTOOL) -z pthread.def $(DLL_OBJS)
$(DLLTOOL) -k --dllname $@ --output-lib $(GCE_LIB) --def $(PTHREAD_DEF)
$(GC_INLINED_STAMP) $(GCD_INLINED_STAMP): $(DLL_INLINED_OBJS)
$(CC) $(OPT) $(XOPT) -shared -o $(GC_DLL) $(DLL_INLINED_OBJS) $(LFLAGS)
$(DLLTOOL) -z pthread.def $(DLL_INLINED_OBJS)
$(DLLTOOL) -k --dllname $(GC_DLL) --output-lib $(GC_LIB) --def $(PTHREAD_DEF)
echo touched > $(GC_INLINED_STAMP)
$(GCE_INLINED_STAMP) $(GCED_INLINED_STAMP): $(DLL_INLINED_OBJS)
$(CC) $(OPT) $(XOPT) -mthreads -shared -o $(GCE_DLL) $(DLL_INLINED_OBJS) $(LFLAGS)
$(DLLTOOL) -z pthread.def $(DLL_INLINED_OBJS)
$(DLLTOOL) -k --dllname $(GCE_DLL) --output-lib $(GCE_LIB) --def $(PTHREAD_DEF)
echo touched > $(GCE_INLINED_STAMP)
$(GC_STATIC_STAMP) $(GCD_STATIC_STAMP): $(DLL_INLINED_OBJS)
$(RM) $(GC_LIB)
$(AR) -rv $(GC_LIB) $(DLL_INLINED_OBJS)
$(RANLIB) $(GC_LIB)
echo touched > $(GC_STATIC_STAMP)
clean:
-$(RM) *~
-$(RM) *.i
-$(RM) *.s
-$(RM) *.o
-$(RM) *.obj
-$(RM) *.exe
-$(RM) $(PTHREAD_DEF)
realclean: clean
-$(RM) $(GC_LIB)
-$(RM) $(GCE_LIB)
-$(RM) $(GC_DLL)
-$(RM) $(GCE_DLL)
-$(RM) $(GC_INLINED_STAMP)
-$(RM) $(GCE_INLINED_STAMP)
-$(RM) $(GC_STATIC_STAMP)
-$(RM) $(GCD_LIB)
-$(RM) $(GCED_LIB)
-$(RM) $(GCD_DLL)
-$(RM) $(GCED_DLL)
-$(RM) $(GCD_INLINED_STAMP)
-$(RM) $(GCED_INLINED_STAMP)
-$(RM) $(GCD_STATIC_STAMP)
attr.o: attr.c $(ATTR_SRCS) $(INCL)
barrier.o: barrier.c $(BARRIER_SRCS) $(INCL)
cancel.o: cancel.c $(CANCEL_SRCS) $(INCL)
condvar.o: condvar.c $(CONDVAR_SRCS) $(INCL)
exit.o: exit.c $(EXIT_SRCS) $(INCL)
misc.o: misc.c $(MISC_SRCS) $(INCL)
mutex.o: mutex.c $(MUTEX_SRCS) $(INCL)
nonportable.o: nonportable.c $(NONPORTABLE_SRCS) $(INCL)
private.o: private.c $(PRIVATE_SRCS) $(INCL)
rwlock.o: rwlock.c $(RWLOCK_SRCS) $(INCL)
sched.o: sched.c $(SCHED_SRCS) $(INCL)
semaphore.o: semaphore.c $(SEMAPHORE_SRCS) $(INCL)
spin.o: spin.c $(SPIN_SRCS) $(INCL)
sync.o: sync.c $(SYNC_SRCS) $(INCL)
tsd.o: tsd.c $(TSD_SRCS) $(INCL)
version.o: version.rc $(INCL)
-4
View File
@@ -1,4 +0,0 @@
CVS Repository maintainers
Ross Johnson rpj@ise.canberra.edu.au
Ben Elliston bje@cygnus.com
-514
View File
@@ -1,514 +0,0 @@
# This makefile is compatible with MS nmake and can be used as a
# replacement for buildlib.bat. I've changed the target from an ordinary dll
# (/LD) to a debugging dll (/LDd).
#
# The variables $DLLDEST and $LIBDEST hold the destination directories for the
# dll and the lib, respectively. Probably all that needs to change is $DEVROOT.
# DLL_VER:
# See pthread.h and README - This number is computed as 'current - age'
DLL_VER = 2
DLL_VERD= $(DLL_VER)d
DEVROOT = C:\pthreads
DLLDEST = $(DEVROOT)\dll
LIBDEST = $(DEVROOT)\lib
HDRDEST = $(DEVROOT)\include
DLLS = pthreadVCE$(DLL_VER).dll pthreadVSE$(DLL_VER).dll pthreadVC$(DLL_VER).dll \
pthreadVCE$(DLL_VERD).dll pthreadVSE$(DLL_VERD).dll pthreadVC$(DLL_VERD).dll
INLINED_STAMPS = pthreadVCE$(DLL_VER).stamp pthreadVSE$(DLL_VER).stamp pthreadVC$(DLL_VER).stamp \
pthreadVCE$(DLL_VERD).stamp pthreadVSE$(DLL_VERD).stamp pthreadVC$(DLL_VERD).stamp
STATIC_STAMPS = pthreadVCE$(DLL_VER).static pthreadVSE$(DLL_VER).static pthreadVC$(DLL_VER).static \
pthreadVCE$(DLL_VERD).static pthreadVSE$(DLL_VERD).static pthreadVC$(DLL_VERD).static
CC = cl
CPPFLAGS = /I. /DHAVE_PTW32_CONFIG_H
XCFLAGS = /W3 /MD /nologo
CFLAGS = /O2 /Ob2 $(XCFLAGS)
CFLAGSD = /Z7 $(XCFLAGS)
# Uncomment this if config.h defines RETAIN_WSALASTERROR
#XLIBS = wsock32.lib
# Default cleanup style
CLEANUP = __CLEANUP_C
# C++ Exceptions
VCEFLAGS = /EHsc /TP $(CPPFLAGS) $(CFLAGS)
VCEFLAGSD = /EHsc /TP $(CPPFLAGS) $(CFLAGSD)
#Structured Exceptions
VSEFLAGS = $(CPPFLAGS) $(CFLAGS)
VSEFLAGSD = $(CPPFLAGS) $(CFLAGSD)
#C cleanup code
VCFLAGS = $(CPPFLAGS) $(CFLAGS)
VCFLAGSD = $(CPPFLAGS) $(CFLAGSD)
DLL_INLINED_OBJS = \
pthread.obj \
version.res
# Aggregate modules for inlinability
DLL_OBJS = \
attr.obj \
barrier.obj \
cancel.obj \
cleanup.obj \
condvar.obj \
create.obj \
dll.obj \
autostatic.obj \
errno.obj \
exit.obj \
fork.obj \
global.obj \
misc.obj \
mutex.obj \
nonportable.obj \
private.obj \
rwlock.obj \
sched.obj \
semaphore.obj \
signal.obj \
spin.obj \
sync.obj \
tsd.obj \
version.res
# Separate modules for minimising the size of statically linked images
SMALL_STATIC_OBJS = \
pthread_attr_init.obj \
pthread_attr_destroy.obj \
pthread_attr_getdetachstate.obj \
pthread_attr_setdetachstate.obj \
pthread_attr_getstackaddr.obj \
pthread_attr_setstackaddr.obj \
pthread_attr_getstacksize.obj \
pthread_attr_setstacksize.obj \
pthread_attr_getscope.obj \
pthread_attr_setscope.obj \
pthread_attr_setschedpolicy.obj \
pthread_attr_getschedpolicy.obj \
pthread_attr_setschedparam.obj \
pthread_attr_getschedparam.obj \
pthread_attr_setinheritsched.obj \
pthread_attr_getinheritsched.obj \
pthread_barrier_init.obj \
pthread_barrier_destroy.obj \
pthread_barrier_wait.obj \
pthread_barrierattr_init.obj \
pthread_barrierattr_destroy.obj \
pthread_barrierattr_setpshared.obj \
pthread_barrierattr_getpshared.obj \
pthread_setcancelstate.obj \
pthread_setcanceltype.obj \
pthread_testcancel.obj \
pthread_cancel.obj \
cleanup.obj \
pthread_condattr_destroy.obj \
pthread_condattr_getpshared.obj \
pthread_condattr_init.obj \
pthread_condattr_setpshared.obj \
pthread_cond_destroy.obj \
pthread_cond_init.obj \
pthread_cond_signal.obj \
pthread_cond_wait.obj \
create.obj \
dll.obj \
autostatic.obj \
errno.obj \
pthread_exit.obj \
fork.obj \
global.obj \
pthread_mutex_init.obj \
pthread_mutex_destroy.obj \
pthread_mutexattr_init.obj \
pthread_mutexattr_destroy.obj \
pthread_mutexattr_getpshared.obj \
pthread_mutexattr_setpshared.obj \
pthread_mutexattr_settype.obj \
pthread_mutexattr_gettype.obj \
pthread_mutexattr_setrobust.obj \
pthread_mutexattr_getrobust.obj \
pthread_mutex_lock.obj \
pthread_mutex_timedlock.obj \
pthread_mutex_unlock.obj \
pthread_mutex_trylock.obj \
pthread_mutex_consistent.obj \
pthread_mutexattr_setkind_np.obj \
pthread_mutexattr_getkind_np.obj \
pthread_getw32threadhandle_np.obj \
pthread_getunique_np.obj \
pthread_delay_np.obj \
pthread_num_processors_np.obj \
pthread_win32_attach_detach_np.obj \
pthread_equal.obj \
pthread_getconcurrency.obj \
pthread_once.obj \
pthread_self.obj \
pthread_setconcurrency.obj \
pthread_rwlock_init.obj \
pthread_rwlock_destroy.obj \
pthread_rwlockattr_init.obj \
pthread_rwlockattr_destroy.obj \
pthread_rwlockattr_getpshared.obj \
pthread_rwlockattr_setpshared.obj \
pthread_rwlock_rdlock.obj \
pthread_rwlock_wrlock.obj \
pthread_rwlock_unlock.obj \
pthread_rwlock_tryrdlock.obj \
pthread_rwlock_trywrlock.obj \
pthread_setschedparam.obj \
pthread_getschedparam.obj \
pthread_timechange_handler_np.obj \
ptw32_is_attr.obj \
ptw32_processInitialize.obj \
ptw32_processTerminate.obj \
ptw32_threadStart.obj \
ptw32_threadDestroy.obj \
ptw32_tkAssocCreate.obj \
ptw32_tkAssocDestroy.obj \
ptw32_callUserDestroyRoutines.obj \
ptw32_timespec.obj \
ptw32_throw.obj \
ptw32_getprocessors.obj \
ptw32_calloc.obj \
ptw32_new.obj \
ptw32_reuse.obj \
ptw32_rwlock_check_need_init.obj \
ptw32_cond_check_need_init.obj \
ptw32_mutex_check_need_init.obj \
ptw32_semwait.obj \
ptw32_relmillisecs.obj \
ptw32_MCS_lock.obj \
sched_get_priority_max.obj \
sched_get_priority_min.obj \
sched_setscheduler.obj \
sched_getscheduler.obj \
sched_yield.obj \
sem_init.obj \
sem_destroy.obj \
sem_trywait.obj \
sem_timedwait.obj \
sem_wait.obj \
sem_post.obj \
sem_post_multiple.obj \
sem_getvalue.obj \
sem_open.obj \
sem_close.obj \
sem_unlink.obj \
signal.obj \
pthread_kill.obj \
ptw32_spinlock_check_need_init.obj \
pthread_spin_init.obj \
pthread_spin_destroy.obj \
pthread_spin_lock.obj \
pthread_spin_unlock.obj \
pthread_spin_trylock.obj \
pthread_detach.obj \
pthread_join.obj \
pthread_key_create.obj \
pthread_key_delete.obj \
pthread_setspecific.obj \
pthread_getspecific.obj \
w32_CancelableWait.obj \
version.res
INCL = config.h implement.h semaphore.h pthread.h need_errno.h
ATTR_SRCS = \
pthread_attr_init.c \
pthread_attr_destroy.c \
pthread_attr_getdetachstate.c \
pthread_attr_setdetachstate.c \
pthread_attr_getstackaddr.c \
pthread_attr_setstackaddr.c \
pthread_attr_getstacksize.c \
pthread_attr_setstacksize.c \
pthread_attr_getscope.c \
pthread_attr_setscope.c
BARRIER_SRCS = \
pthread_barrier_init.c \
pthread_barrier_destroy.c \
pthread_barrier_wait.c \
pthread_barrierattr_init.c \
pthread_barrierattr_destroy.c \
pthread_barrierattr_setpshared.c \
pthread_barrierattr_getpshared.c
CANCEL_SRCS = \
pthread_setcancelstate.c \
pthread_setcanceltype.c \
pthread_testcancel.c \
pthread_cancel.c
CONDVAR_SRCS = \
ptw32_cond_check_need_init.c \
pthread_condattr_destroy.c \
pthread_condattr_getpshared.c \
pthread_condattr_init.c \
pthread_condattr_setpshared.c \
pthread_cond_destroy.c \
pthread_cond_init.c \
pthread_cond_signal.c \
pthread_cond_wait.c
EXIT_SRCS = \
pthread_exit.c
MISC_SRCS = \
pthread_equal.c \
pthread_getconcurrency.c \
pthread_kill.c \
pthread_once.c \
pthread_self.c \
pthread_setconcurrency.c \
ptw32_calloc.c \
ptw32_MCS_lock.c \
ptw32_new.c \
ptw32_reuse.c \
ptw32_relmillisecs.c \
w32_CancelableWait.c
MUTEX_SRCS = \
ptw32_mutex_check_need_init.c \
pthread_mutex_init.c \
pthread_mutex_destroy.c \
pthread_mutexattr_init.c \
pthread_mutexattr_destroy.c \
pthread_mutexattr_getpshared.c \
pthread_mutexattr_setpshared.c \
pthread_mutexattr_settype.c \
pthread_mutexattr_gettype.c \
pthread_mutexattr_setrobust.c \
pthread_mutexattr_getrobust.c \
pthread_mutex_lock.c \
pthread_mutex_timedlock.c \
pthread_mutex_unlock.c \
pthread_mutex_trylock.c \
pthread_mutex_consistent.c
NONPORTABLE_SRCS = \
pthread_mutexattr_setkind_np.c \
pthread_mutexattr_getkind_np.c \
pthread_getw32threadhandle_np.c \
pthread_getunique_np.c \
pthread_delay_np.c \
pthread_num_processors_np.c \
pthread_win32_attach_detach_np.c \
pthread_timechange_handler_np.c
PRIVATE_SRCS = \
ptw32_is_attr.c \
ptw32_processInitialize.c \
ptw32_processTerminate.c \
ptw32_threadStart.c \
ptw32_threadDestroy.c \
ptw32_tkAssocCreate.c \
ptw32_tkAssocDestroy.c \
ptw32_callUserDestroyRoutines.c \
ptw32_semwait.c \
ptw32_timespec.c \
ptw32_throw.c \
ptw32_getprocessors.c
RWLOCK_SRCS = \
ptw32_rwlock_check_need_init.c \
ptw32_rwlock_cancelwrwait.c \
pthread_rwlock_init.c \
pthread_rwlock_destroy.c \
pthread_rwlockattr_init.c \
pthread_rwlockattr_destroy.c \
pthread_rwlockattr_getpshared.c \
pthread_rwlockattr_setpshared.c \
pthread_rwlock_rdlock.c \
pthread_rwlock_timedrdlock.c \
pthread_rwlock_wrlock.c \
pthread_rwlock_timedwrlock.c \
pthread_rwlock_unlock.c \
pthread_rwlock_tryrdlock.c \
pthread_rwlock_trywrlock.c
SCHED_SRCS = \
pthread_attr_setschedpolicy.c \
pthread_attr_getschedpolicy.c \
pthread_attr_setschedparam.c \
pthread_attr_getschedparam.c \
pthread_attr_setinheritsched.c \
pthread_attr_getinheritsched.c \
pthread_setschedparam.c \
pthread_getschedparam.c \
sched_get_priority_max.c \
sched_get_priority_min.c \
sched_setscheduler.c \
sched_getscheduler.c \
sched_yield.c
SEMAPHORE_SRCS = \
sem_init.c \
sem_destroy.c \
sem_trywait.c \
sem_timedwait.c \
sem_wait.c \
sem_post.c \
sem_post_multiple.c \
sem_getvalue.c \
sem_open.c \
sem_close.c \
sem_unlink.c
SPIN_SRCS = \
ptw32_spinlock_check_need_init.c \
pthread_spin_init.c \
pthread_spin_destroy.c \
pthread_spin_lock.c \
pthread_spin_unlock.c \
pthread_spin_trylock.c
SYNC_SRCS = \
pthread_detach.c \
pthread_join.c
TSD_SRCS = \
pthread_key_create.c \
pthread_key_delete.c \
pthread_setspecific.c \
pthread_getspecific.c
help:
@ echo Run one of the following command lines:
@ echo nmake clean VCE (to build the MSVC dll with C++ exception handling)
@ echo nmake clean VSE (to build the MSVC dll with structured exception handling)
@ echo nmake clean VC (to build the MSVC dll with C cleanup code)
@ echo nmake clean VCE-inlined (to build the MSVC inlined dll with C++ exception handling)
@ echo nmake clean VSE-inlined (to build the MSVC inlined dll with structured exception handling)
@ echo nmake clean VC-inlined (to build the MSVC inlined dll with C cleanup code)
@ echo nmake clean VC-static (to build the MSVC static lib with C cleanup code)
@ echo nmake clean VCE-debug (to build the debug MSVC dll with C++ exception handling)
@ echo nmake clean VSE-debug (to build the debug MSVC dll with structured exception handling)
@ echo nmake clean VC-debug (to build the debug MSVC dll with C cleanup code)
@ echo nmake clean VCE-inlined-debug (to build the debug MSVC inlined dll with C++ exception handling)
@ echo nmake clean VSE-inlined-debug (to build the debug MSVC inlined dll with structured exception handling)
@ echo nmake clean VC-inlined-debug (to build the debug MSVC inlined dll with C cleanup code)
@ echo nmake clean VC-static-debug (to build the debug MSVC static lib with C cleanup code)
all:
@ $(MAKE) /E clean VCE-inlined
@ $(MAKE) /E clean VSE-inlined
@ $(MAKE) /E clean VC-inlined
@ $(MAKE) /E clean VCE-inlined-debug
@ $(MAKE) /E clean VSE-inlined-debug
@ $(MAKE) /E clean VC-inlined-debug
VCE:
@ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS)" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).dll
VCE-debug:
@ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD)" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VERD).dll
VSE:
@ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS)" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VER).dll
VSE-debug:
@ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD)" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VERD).dll
VC:
@ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS)" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).dll
VC-debug:
@ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD)" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).dll
#
# The so-called inlined DLL is just a single translation unit with
# inlining optimisation turned on.
#
VCE-inlined:
@ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).stamp
VCE-inlined-debug:
@ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VERD).stamp
VSE-inlined:
@ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VER).stamp
VSE-inlined-debug:
@ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VERD).stamp
VC-inlined:
@ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).stamp
VC-inlined-debug:
@ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).stamp
VC-static:
@ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).static
VC-static-debug:
@ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).static
realclean: clean
if exist pthread*.dll del pthread*.dll
if exist pthread*.lib del pthread*.lib
if exist *.manifest del *.manifest
if exist *.stamp del *.stamp
clean:
if exist *.obj del *.obj
if exist *.def del *.def
if exist *.ilk del *.ilk
if exist *.pdb del *.pdb
if exist *.exp del *.exp
if exist *.map del *.map
if exist *.o del *.o
if exist *.i del *.i
if exist *.res del *.res
install:
copy pthread*.dll $(DLLDEST)
copy pthread*.lib $(LIBDEST)
copy pthread.h $(HDRDEST)
copy sched.h $(HDRDEST)
copy semaphore.h $(HDRDEST)
$(DLLS): $(DLL_OBJS)
$(CC) /LDd /Zi /nologo $(DLL_OBJS) /link /implib:$*.lib $(XLIBS) /out:$@
$(INLINED_STAMPS): $(DLL_INLINED_OBJS)
$(CC) /LDd /Zi /nologo $(DLL_INLINED_OBJS) /link /implib:$*.lib $(XLIBS) /out:$*.dll
$(STATIC_STAMPS): $(DLL_INLINED_OBJS)
if exist $*.lib del $*.lib
lib $(DLL_INLINED_OBJS) /out:$*.lib
.c.obj:
$(CC) $(EHFLAGS) /D$(CLEANUP) -c $<
# TARGET_CPU is an environment variable set by Visual Studio Command Prompt
# as provided by the SDK
.rc.res:
rc /dPTW32_ARCH$(TARGET_CPU) /dPTW32_RC_MSC /d$(CLEANUP) $<
.c.i:
$(CC) /P /O2 /Ob1 $(VCFLAGS) $<
attr.obj: attr.c $(ATTR_SRCS) $(INCL)
barrier.obj: barrier.c $(BARRIER_SRCS) $(INCL)
cancel.obj: cancel.c $(CANCEL_SRCS) $(INCL)
condvar.obj: condvar.c $(CONDVAR_SRCS) $(INCL)
exit.obj: exit.c $(EXIT_SRCS) $(INCL)
misc.obj: misc.c $(MISC_SRCS) $(INCL)
mutex.obj: mutex.c $(MUTEX_SRCS) $(INCL)
nonportable.obj: nonportable.c $(NONPORTABLE_SRCS) $(INCL)
private.obj: private.c $(PRIVATE_SRCS) $(INCL)
rwlock.obj: rwlock.c $(RWLOCK_SRCS) $(INCL)
sched.obj: sched.c $(SCHED_SRCS) $(INCL)
semaphore.obj: semaphore.c $(SEMAPHORE_SRCS) $(INCL)
spin.obj: spin.c $(SPIN_SRCS) $(INCL)
sync.obj: sync.c $(SYNC_SRCS) $(INCL)
tsd.obj: tsd.c $(TSD_SRCS) $(INCL)
version.res: version.rc $(INCL)
-1241
View File
File diff suppressed because it is too large Load Diff
-24
View File
@@ -1,24 +0,0 @@
/*
* nmake file for uwin pthread library
*/
VERSION = -
CCFLAGS = -V -g $(CC.DLL)
HAVE_PTW32_CONFIG_H == 1
_MT == 1
_timeb == timeb
_ftime == ftime
_errno == _ast_errno
$(INCLUDEDIR) :INSTALLDIR: pthread.h sched.h
pthread $(VERSION) :LIBRARY: attr.c barrier.c cancel.c cleanup.c condvar.c \
create.c dll.c exit.c fork.c global.c misc.c mutex.c private.c \
rwlock.c sched.c semaphore.c spin.c sync.c tsd.c nonportable.c
:: ANNOUNCE CONTRIBUTORS COPYING.LIB ChangeLog FAQ GNUmakefile MAINTAINERS \
Makefile Makefile.in Makefile.vc NEWS PROGRESS README README.WinCE \
TODO WinCE-PORT install-sh errno.c tests tests.mk acconfig.h \
config.guess config.h.in config.sub configure configure.in signal.c \
README.CV README.NONPORTABLE pthread.dsp pthread.dsw
-260
View File
@@ -1,260 +0,0 @@
/* for running tests */
CCFLAGS = -g
_MT == 1
_timeb == timeb
_ftime == ftime
.SOURCE: tests
/*
:PACKAGE: pthread
*/
set keepgoing
":test:" : .MAKE .OPERATOR
local I
$(<:D:B:S=.pass) : .IMPLICIT $(>:D:B:S=.pass)
for I $(<) $(>)
$(I:D:B:S=.pass) : .VIRTUAL .FORCE $(I)
$(>)
end
sizes:: sizes.c
loadfree:: loadfree.c
mutex1:: mutex1.c
mutex1e:: mutex1e.c
mutex1n:: mutex1n.c
mutex1r:: mutex1r.c
mutex2:: mutex2.c
mutex2r:: mutex2r.c
mutex2e:: mutex2e.c
exit1:: exit1.c
condvar1:: condvar1.c
condvar1_1:: condvar1_1.c
condvar1_2:: condvar1_2.c
self1:: self1.c
condvar2:: condvar2.c
condvar2_1:: condvar2_1.c
condvar3_1:: condvar3_1.c
condvar3_2:: condvar3_2.c
condvar3_3:: condvar3_3.c
create1.:: create1.c
create2.:: create2.c
cancel1:: cancel1.c
cancel2:: cancel2.c
mutex3:: mutex3.c
mutex3r:: mutex3r.c
mutex3e:: mutex3e.c
mutex4:: mutex4.c
mutex5:: mutex5.c
mutex6:: mutex6.c
mutex6e:: mutex6e.c
mutex6n:: mutex6n.c
mutex6r:: mutex6r.c
mutex7:: mutex7.c
mutex6s:: mutex6s.c
mutex6rs:: mutex6rs.c
mutex6es:: mutex6es.c
mutex7e:: mutex7e.c
mutex7n:: mutex7n.c
mutex7r:: mutex7r.c
mutex8:: mutex8.c
mutex8e:: mutex8e.c
mutex8n:: mutex8n.c
mutex8r:: mutex8r.c
equal1:: equal1.c
exit2:: exit2.c
exit3:: exit3.c
exit4:: exit4.c
exit5:: exit5.c
join0:: join0.c
join1:: join1.c
join2:: join2.c
join3:: join3.c
kill1:: kill1.c
count1:: count1.c
once1:: once1.c
tsd1:: tsd1.c
self2:: self2.c
eyal1:: eyal1.c
condvar3:: condvar3.c
condvar4:: condvar4.c
condvar5:: condvar5.c
condvar6:: condvar6.c
condvar7:: condvar7.c
condvar8:: condvar8.c
condvar9:: condvar9.c
errno1:: errno1.c
reuse1.:: reuse1.c
reuse2.:: reuse2.c
rwlock1:: rwlock1.c
rwlock2:: rwlock2.c
rwlock3:: rwlock3.c
rwlock4:: rwlock4.c
rwlock5:: rwlock5.c
rwlock6:: rwlock6.c
rwlock7:: rwlock7.c
rwlock8:: rwlock8.c
rwlock2_t:: rwlock2_t.c
rwlock3_t:: rwlock3_t.c
rwlock4_t:: rwlock4_t.c
rwlock5_t:: rwlock5_t.c
rwlock6_t:: rwlock6_t.c
rwlock6_t2:: rwlock6_t2.c
semaphore1:: semaphore1.c
semaphore2:: semaphore2.c
semaphore3:: semaphore3.c
context1:: context1.c
cancel3:: cancel3.c
cancel4:: cancel4.c
cancel5:: cancel5.c
cancel6a:: cancel6a.c
cancel6d:: cancel6d.c
cancel7:: cancel7.c
cleanup0:: cleanup0.c
cleanup1:: cleanup1.c
cleanup2:: cleanup2.c
cleanup3:: cleanup3.c
priority1:: priority1.c
priority2:: priority2.c
inherit1:: inherit1.c
spin1:: spin1.c
spin2:: spin2.c
spin3:: spin3.c
spin4:: spin4.c
barrier1:: barrier1.c
barrier2:: barrier2.c
barrier3:: barrier3.c
barrier4:: barrier4.c
barrier5:: barrier5.c
exception1:: exception1.c
exception2:: exception2.c
exception3:: exception3.c
benchtest1:: benchtest1.c
benchtest2:: benchtest2.c
benchtest3:: benchtest3.c
benchtest4:: benchtest4.c
benchtest5:: benchtest5.c
valid1:: valid1.c
valid2:: valid2.c
cancel9:: cancel9.c
sizes: :test: sizes
loadfree: :test:
mutex5 :test: loadfree
mutex1 :test: loadfree
mutex1n :test: loadfree
mutex1r :test: loadfree
mutex1e :test: loadfree
semaphore1 :test: loadfree
semaphore2 :test: loadfree
semaphore3 :test: loadfree
mutex2 :test: loadfree
mutex2r :test: loadfree
mutex2e :test: loadfree
exit1 :test: loadfree
condvar1 :test: loadfree
kill1 :test: loadfree
condvar1_1 :test: condvar1
condvar1_2 :test: join2
self1 :test: loadfree
condvar2 :test: condvar1
condvar2_1 :test: condvar2
create1 :test: mutex2
create2 :test: create1
reuse1 :test: create2
reuse2 :test: reuse1
cancel1 :test: create1
cancel2 :test: cancel1
mutex3 :test: create1
mutex3r :test: create1
mutex3e :test: create1
mutex4 :test: mutex3
mutex6 :test: mutex4
mutex6n :test: mutex4
mutex6e :test: mutex4
mutex6r :test: mutex4
mutex6s :test: mutex6
mutex6rs :test: mutex6r
mutex6es :test: mutex6e
mutex7 :test: mutex6
mutex7n :test: mutex6n
mutex7e :test: mutex6e
mutex7r :test: mutex6r
mutex8 :test: mutex7
mutex8n :test: mutex7n
mutex8e :test: mutex7e
mutex8r :test: mutex7r
equal1 :test: create1
exit2 :test: create1
exit3 :test: create1
exit4 :test: kill1
exit5 :test: exit4
join0 :test: create1
join1 :test: create1
join2 :test: create1
join3 :test: join2
count1 :test: join1
once1 :test: create1
tsd1 :test: join1
self2 :test: create1
eyal1 :test: tsd1
condvar3 :test: create1
condvar3_1 :test: condvar3
condvar3_2 :test: condvar3_1
condvar3_3 :test: condvar3_2
condvar4 :test: create1
condvar5 :test: condvar4
condvar6 :test: condvar5
condvar7 :test: condvar6 cleanup1
condvar8 :test: condvar7
condvar9 :test: condvar8
errno1 :test: mutex3
rwlock1 :test: condvar6
rwlock2 :test: rwlock1
rwlock3 :test: rwlock2
rwlock4 :test: rwlock3
rwlock5 :test: rwlock4
rwlock6 :test: rwlock5
rwlock7 :test: rwlock6
rwlock8 :test: rwlock7
rwlock2_t :test: rwlock2
rwlock3_t :test: rwlock2_t
rwlock4_t :test: rwlock3_t
rwlock5_t :test: rwlock4_t
rwlock6_t :test: rwlock5_t
rwlock6_t2 :test: rwlock6_t
context1 :test: cancel2
cancel3 :test: context1
cancel4 :test: cancel3
cancel5 :test: cancel3
cancel6a :test: cancel3
cancel6d :test: cancel3
cancel7 :test: kill1
cleanup0 :test: cancel5
cleanup1 :test: cleanup0
cleanup2 :test: cleanup1
cleanup3 :test: cleanup2
priority1 :test: join1
priority2 :test: priority1
inherit1 :test: join1
spin1 :test:
spin2 :test: spin1.c
spin3 :test: spin2.c
spin4 :test: spin3.c
barrier1 :test:
barrier2 :test: barrier1.c
barrier3 :test: barrier2.c
barrier4 :test: barrier3.c
barrier5 :test: barrier4.c
benchtest1 :test: mutex3
benchtest2 :test: benchtest1
benchtest3 :test: benchtest2
benchtest4 :test: benchtest3
benchtest5 :test: benchtest4
exception1 :test: cancel4
exception2 :test: exception1
exception3 :test: exception2
exit4 :test: exit3
valid1 :test: join1
valid2 :test: valid1
cancel9 :test: cancel8
-4
View File
@@ -1,4 +0,0 @@
Please see the ANNOUNCE file "Level of Standards Conformance"
or the web page:
http://sources.redhat.com/pthreads-win32/conformance.html
-601
View File
@@ -1,601 +0,0 @@
PTHREADS-WIN32
==============
Pthreads-win32 is free software, distributed under the GNU Lesser
General Public License (LGPL). See the file 'COPYING.LIB' for terms
and conditions. Also see the file 'COPYING' for information
specific to pthreads-win32, copyrights and the LGPL.
What is it?
-----------
Pthreads-win32 is an Open Source Software implementation of the
Threads component of the POSIX 1003.1c 1995 Standard (or later)
for Microsoft's Win32 environment. Some functions from POSIX
1003.1b are also supported including semaphores. Other related
functions include the set of read-write lock functions. The
library also supports some of the functionality of the Open
Group's Single Unix specification, version 2, namely mutex types,
plus some common and pthreads-win32 specific non-portable
routines (see README.NONPORTABLE).
See the file "ANNOUNCE" for more information including standards
conformance details and the list of supported and unsupported
routines.
Prerequisites
-------------
MSVC or GNU C (MinGW32 MSys development kit)
To build from source.
QueueUserAPCEx by Panagiotis E. Hadjidoukas
To support any thread cancelation in C++ library builds or
to support cancelation of blocked threads in any build.
This library is not required otherwise.
For true async cancelation of threads (including blocked threads).
This is a DLL and Windows driver that provides pre-emptive APC
by forcing threads into an alertable state when the APC is queued.
Both the DLL and driver are provided with the pthreads-win32.exe
self-unpacking ZIP, and on the pthreads-win32 FTP site (in source
and pre-built forms). Currently this is a separate LGPL package to
pthreads-win32. See the README in the QueueUserAPCEx folder for
installation instructions.
Pthreads-win32 will automatically detect if the QueueUserAPCEx DLL
QuserEx.DLL is available and whether the driver AlertDrv.sys is
loaded. If it is not available, pthreads-win32 will simulate async
cancelation, which means that it can async cancel only threads that
are runnable. The simulated async cancellation cannot cancel blocked
threads.
[FOR SECURITY] To be found Quserex.dll MUST be installed in the
Windows System Folder. This is not an unreasonable constraint given a
driver must also be installed and loaded at system startup.
Library naming
--------------
Because the library is being built using various exception
handling schemes and compilers - and because the library
may not work reliably if these are mixed in an application,
each different version of the library has it's own name.
Note 1: the incompatibility is really between EH implementations
of the different compilers. It should be possible to use the
standard C version from either compiler with C++ applications
built with a different compiler. If you use an EH version of
the library, then you must use the same compiler for the
application. This is another complication and dependency that
can be avoided by using only the standard C library version.
Note 2: if you use a standard C pthread*.dll with a C++
application, then any functions that you define that are
intended to be called via pthread_cleanup_push() must be
__cdecl.
Note 3: the intention was to also name either the VC or GC
version (it should be arbitrary) as pthread.dll, including
pthread.lib and libpthread.a as appropriate. This is no longer
likely to happen.
Note 4: the compatibility number was added so that applications
can differentiate between binary incompatible versions of the
libs and dlls.
In general:
pthread[VG]{SE,CE,C}[c].dll
pthread[VG]{SE,CE,C}[c].lib
where:
[VG] indicates the compiler
V - MS VC, or
G - GNU C
{SE,CE,C} indicates the exception handling scheme
SE - Structured EH, or
CE - C++ EH, or
C - no exceptions - uses setjmp/longjmp
c - DLL compatibility number indicating ABI and API
compatibility with applications built against
a snapshot with the same compatibility number.
See 'Version numbering' below.
The name may also be suffixed by a 'd' to indicate a debugging version
of the library. E.g. pthreadVC2d.lib. Debugging versions contain
additional information for debugging (symbols etc) and are often not
optimised in any way (compiled with optimisation turned off).
Examples:
pthreadVSE.dll (MSVC/SEH)
pthreadGCE.dll (GNUC/C++ EH)
pthreadGC.dll (GNUC/not dependent on exceptions)
pthreadVC1.dll (MSVC/not dependent on exceptions - not binary
compatible with pthreadVC.dll)
pthreadVC2.dll (MSVC/not dependent on exceptions - not binary
compatible with pthreadVC1.dll or pthreadVC.dll)
The GNU library archive file names have correspondingly changed to:
libpthreadGCEc.a
libpthreadGCc.a
Versioning numbering
--------------------
Version numbering is separate from the snapshot dating system, and
is the canonical version identification system embedded within the
DLL using the Microsoft version resource system. The versioning
system chosen follows the GNU Libtool system. See
http://www.gnu.org/software/libtool/manual.html section 6.2.
See the resource file 'version.rc'.
Microsoft version numbers use 4 integers:
0.0.0.0
Pthreads-win32 uses the first 3 following the Libtool convention.
The fourth is commonly used for the build number, but will be reserved
for future use.
current.revision.age.0
The numbers are changed as follows:
1. If the library source code has changed at all since the last update,
then increment revision (`c:r:a' becomes `c:r+1:a').
2. If any interfaces have been added, removed, or changed since the last
update, increment current, and set revision to 0.
3. If any interfaces have been added since the last public release, then
increment age.
4. If any interfaces have been removed or changed since the last public
release, then set age to 0.
DLL compatibility numbering is an attempt to ensure that applications
always load a compatible pthreads-win32 DLL by using a DLL naming system
that is consistent with the version numbering system. It also allows
older and newer DLLs to coexist in the same filesystem so that older
applications can continue to be used. For pre .NET Windows systems,
this inevitably requires incompatible versions of the same DLLs to have
different names.
Pthreads-win32 has adopted the Cygwin convention of appending a single
integer number to the DLL name. The number used is based on the library
version number and is computed as 'current' - 'age'.
(See http://home.att.net/~perlspinr/libversioning.html for a nicely
detailed explanation.)
Using this method, DLL name/s will only change when the DLL's
backwards compatibility changes. Note that the addition of new
'interfaces' will not of itself change the DLL's compatibility for older
applications.
Which of the several dll versions to use?
-----------------------------------------
or,
---
What are all these pthread*.dll and pthread*.lib files?
-------------------------------------------------------
Simple, use either pthreadGCv.* if you use GCC, or pthreadVCv.* if you
use MSVC - where 'v' is the DLL versioning (compatibility) number.
Otherwise, you need to choose carefully and know WHY.
The most important choice you need to make is whether to use a
version that uses exceptions internally, or not. There are versions
of the library that use exceptions as part of the thread
cancelation and exit implementation. The default version uses
setjmp/longjmp.
There is some contension amongst POSIX threads experts as
to how POSIX threads cancelation and exit should work
with languages that use exceptions, e.g. C++ and even C
(Microsoft's Structured Exceptions).
The issue is: should cancelation of a thread in, say,
a C++ application cause object destructors and C++ exception
handlers to be invoked as the stack unwinds during thread
exit, or not?
There seems to be more opinion in favour of using the
standard C version of the library (no EH) with C++ applications
for the reason that this appears to be the assumption commercial
pthreads implementations make. Therefore, if you use an EH version
of pthreads-win32 then you may be under the illusion that
your application will be portable, when in fact it is likely to
behave differently when linked with other pthreads libraries.
Now you may be asking: then why have you kept the EH versions of
the library?
There are a couple of reasons:
- there is division amongst the experts and so the code may
be needed in the future. Yes, it's in the repository and we
can get it out anytime in the future, but it would be difficult
to find.
- pthreads-win32 is one of the few implementations, and possibly
the only freely available one, that has EH versions. It may be
useful to people who want to play with or study application
behaviour under these conditions.
Notes:
[If you use either pthreadVCE or pthreadGCE]
1. [See also the discussion in the FAQ file - Q2, Q4, and Q5]
If your application contains catch(...) blocks in your POSIX
threads then you will need to replace the "catch(...)" with the macro
"PtW32Catch", eg.
#ifdef PtW32Catch
PtW32Catch {
...
}
#else
catch(...) {
...
}
#endif
Otherwise neither pthreads cancelation nor pthread_exit() will work
reliably when using versions of the library that use C++ exceptions
for cancelation and thread exit.
This is due to what is believed to be a C++ compliance error in VC++
whereby you may not have multiple handlers for the same exception in
the same try/catch block. GNU G++ doesn't have this restriction.
Other name changes
------------------
All snapshots prior to and including snapshot 2000-08-13
used "_pthread_" as the prefix to library internal
functions, and "_PTHREAD_" to many library internal
macros. These have now been changed to "ptw32_" and "PTW32_"
respectively so as to not conflict with the ANSI standard's
reservation of identifiers beginning with "_" and "__" for
use by compiler implementations only.
If you have written any applications and you are linking
statically with the pthreads-win32 library then you may have
included a call to _pthread_processInitialize. You will
now have to change that to ptw32_processInitialize.
Cleanup code default style
--------------------------
Previously, if not defined, the cleanup style was determined automatically
from the compiler used, and one of the following was defined accordingly:
__CLEANUP_SEH MSVC only
__CLEANUP_CXX C++, including MSVC++, GNU G++
__CLEANUP_C C, including GNU GCC, not MSVC
These defines determine the style of cleanup (see pthread.h) and,
most importantly, the way that cancelation and thread exit (via
pthread_exit) is performed (see the routine ptw32_throw()).
In short, the exceptions versions of the library throw an exception
when a thread is canceled, or exits via pthread_exit(). This exception is
caught by a handler in the thread startup routine, so that the
the correct stack unwinding occurs regardless of where the thread
is when it's canceled or exits via pthread_exit().
In this snapshot, unless the build explicitly defines (e.g. via a
compiler option) __CLEANUP_SEH, __CLEANUP_CXX, or __CLEANUP_C, then
the build NOW always defaults to __CLEANUP_C style cleanup. This style
uses setjmp/longjmp in the cancelation and pthread_exit implementations,
and therefore won't do stack unwinding even when linked to applications
that have it (e.g. C++ apps). This is for consistency with most/all
commercial Unix POSIX threads implementations.
Although it was not clearly documented before, it is still necessary to
build your application using the same __CLEANUP_* define as was
used for the version of the library that you link with, so that the
correct parts of pthread.h are included. That is, the possible
defines require the following library versions:
__CLEANUP_SEH pthreadVSE.dll
__CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll
__CLEANUP_C pthreadVC.dll or pthreadGC.dll
It is recommended that you let pthread.h use it's default __CLEANUP_C
for both library and application builds. That is, don't define any of
the above, and then link with pthreadVC.lib (MSVC or MSVC++) and
libpthreadGC.a (MinGW GCC or G++). The reason is explained below, but
another reason is that the prebuilt pthreadVCE.dll is currently broken.
Versions built with MSVC++ later than version 6 may not be broken, but I
can't verify this yet.
WHY ARE WE MAKING THE DEFAULT STYLE LESS EXCEPTION-FRIENDLY?
Because no commercial Unix POSIX threads implementation allows you to
choose to have stack unwinding. Therefore, providing it in pthread-win32
as a default is dangerous. We still provide the choice but unless
you consciously choose to do otherwise, your pthreads applications will
now run or crash in similar ways irrespective of the pthreads platform
you use. Or at least this is the hope.
Building under VC++ using C++ EH, Structured EH, or just C
----------------------------------------------------------
From the source directory run nmake without any arguments to list
help information. E.g.
$ nmake
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
Run one of the following command lines:
nmake clean VCE (to build the MSVC dll with C++ exception handling)
nmake clean VSE (to build the MSVC dll with structured exception handling)
nmake clean VC (to build the MSVC dll with C cleanup code)
nmake clean VCE-inlined (to build the MSVC inlined dll with C++ exception handling)
nmake clean VSE-inlined (to build the MSVC inlined dll with structured exception handling)
nmake clean VC-inlined (to build the MSVC inlined dll with C cleanup code)
nmake clean VC-static (to build the MSVC static lib with C cleanup code)
nmake clean VCE-debug (to build the debug MSVC dll with C++ exception handling)
nmake clean VSE-debug (to build the debug MSVC dll with structured exception handling)
nmake clean VC-debug (to build the debug MSVC dll with C cleanup code)
nmake clean VCE-inlined-debug (to build the debug MSVC inlined dll with C++ exception handling)
nmake clean VSE-inlined-debug (to build the debug MSVC inlined dll with structured exception handling)
nmake clean VC-inlined-debug (to build the debug MSVC inlined dll with C cleanup code)
nmake clean VC-static-debug (to build the debug MSVC static lib with C cleanup code)
The pre-built dlls are normally built using the *-inlined targets.
You can run the testsuite by changing to the "tests" directory and
running nmake. E.g.:
$ cd tests
$ nmake
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
Run one of the following command lines:
nmake clean VC (to test using VC dll with VC (no EH) applications)
nmake clean VCX (to test using VC dll with VC++ (EH) applications)
nmake clean VCE (to test using the VCE dll with VC++ EH applications)
nmake clean VSE (to test using VSE dll with VC (SEH) applications)
nmake clean VC-bench (to benchtest using VC dll with C bench app)
nmake clean VCX-bench (to benchtest using VC dll with C++ bench app)
nmake clean VCE-bench (to benchtest using VCE dll with C++ bench app)
nmake clean VSE-bench (to benchtest using VSE dll with SEH bench app)
nmake clean VC-static (to test using VC static lib with VC (no EH) applications)
Building under Mingw32
----------------------
The dll can be built easily with recent versions of Mingw32.
(The distributed versions are built using Mingw32 and MsysDTK
from www.mingw32.org.)
From the source directory, run make for help information. E.g.:
$ make
Run one of the following command lines:
make clean GC (to build the GNU C dll with C cleanup code)
make clean GCE (to build the GNU C dll with C++ exception handling)
make clean GC-inlined (to build the GNU C inlined dll with C cleanup code)
make clean GCE-inlined (to build the GNU C inlined dll with C++ exception handling)
make clean GC-static (to build the GNU C inlined static lib with C cleanup code)
make clean GC-debug (to build the GNU C debug dll with C cleanup code)
make clean GCE-debug (to build the GNU C debug dll with C++ exception handling)
make clean GC-inlined-debug (to build the GNU C inlined debug dll with C cleanup code)
make clean GCE-inlined-debug (to build the GNU C inlined debug dll with C++ exception handling)
make clean GC-static-debug (to build the GNU C inlined static debug lib with C cleanup code)
The pre-built dlls are normally built using the *-inlined targets.
You can run the testsuite by changing to the "tests" directory and
running make for help information. E.g.:
$ cd tests
$ make
Run one of the following command lines:
make clean GC (to test using GC dll with C (no EH) applications)
make clean GCX (to test using GC dll with C++ (EH) applications)
make clean GCE (to test using GCE dll with C++ (EH) applications)
make clean GC-bench (to benchtest using GNU C dll with C cleanup code)
make clean GCE-bench (to benchtest using GNU C dll with C++ exception handling)
make clean GC-static (to test using GC static lib with C (no EH) applications)
Building under Linux using the Mingw32 cross development tools
--------------------------------------------------------------
You can build the library without leaving Linux by using the Mingw32 cross
development toolchain. See http://www.libsdl.org/extras/win32/cross/ for
tools and info. The GNUmakefile contains some support for this, for example:
make CROSS=i386-mingw32msvc- clean GC-inlined
will build pthreadGCn.dll and libpthreadGCn.a (n=version#), provided your
cross-tools/bin directory is in your PATH (or use the cross-make.sh script
at the URL above).
Building the library as a statically linkable library
-----------------------------------------------------
General: PTW32_STATIC_LIB must be defined for both the library build and the
application build. The makefiles supplied and used by the following 'make'
command lines will define this for you.
MSVC (creates pthreadVCn.lib as a static link lib):
nmake clean VC-static
MinGW32 (creates libpthreadGCn.a as a static link lib):
make clean GC-static
Define PTW32_STATIC_LIB when building your application. Also, your
application must call a two non-portable routines to initialise the
some state on startup and cleanup before exit. One other routine needs
to be called to cleanup after any Win32 threads have called POSIX API
routines. See README.NONPORTABLE or the html reference manual pages for
details on these routines:
BOOL pthread_win32_process_attach_np (void);
BOOL pthread_win32_process_detach_np (void);
BOOL pthread_win32_thread_attach_np (void); // Currently a no-op
BOOL pthread_win32_thread_detach_np (void);
The tests makefiles have the same targets but only check that the
static library is statically linkable. They don't run the full
testsuite. To run the full testsuite, build the dlls and run the
dll test targets.
Building the library under Cygwin
---------------------------------
Cygwin is implementing it's own POSIX threads routines and these
will be the ones to use if you develop using Cygwin.
Ready to run binaries
---------------------
For convenience, the following ready-to-run files can be downloaded
from the FTP site (see under "Availability" below):
pthread.h
semaphore.h
sched.h
pthreadVC.dll - built with MSVC compiler using C setjmp/longjmp
pthreadVC.lib
pthreadVCE.dll - built with MSVC++ compiler using C++ EH
pthreadVCE.lib
pthreadVSE.dll - built with MSVC compiler using SEH
pthreadVSE.lib
pthreadGC.dll - built with Mingw32 GCC
libpthreadGC.a - derived from pthreadGC.dll
pthreadGCE.dll - built with Mingw32 G++
libpthreadGCE.a - derived from pthreadGCE.dll
As of August 2003 pthreads-win32 pthreadG* versions are built and tested
using the MinGW + MsysDTK environment current as of that date or later.
The following file MAY be needed for older MinGW environments.
gcc.dll - needed to build and run applications that use
pthreadGCE.dll.
Building applications with GNU compilers
----------------------------------------
If you're using pthreadGC.dll:
With the three header files, pthreadGC.dll and libpthreadGC.a in the
same directory as your application myapp.c, you could compile, link
and run myapp.c under Mingw32 as follows:
gcc -o myapp.exe myapp.c -I. -L. -lpthreadGC
myapp
Or put pthreadGC.dll in an appropriate directory in your PATH,
put libpthreadGC.a in your system lib directory, and
put the three header files in your system include directory,
then use:
gcc -o myapp.exe myapp.c -lpthreadGC
myapp
If you're using pthreadGCE.dll:
With the three header files, pthreadGCE.dll, gcc.dll and libpthreadGCE.a
in the same directory as your application myapp.c, you could compile,
link and run myapp.c under Mingw32 as follows:
gcc -x c++ -o myapp.exe myapp.c -I. -L. -lpthreadGCE
myapp
Or put pthreadGCE.dll and gcc.dll in an appropriate directory in
your PATH, put libpthreadGCE.a in your system lib directory, and
put the three header files in your system include directory,
then use:
gcc -x c++ -o myapp.exe myapp.c -lpthreadGCE
myapp
Availability
------------
The complete source code in either unbundled, self-extracting
Zip file, or tar/gzipped format can be found at:
ftp://sources.redhat.com/pub/pthreads-win32
The pre-built DLL, export libraries and matching pthread.h can
be found at:
ftp://sources.redhat.com/pub/pthreads-win32/dll-latest
Home page:
http://sources.redhat.com/pthreads-win32/
Mailing list
------------
There is a mailing list for discussing pthreads on Win32.
To join, send email to:
pthreads-win32-subscribe@sources.redhat.com
Unsubscribe by sending mail to:
pthreads-win32-unsubscribe@sources.redhat.com
Acknowledgements
----------------
See the ANNOUNCE file for acknowledgements.
See the 'CONTRIBUTORS' file for the list of contributors.
As much as possible, the ChangeLog file attributes
contributions and patches that have been incorporated
in the library to the individuals responsible.
Finally, thanks to all those who work on and contribute to the
POSIX and Single Unix Specification standards. The maturity of an
industry can be measured by it's open standards.
----
Ross Johnson
<rpj@callisto.canberra.edu.au>
-57
View File
@@ -1,57 +0,0 @@
In ptw32_InterlockedCompareExchange.c, I've added a section for
Borland's compiler; it's identical to that for the MS compiler except
that it uses /* ... */ comments instead of ; comments.
[RPJ: need to define HAVE_TASM32 in config.h to use the above.]
The other file is a makefile suitable for use with Borland's compiler
(run "make -fBmakefile" in the directory). It builds a single version
of the library, pthreadBC.dll and the corresponding pthreadBC.lib
import library, which is comparable to the pthreadVC version; I can't
personally see any demand for the versions that include structured or
C++ exception cancellation handling so I haven't attempted to build
those versions of the library. (I imagine a static version might be
of use to some, but we can't legally use that on my commercial
projects so I can't try that out, unfortunately.)
[RPJ: Added tests\Bmakefile as well.]
Borland C++ doesn't define the ENOSYS constant used by pthreads-win32;
rather than make more extensive patches to the pthreads-win32 source I
have a mostly-arbitrary constant for it in the makefile. However this
doesn't make it visible to the application using the library, so if
anyone actually wants to use this constant in their apps (why?)
someone might like to make a seperate NEED_BCC_something define to add
this stuff.
The makefile also #defines EDEADLK as EDEADLOCK, _timeb as timeb, and
_ftime as ftime, to deal with the minor differences between the two
RTLs' naming conventions, and sets the compiler flags as required to
get a normal compile of the library.
[RPJ: Moved errno values and _timeb etc to pthread.h, so apps will also
use them.]
(While I'm on the subject, the reason Borland users should recompile
the library, rather than using the impdef/implib technique suggested
previously on the mailing list, is that a) the errno constants are
different, so the results returned by the pthread_* functions can be
meaningless, and b) the errno variable/pseudo-variable itself is
different in the MS & BCC runtimes, so you can't access the
pthreadVC's errno from a Borland C++-compiled host application
correctly - I imagine there are other potential problems from the RTL
mismatch too.)
[RPJ: Make sure you use the same RTL in both dll and application builds.
The dll and tests Bmakefiles use cw32mti.lib. Having some trouble with
memory read exceptions running the test suite using BCC55.]
Best regards,
Will
--
Will Bryant
Systems Architect, eCOSM Limited
Cell +64 21 655 443, office +64 3 365 4176
http://www.ecosm.com/
-3036
View File
File diff suppressed because it is too large Load Diff
-783
View File
@@ -1,783 +0,0 @@
This file documents non-portable functions and other issues.
Non-portable functions included in pthreads-win32
-------------------------------------------------
BOOL
pthread_win32_test_features_np(int mask)
This routine allows an application to check which
run-time auto-detected features are available within
the library.
The possible features are:
PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE
Return TRUE if the native version of
InterlockedCompareExchange() is being used.
This feature is not meaningful in recent
library versions as MSVC builds only support
system implemented ICE. Note that all Mingw
builds use inlined asm versions of all the
Interlocked routines.
PTW32_ALERTABLE_ASYNC_CANCEL
Return TRUE is the QueueUserAPCEx package
QUSEREX.DLL is available and the AlertDrv.sys
driver is loaded into Windows, providing
alertable (pre-emptive) asyncronous threads
cancelation. If this feature returns FALSE
then the default async cancel scheme is in
use, which cannot cancel blocked threads.
Features may be Or'ed into the mask parameter, in which case
the routine returns TRUE if any of the Or'ed features would
return TRUE. At this stage it doesn't make sense to Or features
but it may some day.
void *
pthread_timechange_handler_np(void *)
To improve tolerance against operator or time service
initiated system clock changes.
This routine can be called by an application when it
receives a WM_TIMECHANGE message from the system. At
present it broadcasts all condition variables so that
waiting threads can wake up and re-evaluate their
conditions and restart their timed waits if required.
It has the same return type and argument type as a
thread routine so that it may be called directly
through pthread_create(), i.e. as a separate thread.
Parameters
Although a parameter must be supplied, it is ignored.
The value NULL can be used.
Return values
It can return an error EAGAIN to indicate that not
all condition variables were broadcast for some reason.
Otherwise, 0 is returned.
If run as a thread, the return value is returned
through pthread_join().
The return value should be cast to an integer.
HANDLE
pthread_getw32threadhandle_np(pthread_t thread);
Returns the win32 thread handle that the POSIX
thread "thread" is running as.
Applications can use the win32 handle to set
win32 specific attributes of the thread.
DWORD
pthread_getw32threadid_np (pthread_t thread)
Returns the Windows native thread ID that the POSIX
thread "thread" is running as.
Only valid when the library is built where
! (defined(__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__)
and otherwise returns 0.
int
pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind)
int
pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind)
These two routines are included for Linux compatibility
and are direct equivalents to the standard routines
pthread_mutexattr_settype
pthread_mutexattr_gettype
pthread_mutexattr_setkind_np accepts the following
mutex kinds:
PTHREAD_MUTEX_FAST_NP
PTHREAD_MUTEX_ERRORCHECK_NP
PTHREAD_MUTEX_RECURSIVE_NP
These are really just equivalent to (respectively):
PTHREAD_MUTEX_NORMAL
PTHREAD_MUTEX_ERRORCHECK
PTHREAD_MUTEX_RECURSIVE
int
pthread_delay_np (const struct timespec *interval);
This routine causes a thread to delay execution for a specific period of time.
This period ends at the current time plus the specified interval. The routine
will not return before the end of the period is reached, but may return an
arbitrary amount of time after the period has gone by. This can be due to
system load, thread priorities, and system timer granularity.
Specifying an interval of zero (0) seconds and zero (0) nanoseconds is
allowed and can be used to force the thread to give up the processor or to
deliver a pending cancelation request.
This routine is a cancelation point.
The timespec structure contains the following two fields:
tv_sec is an integer number of seconds.
tv_nsec is an integer number of nanoseconds.
Return Values
If an error condition occurs, this routine returns an integer value
indicating the type of error. Possible return values are as follows:
0 Successful completion.
[EINVAL] The value specified by interval is invalid.
int
pthread_num_processors_np (void)
This routine (found on HPUX systems) returns the number of processors
in the system. This implementation actually returns the number of
processors available to the process, which can be a lower number
than the system's number, depending on the process's affinity mask.
BOOL
pthread_win32_process_attach_np (void);
BOOL
pthread_win32_process_detach_np (void);
BOOL
pthread_win32_thread_attach_np (void);
BOOL
pthread_win32_thread_detach_np (void);
These functions contain the code normally run via dllMain
when the library is used as a dll but which need to be
called explicitly by an application when the library
is statically linked. As of version 2.9.0 of the library, static
builds using either MSC or GCC will call pthread_win32_process_*
automatically at application startup and exit respectively.
Otherwise, you will need to call pthread_win32_process_attach_np()
before you can call any pthread routines when statically linking.
You should call pthread_win32_process_detach_np() before
exiting your application to clean up.
pthread_win32_thread_attach_np() is currently a no-op, but
pthread_win32_thread_detach_np() is needed to clean up
the implicit pthread handle that is allocated to a Win32 thread if
it calls any pthreads routines. Call this routine when the
Win32 thread exits.
Threads created through pthread_create() do not need to call
pthread_win32_thread_detach_np().
These functions invariably return TRUE except for
pthread_win32_process_attach_np() which will return FALSE
if pthreads-win32 initialisation fails.
int
pthreadCancelableWait (HANDLE waitHandle);
int
pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout);
These two functions provide hooks into the pthread_cancel
mechanism that will allow you to wait on a Windows handle
and make it a cancellation point. Both functions block
until either the given w32 handle is signaled, or
pthread_cancel has been called. It is implemented using
WaitForMultipleObjects on 'waitHandle' and a manually
reset w32 event used to implement pthread_cancel.
Non-portable issues
-------------------
Thread priority
POSIX defines a single contiguous range of numbers that determine a
thread's priority. Win32 defines priority classes and priority
levels relative to these classes. Classes are simply priority base
levels that the defined priority levels are relative to such that,
changing a process's priority class will change the priority of all
of it's threads, while the threads retain the same relativity to each
other.
A Win32 system defines a single contiguous monotonic range of values
that define system priority levels, just like POSIX. However, Win32
restricts individual threads to a subset of this range on a
per-process basis.
The following table shows the base priority levels for combinations
of priority class and priority value in Win32.
Process Priority Class Thread Priority Level
-----------------------------------------------------------------
1 IDLE_PRIORITY_CLASS THREAD_PRIORITY_IDLE
1 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE
1 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE
1 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE
1 HIGH_PRIORITY_CLASS THREAD_PRIORITY_IDLE
2 IDLE_PRIORITY_CLASS THREAD_PRIORITY_LOWEST
3 IDLE_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL
4 IDLE_PRIORITY_CLASS THREAD_PRIORITY_NORMAL
4 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST
5 IDLE_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL
5 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL
5 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST
6 IDLE_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST
6 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL
6 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL
7 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL
7 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL
7 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST
8 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST
8 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL
8 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL
8 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST
9 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST
9 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL
9 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL
10 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL
10 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL
11 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST
11 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL
11 HIGH_PRIORITY_CLASS THREAD_PRIORITY_LOWEST
12 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST
12 HIGH_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL
13 HIGH_PRIORITY_CLASS THREAD_PRIORITY_NORMAL
14 HIGH_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL
15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST
15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL
15 IDLE_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL
15 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL
15 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL
15 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL
16 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_IDLE
17 REALTIME_PRIORITY_CLASS -7
18 REALTIME_PRIORITY_CLASS -6
19 REALTIME_PRIORITY_CLASS -5
20 REALTIME_PRIORITY_CLASS -4
21 REALTIME_PRIORITY_CLASS -3
22 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_LOWEST
23 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL
24 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_NORMAL
25 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL
26 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST
27 REALTIME_PRIORITY_CLASS 3
28 REALTIME_PRIORITY_CLASS 4
29 REALTIME_PRIORITY_CLASS 5
30 REALTIME_PRIORITY_CLASS 6
31 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL
Windows NT: Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported.
As you can see, the real priority levels available to any individual
Win32 thread are non-contiguous.
An application using pthreads-win32 should not make assumptions about
the numbers used to represent thread priority levels, except that they
are monotonic between the values returned by sched_get_priority_min()
and sched_get_priority_max(). E.g. Windows 95, 98, NT, 2000, XP make
available a non-contiguous range of numbers between -15 and 15, while
at least one version of WinCE (3.0) defines the minimum priority
(THREAD_PRIORITY_LOWEST) as 5, and the maximum priority
(THREAD_PRIORITY_HIGHEST) as 1.
Internally, pthreads-win32 maps any priority levels between
THREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST,
or between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to
THREAD_PRIORITY_HIGHEST. Currently, this also applies to
REALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6
are supported.
If it wishes, a Win32 application using pthreads-win32 can use the Win32
defined priority macros THREAD_PRIORITY_IDLE through
THREAD_PRIORITY_TIME_CRITICAL.
The opacity of the pthread_t datatype
-------------------------------------
and possible solutions for portable null/compare/hash, etc
----------------------------------------------------------
Because pthread_t is an opague datatype an implementation is permitted to define
pthread_t in any way it wishes. That includes defining some bits, if it is
scalar, or members, if it is an aggregate, to store information that may be
extra to the unique identifying value of the ID. As a result, pthread_t values
may not be directly comparable.
If you want your code to be portable you must adhere to the following contraints:
1) Don't assume it is a scalar data type, e.g. an integer or pointer value. There
are several other implementations where pthread_t is also a struct. See our FAQ
Question 11 for our reasons for defining pthread_t as a struct.
2) You must not compare them using relational or equality operators. You must use
the API function pthread_equal() to test for equality.
3) Never attempt to reference individual members.
The problem
Certain applications would like to be able to access only the 'pure' pthread_t
id values, primarily to use as keys into data structures to manage threads or
thread-related data, but this is not possible in a maximally portable and
standards compliant way for current POSIX threads implementations.
For implementations that define pthread_t as a scalar, programmers often employ
direct relational and equality operators on pthread_t. This code will break when
ported to an implementation that defines pthread_t as an aggregate type.
For implementations that define pthread_t as an aggregate, e.g. a struct,
programmers can use memcmp etc., but then face the prospect that the struct may
include alignment padding bytes or bits as well as extra implementation-specific
members that are not part of the unique identifying value.
[While this is not currently the case for pthreads-win32, opacity also
means that an implementation is free to change the definition, which should
generally only require that applications be recompiled and relinked, not
rewritten.]
Doesn't the compiler take care of padding?
The C89 and later standards only effectively guarrantee element-by-element
equivalence following an assignment or pass by value of a struct or union,
therefore undefined areas of any two otherwise equivalent pthread_t instances
can still compare differently, e.g. attempting to compare two such pthread_t
variables byte-by-byte, e.g. memcmp(&t1, &t2, sizeof(pthread_t) may give an
incorrect result. In practice I'm reasonably confident that compilers routinely
also copy the padding bytes, mainly because assignment of unions would be far
too complicated otherwise. But it just isn't guarranteed by the standard.
Illustration:
We have two thread IDs t1 and t2
pthread_t t1, t2;
In an application we create the threads and intend to store the thread IDs in an
ordered data structure (linked list, tree, etc) so we need to be able to compare
them in order to insert them initially and also to traverse.
Suppose pthread_t contains undefined padding bits and our compiler copies our
pthread_t [struct] element-by-element, then for the assignment:
pthread_t temp = t1;
temp and t1 will be equivalent and correct but a byte-for-byte comparison such as
memcmp(&temp, &t1, sizeof(pthread_t)) == 0 may not return true as we expect because
the undefined bits may not have the same values in the two variable instances.
Similarly if passing by value under the same conditions.
If, on the other hand, the undefined bits are at least constant through every
assignment and pass-by-value then the byte-for-byte comparison
memcmp(&temp, &t1, sizeof(pthread_t)) == 0 will always return the expected result.
How can we force the behaviour we need?
Solutions
Adding new functions to the standard API or as non-portable extentions is
the only reliable and portable way to provide the necessary operations.
Remember also that POSIX is not tied to the C language. The most common
functions that have been suggested are:
pthread_null()
pthread_compare()
pthread_hash()
A single more general purpose function could also be defined as a
basis for at least the last two of the above functions.
First we need to list the freedoms and constraints with restpect
to pthread_t so that we can be sure our solution is compatible with the
standard.
What is known or may be deduced from the standard:
1) pthread_t must be able to be passed by value, so it must be a single object.
2) from (1) it must be copyable so cannot embed thread-state information, locks
or other volatile objects required to manage the thread it associates with.
3) pthread_t may carry additional information, e.g. for debugging or to manage
itself.
4) there is an implicit requirement that the size of pthread_t is determinable
at compile-time and size-invariant, because it must be able to copy the object
(i.e. through assignment and pass-by-value). Such copies must be genuine
duplicates, not merely a copy of a pointer to a common instance such as
would be the case if pthread_t were defined as an array.
Suppose we define the following function:
/* This function shall return it's argument */
pthread_t* pthread_normalize(pthread_t* thread);
For scalar or aggregate pthread_t types this function would simply zero any bits
within the pthread_t that don't uniquely identify the thread, including padding,
such that client code can return consistent results from operations done on the
result. If the additional bits are a pointer to an associate structure then
this function would ensure that the memory used to store that associate
structure does not leak. After normalization the following compare would be
valid and repeatable:
memcmp(pthread_normalize(&t1),pthread_normalize(&t2),sizeof(pthread_t))
Note 1: such comparisons are intended merely to order and sort pthread_t values
and allow them to index various data structures. They are not intended to reveal
anything about the relationships between threads, like startup order.
Note 2: the normalized pthread_t is also a valid pthread_t that uniquely
identifies the same thread.
Advantages:
1) In most existing implementations this function would reduce to a no-op that
emits no additional instructions, i.e after in-lining or optimisation, or if
defined as a macro:
#define pthread_normalise(tptr) (tptr)
2) This single function allows an application to portably derive
application-level versions of any of the other required functions.
3) It is a generic function that could enable unanticipated uses.
Disadvantages:
1) Less efficient than dedicated compare or hash functions for implementations
that include significant extra non-id elements in pthread_t.
2) Still need to be concerned about padding if copying normalized pthread_t.
See the later section on defining pthread_t to neutralise padding issues.
Generally a pthread_t may need to be normalized every time it is used,
which could have a significant impact. However, this is a design decision
for the implementor in a competitive environment. An implementation is free
to define a pthread_t in a way that minimises or eliminates padding or
renders this function a no-op.
Hazards:
1) Pass-by-reference directly modifies 'thread' so the application must
synchronise access or ensure that the pointer refers to a copy. The alternative
of pass-by-value/return-by-value was considered but then this requires two copy
operations, disadvantaging implementations where this function is not a no-op
in terms of speed of execution. This function is intended to be used in high
frequency situations and needs to be efficient, or at least not unnecessarily
inefficient. The alternative also sits awkwardly with functions like memcmp.
2) [Non-compliant] code that uses relational and equality operators on
arithmetic or pointer style pthread_t types would need to be rewritten, but it
should be rewritten anyway.
C implementation of null/compare/hash functions using pthread_normalize():
/* In pthread.h */
pthread_t* pthread_normalize(pthread_t* thread);
/* In user code */
/* User-level bitclear function - clear bits in loc corresponding to mask */
void* bitclear (void* loc, void* mask, size_t count);
typedef unsigned int hash_t;
/* User-level hash function */
hash_t hash(void* ptr, size_t count);
/*
* User-level pthr_null function - modifies the origin thread handle.
* The concept of a null pthread_t is highly implementation dependent
* and this design may be far from the mark. For example, in an
* implementation "null" may mean setting a special value inside one
* element of pthread_t to mean "INVALID". However, if that value was zero and
* formed part of the id component then we may get away with this design.
*/
pthread_t* pthr_null(pthread_t* tp)
{
/*
* This should have the same effect as memset(tp, 0, sizeof(pthread_t))
* We're just showing that we can do it.
*/
void* p = (void*) pthread_normalize(tp);
return (pthread_t*) bitclear(p, p, sizeof(pthread_t));
}
/*
* Safe user-level pthr_compare function - modifies temporary thread handle copies
*/
int pthr_compare_safe(pthread_t thread1, pthread_t thread2)
{
return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t));
}
/*
* Fast user-level pthr_compare function - modifies origin thread handles
*/
int pthr_compare_fast(pthread_t* thread1, pthread_t* thread2)
{
return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t));
}
/*
* Safe user-level pthr_hash function - modifies temporary thread handle copy
*/
hash_t pthr_hash_safe(pthread_t thread)
{
return hash((void *) pthread_normalize(&thread), sizeof(pthread_t));
}
/*
* Fast user-level pthr_hash function - modifies origin thread handle
*/
hash_t pthr_hash_fast(pthread_t thread)
{
return hash((void *) pthread_normalize(&thread), sizeof(pthread_t));
}
/* User-level bitclear function - modifies the origin array */
void* bitclear(void* loc, void* mask, size_t count)
{
int i;
for (i=0; i < count; i++) {
(unsigned char) *loc++ &= ~((unsigned char) *mask++);
}
}
/* Donald Knuth hash */
hash_t hash(void* str, size_t count)
{
hash_t hash = (hash_t) count;
unsigned int i = 0;
for(i = 0; i < len; str++, i++)
{
hash = ((hash << 5) ^ (hash >> 27)) ^ (*str);
}
return hash;
}
/* Example of advantage point (3) - split a thread handle into its id and non-id values */
pthread_t id = thread, non-id = thread;
bitclear((void*) &non-id, (void*) pthread_normalize(&id), sizeof(pthread_t));
A pthread_t type change proposal to neutralise the effects of padding
Even if pthread_nornalize() is available, padding is still a problem because
the standard only garrantees element-by-element equivalence through
copy operations (assignment and pass-by-value). So padding bit values can
still change randomly after calls to pthread_normalize().
[I suspect that most compilers take the easy path and always byte-copy anyway,
partly because it becomes too complex to do (e.g. unions that contain sub-aggregates)
but also because programmers can easily design their aggregates to minimise and
often eliminate padding].
How can we eliminate the problem of padding bytes in structs? Could
defining pthread_t as a union rather than a struct provide a solution?
In fact, the Linux pthread.h defines most of it's pthread_*_t objects (but not
pthread_t itself) as unions, possibly for this and/or other reasons. We'll
borrow some element naming from there but the ideas themselves are well known
- the __align element used to force alignment of the union comes from K&R's
storage allocator example.
/* Essentially our current pthread_t renamed */
typedef struct {
struct thread_state_t * __p;
long __x; /* sequence counter */
} thread_id_t;
Ensuring that the last element in the above struct is a long ensures that the
overall struct size is a multiple of sizeof(long), so there should be no trailing
padding in this struct or the union we define below.
(Later we'll see that we can handle internal but not trailing padding.)
/* New pthread_t */
typedef union {
char __size[sizeof(thread_id_t)]; /* array as the first element */
thread_id_t __tid;
long __align; /* Ensure that the union starts on long boundary */
} pthread_t;
This guarrantees that, during an assignment or pass-by-value, the compiler copies
every byte in our thread_id_t because the compiler guarrantees that the __size
array, which we have ensured is the equal-largest element in the union, retains
equivalence.
This means that pthread_t values stored, assigned and passed by value will at least
carry the value of any undefined padding bytes along and therefore ensure that
those values remain consistent. Our comparisons will return consistent results and
our hashes of [zero initialised] pthread_t values will also return consistent
results.
We have also removed the need for a pthread_null() function; we can initialise
at declaration time or easily create our own const pthread_t to use in assignments
later:
const pthread_t null_tid = {0}; /* braces are required */
pthread_t t;
...
t = null_tid;
Note that we don't have to explicitly make use of the __size array at all. It's
there just to force the compiler behaviour we want.
Partial solutions without a pthread_normalize function
An application-level pthread_null and pthread_compare proposal
(and pthread_hash proposal by extention)
In order to deal with the problem of scalar/aggregate pthread_t type disparity in
portable code I suggest using an old-fashioned union, e.g.:
Contraints:
- there is no padding, or padding values are preserved through assignment and
pass-by-value (see above);
- there are no extra non-id values in the pthread_t.
Example 1: A null initialiser for pthread_t variables...
typedef union {
unsigned char b[sizeof(pthread_t)];
pthread_t t;
} init_t;
const init_t initial = {0};
pthread_t tid = initial.t; /* init tid to all zeroes */
Example 2: A comparison function for pthread_t values
typedef union {
unsigned char b[sizeof(pthread_t)];
pthread_t t;
} pthcmp_t;
int pthcmp(pthread_t left, pthread_t right)
{
/*
* Compare two pthread handles in a way that imposes a repeatable but arbitrary
* ordering on them.
* I.e. given the same set of pthread_t handles the ordering should be the same
* each time but the order has no particular meaning other than that. E.g.
* the ordering does not imply the thread start sequence, or any other
* relationship between threads.
*
* Return values are:
* 1 : left is greater than right
* 0 : left is equal to right
* -1 : left is less than right
*/
int i;
pthcmp_t L, R;
L.t = left;
R.t = right;
for (i = 0; i < sizeof(pthread_t); i++)
{
if (L.b[i] > R.b[i])
return 1;
else if (L.b[i] < R.b[i])
return -1;
}
return 0;
}
It has been pointed out that the C99 standard allows for the possibility that
integer types also may include padding bits, which could invalidate the above
method. This addition to C99 was specifically included after it was pointed
out that there was one, presumably not particularly well known, architecture
that included a padding bit in it's 32 bit integer type. See section 6.2.6.2
of both the standard and the rationale, specifically the paragraph starting at
line 16 on page 43 of the rationale.
An aside
Certain compilers, e.g. gcc and one of the IBM compilers, include a feature
extention: provided the union contains a member of the same type as the
object then the object may be cast to the union itself.
We could use this feature to speed up the pthrcmp() function from example 2
above by casting rather than assigning the pthread_t arguments to the union, e.g.:
int pthcmp(pthread_t left, pthread_t right)
{
/*
* Compare two pthread handles in a way that imposes a repeatable but arbitrary
* ordering on them.
* I.e. given the same set of pthread_t handles the ordering should be the same
* each time but the order has no particular meaning other than that. E.g.
* the ordering does not imply the thread start sequence, or any other
* relationship between threads.
*
* Return values are:
* 1 : left is greater than right
* 0 : left is equal to right
* -1 : left is less than right
*/
int i;
for (i = 0; i < sizeof(pthread_t); i++)
{
if (((pthcmp_t)left).b[i] > ((pthcmp_t)right).b[i])
return 1;
else if (((pthcmp_t)left).b[i] < ((pthcmp_t)right).b[i])
return -1;
}
return 0;
}
Result thus far
We can't remove undefined bits if they are there in pthread_t already, but we have
attempted to render them inert for comparison and hashing functions by making them
consistent through assignment, copy and pass-by-value.
Note: Hashing pthread_t values requires that all pthread_t variables be initialised
to the same value (usually all zeros) before being assigned a proper thread ID, i.e.
to ensure that any padding bits are zero, or at least the same value for all
pthread_t. Since all pthread_t values are generated by the library in the first
instance this need not be an application-level operation.
Conclusion
I've attempted to resolve the multiple issues of type opacity and the possible
presence of undefined bits and bytes in pthread_t values, which prevent
applications from comparing or hashing pthread handles.
Two complimentary partial solutions have been proposed, one an application-level
scheme to handle both scalar and aggregate pthread_t types equally, plus a
definition of pthread_t itself that neutralises padding bits and bytes by
coercing semantics out of the compiler to eliminate variations in the values of
padding bits.
I have not provided any solution to the problem of handling extra values embedded
in pthread_t, e.g. debugging or trap information that an implementation is entitled
to include. Therefore none of this replaces the portability and flexibility of API
functions but what functions are needed? The threads standard is unlikely to
include that can be implemented by a combination of existing features and more
generic functions (several references in the threads rationale suggest this.
Therefore I propose that the following function could replace the several functions
that have been suggested in conversations:
pthread_t * pthread_normalize(pthread_t * handle);
For most existing pthreads implementations this function, or macro, would reduce to
a no-op with zero call overhead.
-62
View File
@@ -1,62 +0,0 @@
Watcom compiler notes
=====================
Status
------
Not yet usable. Although the library builds under Watcom it
substantially fails the test suite.
There is a working Wmakefile for wmake for the library build.
invoke as any of:
wmake -f Wmakefile clean WC
wmake -f Wmakefile clean WC-inlined
wmake -f Wmakefile clean WCE
wmake -f Wmakefile clean WCE-inlined
These build pthreadWC.dll and pthreadWCE.dll.
There is a working Wmakefile for wmake for the test suite.
invoke as any of:
wmake -f Wmakefile clean WC
wmake -f Wmakefile clean WCX
wmake -f Wmakefile clean WCE
wmake -f Wmakefile clean WC-bench
wmake -f Wmakefile clean WCX-bench
wmake -f Wmakefile clean WCE-bench
Current known problems
----------------------
Library build:
The Watcom compiler uses a different default call convention to MS C or GNU C and so
applications are not compatible with pthreadVC.dll etc using pre 2003-10-14 versions
of pthread.h, sched.h, or semaphore.h. The cdecl attribute can be used on exposed
function prototypes to force compatibility with MS C built DLLs.
However, there appear to be other incompatibilities. Errno.h, for example, defines
different values for the standard C and POSIX errors to those defined by the MS C
errno.h. It may be that references to Watcom's threads compatible 'errno' do set
and return translated numbers consistently, but I have not verified this.
Watcom defines errno as a dereferenced pointer returned by the function
_get_errno_ptr(). This is similar to both the MS and GNU C environments for
multithreaded use. However, the Watcom version appears to have a number of problems:
- different threads return the same pointer value. Compare with the MS and GNU C
versions which correctly return different values (since each thread must maintain
a thread specific errno value).
- an errno value set within the DLL appears as zero in the application even though
both share the same thread.
Therefore applications built using the Watcom compiler may need to use
a Watcom built version of the library (pthreadWC.dll). If this is the case, then
the cdecl function attribute should not be required.
Application builds:
The test suite fails with the Watcom compiler.
Test semaphore1.c fails for pthreadWC.dll because errno returns 0 instead of EAGAIN.
-6
View File
@@ -1,6 +0,0 @@
WinCE port
----------
(See the file WinCE-PORT for a detailed explanation.)
Make sure you define "WINCE" amongst your compiler flags (eg. -DWINCE).
The config.h file will define all the necessary defines for you.
-7
View File
@@ -1,7 +0,0 @@
Things that aren't done yet
---------------------------
1. Implement PTHREAD_PROCESS_SHARED for semaphores, mutexes,
condition variables, read/write locks, barriers.
-222
View File
@@ -1,222 +0,0 @@
NOTE: The comments in this file relate to the original WinCE port
done by Tristan Savatier. The semaphore routines have been
completely rewritten since (2005-04-25), having been progressively
broken more and more by changes to the library. All of the semaphore
routines implemented for W9x/WNT/2000 and up should now also work for
WinCE. Also, pthread_mutex_timedlock should now work.
Additional WinCE updates have been applied since this as well. Check the
ChangeLog file and search for WINCE for example. (2007-01-07)
[RPJ]
----
Some interesting news:
I have been able to port pthread-win32 to Windows-CE,
which uses a subset of the WIN32 API.
Since we intend to keep using pthread-win32 for our
Commercial WinCE developments, I would be very interested
if WinCE support could be added to the main source tree
of pthread-win32. Also, I would like to be credited
for this port :-)
Now, here is the story...
The port was performed and tested on a Casio "Cassiopeia"
PalmSize PC, which runs a MIP processor. The OS in the
Casio is WinCE version 2.11, but I used VC++ 6.0 with
the WinCE SDK for version 2.01.
I used pthread-win32 to port a heavily multithreaded
commercial application (real-time MPEG video player)
from Linux to WinCE. I consider the changes that
I have done to be quite well tested.
Overall the modifications that we had to do are minor.
The WinCE port were based on pthread-win32-snap-1999-05-30,
but I am certain that they can be integrated very easiely
to more recent versions of the source.
I have attached the modified source code:
pthread-win32-snap-1999-05-30-WinCE.
All the changes do not affect the code compiled on non-WinCE
environment, provided that the macros used for WinCE compilation
are not used, of course!
Overall description of the WinCE port:
-------------------------------------
Most of the changes had to be made in areas where
pthread-win32 was relying on some standard-C librairies
(e.g. _ftime, calloc, errno), which are not available
on WinCE. We have changed the code to use native Win32
API instead (or in some cases we made wrappers).
The Win32 Semaphores are not available,
so we had to re-implement Semaphores using mutexes
and events.
Limitations / known problems of the WinCE port:
----------------------------------------------
Not all the semaphore routines have been ported
(semaphores are defined by Posix but are not part
pf pthread). I have just done enough to make
pthread routines (that rely internally on semaphores)
work, like signal conditions.
I noticed that the Win32 threads work slightly
differently on WinCE. This may have some impact
on some tricky parts of pthread-win32, but I have
not really investigated. For example, on WinCE,
the process is killed if the main thread falls off
the bottom (or calls pthread_exit), regardless
of the existence of any other detached thread.
Microsoft manual indicates that this behavior is
deffirent from that of Windows Threads for other
Win32 platforms.
Detailed descriptions of the changes and rationals:
------------------------------------
- use a new macro NEED_ERRNO.
If defined, the code in errno.c that defines a reentrant errno
is compiled, regardless of _MT and _REENTRANT.
Rational: On WinCE, there is no support for <stdio.h>, <errno.h> or
any other standard C library, i.e. even if _MT or _REENTRANT
is defined, errno is not provided by any library. NEED_ERRNO
must be set to compile for WinCE.
------------------------------------
- In implement.h, change #include <semaphore.h> to #include "semaphore.h".
Rational: semaphore.h is provided in pthread-win32 and should not
be searched in the systems standard include. would not compile.
This change does not seem to create problems on "classic" win32
(e.g. win95).
------------------------------------
- use a new macro NEED_CALLOC.
If defined, some code in misc.c will provide a replacement
for calloc, which is not available on Win32.
------------------------------------
- use a new macro NEED_CREATETHREAD.
If defined, implement.h defines the macro _beginthreadex
and _endthreadex.
Rational: On WinCE, the wrappers _beginthreadex and _endthreadex
do not exist. The native Win32 routines must be used.
------------------------------------
- in misc.c:
#ifdef NEED_DUPLICATEHANDLE
/* DuplicateHandle does not exist on WinCE */
self->threadH = GetCurrentThread();
#else
if( !DuplicateHandle(
GetCurrentProcess(),
GetCurrentThread(),
GetCurrentProcess(),
&self->threadH,
0,
FALSE,
DUPLICATE_SAME_ACCESS ) )
{
free( self );
return (NULL);
}
#endif
Rational: On WinCE, DuplicateHandle does not exist. I could not understand
why DuplicateHandle must be used. It seems to me that getting the current
thread handle with GetCurrentThread() is sufficient, and it seems to work
perfectly fine, so maybe DuplicateHandle was just plain useless to begin with ?
------------------------------------
- In private.c, added some code at the beginning of ptw32_processInitialize
to detect the case of multiple calls to ptw32_processInitialize.
Rational: In order to debug pthread-win32, it is easier to compile
it as a regular library (it is not possible to debug DLL's on winCE).
In that case, the application must call ptw32_rocessInitialize()
explicitely, to initialize pthread-win32. It is safer in this circumstance
to handle the case where ptw32_processInitialize() is called on
an already initialized library:
int
ptw32_processInitialize (void)
{
if (ptw32_processInitialized) {
/*
* ignore if already initialized. this is useful for
* programs that uses a non-dll pthread
* library. such programs must call ptw32_processInitialize() explicitely,
* since this initialization routine is automatically called only when
* the dll is loaded.
*/
return TRUE;
}
ptw32_processInitialized = TRUE;
[...]
}
------------------------------------
- in private.c, if macro NEED_FTIME is defined, add routines to
convert timespec_to_filetime and filetime_to_timespec, and modified
code that was using _ftime() to use Win32 API instead.
Rational: _ftime is not available on WinCE. It is necessary to use
the native Win32 time API instead.
Note: the routine timespec_to_filetime is provided as a convenience and a mean
to test that filetime_to_timespec works, but it is not used by the library.
------------------------------------
- in semaphore.c, if macro NEED_SEM is defined, add code for the routines
_increase_semaphore and _decrease_semaphore, and modify significantly
the implementation of the semaphores so that it does not use CreateSemaphore.
Rational: CreateSemaphore is not available on WinCE. I had to re-implement
semaphores using mutexes and Events.
Note: Only the semaphore routines that are used by pthread are implemented
(i.e. signal conditions rely on a subset of the semaphores routines, and
this subset works). Some other semaphore routines (e.g. sem_trywait) are
not yet supported on my WinCE port (and since I don't need them, I am not
planning to do anything about them).
------------------------------------
- in tsd.c, changed the code that defines TLS_OUT_OF_INDEXES
/* TLS_OUT_OF_INDEXES not defined on WinCE */
#ifndef TLS_OUT_OF_INDEXES
#define TLS_OUT_OF_INDEXES 0xffffffff
#endif
Rational: TLS_OUT_OF_INDEXES is not defined in any standard include file
on WinCE.
------------------------------------
- added file need_errno.h
Rational: On WinCE, there is no errno.h file. need_errno.h is just a
copy of windows version of errno.h, with minor modifications due to the fact
that some of the error codes are defined by the WinCE socket library.
In pthread.h, if NEED_ERRNO is defined, the file need_errno.h is
included (instead of <errno.h>).
-- eof
-53
View File
@@ -1,53 +0,0 @@
/*
* attr.c
*
* Description:
* This translation unit agregates operations on thread attribute objects.
* It is used for inline optimisation.
*
* The included modules are used separately when static executable sizes
* must be minimised.
*
* --------------------------------------------------------------------------
*
* Pthreads-win32 - POSIX Threads Library for Win32
* Copyright(C) 1998 John E. Bossom
* Copyright(C) 1999,2005 Pthreads-win32 contributors
*
* Contact Email: rpj@callisto.canberra.edu.au
*
* The current list of contributors is contained
* in the file CONTRIBUTORS included with the source
* code distribution. The list can also be seen at the
* following World Wide Web location:
* http://sources.redhat.com/pthreads-win32/contributors.html
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library in the file COPYING.LIB;
* if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "pthread.h"
#include "implement.h"
#include "pthread_attr_init.c"
#include "pthread_attr_destroy.c"
#include "pthread_attr_getdetachstate.c"
#include "pthread_attr_setdetachstate.c"
#include "pthread_attr_getstackaddr.c"
#include "pthread_attr_setstackaddr.c"
#include "pthread_attr_getstacksize.c"
#include "pthread_attr_setstacksize.c"
#include "pthread_attr_getscope.c"
#include "pthread_attr_setscope.c"
-69
View File
@@ -1,69 +0,0 @@
/*
* autostatic.c
*
* Description:
* This translation unit implements static auto-init and auto-exit logic.
*
* --------------------------------------------------------------------------
*
* Pthreads-win32 - POSIX Threads Library for Win32
* Copyright(C) 1998 John E. Bossom
* Copyright(C) 1999,2005 Pthreads-win32 contributors
*
* Contact Email: rpj@callisto.canberra.edu.au
*
* The current list of contributors is contained
* in the file CONTRIBUTORS included with the source
* code distribution. The list can also be seen at the
* following World Wide Web location:
* http://sources.redhat.com/pthreads-win32/contributors.html
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library in the file COPYING.LIB;
* if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if defined(PTW32_STATIC_LIB)
#if defined(__MINGW64__) || defined(__MINGW32__) || defined(_MSC_VER)
#include "pthread.h"
#include "implement.h"
static void on_process_init(void)
{
pthread_win32_process_attach_np ();
}
static void on_process_exit(void)
{
pthread_win32_thread_detach_np ();
pthread_win32_process_detach_np ();
}
#if defined(__MINGW64__) || defined(__MINGW32__)
# define attribute_section(a) __attribute__((section(a)))
#elif defined(_MSC_VER)
# define attribute_section(a) __pragma(section(a,long,read)); __declspec(allocate(a))
#endif
attribute_section(".ctors") void *gcc_ctor = on_process_init;
attribute_section(".dtors") void *gcc_dtor = on_process_exit;
attribute_section(".CRT$XCU") void *msc_ctor = on_process_init;
attribute_section(".CRT$XPU") void *msc_dtor = on_process_exit;
#endif /* defined(__MINGW64__) || defined(__MINGW32__) || defined(_MSC_VER) */
#endif /* PTW32_STATIC_LIB */
-47
View File
@@ -1,47 +0,0 @@
/*
* barrier.c
*
* Description:
* This translation unit implements barrier primitives.
*
* --------------------------------------------------------------------------
*
* Pthreads-win32 - POSIX Threads Library for Win32
* Copyright(C) 1998 John E. Bossom
* Copyright(C) 1999,2005 Pthreads-win32 contributors
*
* Contact Email: rpj@callisto.canberra.edu.au
*
* The current list of contributors is contained
* in the file CONTRIBUTORS included with the source
* code distribution. The list can also be seen at the
* following World Wide Web location:
* http://sources.redhat.com/pthreads-win32/contributors.html
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library in the file COPYING.LIB;
* if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "pthread.h"
#include "implement.h"
#include "pthread_barrier_init.c"
#include "pthread_barrier_destroy.c"
#include "pthread_barrier_wait.c"
#include "pthread_barrierattr_init.c"
#include "pthread_barrierattr_destroy.c"
#include "pthread_barrierattr_getpshared.c"
#include "pthread_barrierattr_setpshared.c"
-64
View File
@@ -1,64 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)common\vsprops\BaseProjectConfig.props" />
<Import Project="$(SolutionDir)common\vsprops\WinSDK.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>{0FAE817D-9A32-4830-857E-81DA57246E16}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
<UseDebugLibraries Condition="!$(Configuration.Contains(Debug))">false</UseDebugLibraries>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets">
<Import Project="..\..\DefaultProjectRootDir.props" />
<Import Project="..\..\3rdparty.props" />
<Import Project="..\..\..\common\vsprops\pthreads.props" />
<Import Condition="$(Configuration.Contains(Debug))" Project="..\..\..\common\vsprops\CodeGen_Debug.props" />
<Import Condition="$(Configuration.Contains(Devel))" Project="..\..\..\common\vsprops\CodeGen_Devel.props" />
<Import Condition="$(Configuration.Contains(Release))" Project="..\..\..\common\vsprops\CodeGen_Release.props" />
<Import Condition="!$(Configuration.Contains(Release))" Project="..\..\..\common\vsprops\IncrementalLinking.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>HAVE_PTW32_CONFIG_H;PTW32_BUILD_INLINED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>PTW32_RC_MSC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Platform)'=='Win32'">PTW32_ARCHx86;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Platform)'=='x64'">PTW32_ARCHx64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Lib>
<TargetMachine Condition="'$(Platform)'=='Win32'">MachineX86</TargetMachine>
<TargetMachine Condition="'$(Platform)'=='x64'">MachineX64</TargetMachine>
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\pthread.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\config.h" />
<ClInclude Include="..\context.h" />
<ClInclude Include="..\implement.h" />
<ClInclude Include="..\include\pthread.h" />
<ClInclude Include="..\include\sched.h" />
<ClInclude Include="..\include\semaphore.h" />
<ClInclude Include="..\need_errno.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\version.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>
-50
View File
@@ -1,50 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\version.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\pthread.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\context.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\implement.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\need_errno.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\pthread.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\sched.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\semaphore.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
-9
View File
@@ -1,9 +0,0 @@
; Build the pthreads library with the Digital Mars Compiler
;
set DMCDIR=c:\dm
; RELEASE
%DMCDIR%\bin\dmc -D_WIN32_WINNT -D_MT -DHAVE_PTW32_CONFIG_H -I.;c:\dm\include -o+all -WD pthread.c user32.lib+kernel32.lib+wsock32.lib -L/impl -L/NODEBUG -L/SU:WINDOWS
; DEBUG
%DMCDIR%\bin\dmc -g -D_WIN32_WINNT -D_MT -DHAVE_PTW32_CONFIG_H -I.;c:\dm\include -o+all -WD pthread.c user32.lib+kernel32.lib+wsock32.lib -L/impl -L/SU:WINDOWS
-44
View File
@@ -1,44 +0,0 @@
/*
* cancel.c
*
* Description:
* POSIX thread functions related to thread cancellation.
*
* --------------------------------------------------------------------------
*
* Pthreads-win32 - POSIX Threads Library for Win32
* Copyright(C) 1998 John E. Bossom
* Copyright(C) 1999,2005 Pthreads-win32 contributors
*
* Contact Email: rpj@callisto.canberra.edu.au
*
* The current list of contributors is contained
* in the file CONTRIBUTORS included with the source
* code distribution. The list can also be seen at the
* following World Wide Web location:
* http://sources.redhat.com/pthreads-win32/contributors.html
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library in the file COPYING.LIB;
* if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "pthread.h"
#include "implement.h"
#include "pthread_setcancelstate.c"
#include "pthread_setcanceltype.c"
#include "pthread_testcancel.c"
#include "pthread_cancel.c"
-148
View File
@@ -1,148 +0,0 @@
/*
* cleanup.c
*
* Description:
* This translation unit implements routines associated
* with cleaning up threads.
*
*
* --------------------------------------------------------------------------
*
* Pthreads-win32 - POSIX Threads Library for Win32
* Copyright(C) 1998 John E. Bossom
* Copyright(C) 1999,2005 Pthreads-win32 contributors
*
* Contact Email: rpj@callisto.canberra.edu.au
*
* The current list of contributors is contained
* in the file CONTRIBUTORS included with the source
* code distribution. The list can also be seen at the
* following World Wide Web location:
* http://sources.redhat.com/pthreads-win32/contributors.html
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library in the file COPYING.LIB;
* if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "pthread.h"
#include "implement.h"
/*
* The functions ptw32_pop_cleanup and ptw32_push_cleanup
* are implemented here for applications written in C with no
* SEH or C++ destructor support.
*/
ptw32_cleanup_t *
ptw32_pop_cleanup (int execute)
/*
* ------------------------------------------------------
* DOCPUBLIC
* This function pops the most recently pushed cleanup
* handler. If execute is nonzero, then the cleanup handler
* is executed if non-null.
*
* PARAMETERS
* execute
* if nonzero, execute the cleanup handler
*
*
* DESCRIPTION
* This function pops the most recently pushed cleanup
* handler. If execute is nonzero, then the cleanup handler
* is executed if non-null.
* NOTE: specify 'execute' as nonzero to avoid duplication
* of common cleanup code.
*
* RESULTS
* N/A
*
* ------------------------------------------------------
*/
{
ptw32_cleanup_t *cleanup;
cleanup = (ptw32_cleanup_t *) pthread_getspecific (ptw32_cleanupKey);
if (cleanup != NULL)
{
if (execute && (cleanup->routine != NULL))
{
(*cleanup->routine) (cleanup->arg);
}
pthread_setspecific (ptw32_cleanupKey, (void *) cleanup->prev);
}
return (cleanup);
} /* ptw32_pop_cleanup */
void
ptw32_push_cleanup (ptw32_cleanup_t * cleanup,
ptw32_cleanup_callback_t routine, void *arg)
/*
* ------------------------------------------------------
* DOCPUBLIC
* This function pushes a new cleanup handler onto the thread's stack
* of cleanup handlers. Each cleanup handler pushed onto the stack is
* popped and invoked with the argument 'arg' when
* a) the thread exits by calling 'pthread_exit',
* b) when the thread acts on a cancellation request,
* c) or when the thread calls pthread_cleanup_pop with a nonzero
* 'execute' argument
*
* PARAMETERS
* cleanup
* a pointer to an instance of pthread_cleanup_t,
*
* routine
* pointer to a cleanup handler,
*
* arg
* parameter to be passed to the cleanup handler
*
*
* DESCRIPTION
* This function pushes a new cleanup handler onto the thread's stack
* of cleanup handlers. Each cleanup handler pushed onto the stack is
* popped and invoked with the argument 'arg' when
* a) the thread exits by calling 'pthread_exit',
* b) when the thread acts on a cancellation request,
* c) or when the thrad calls pthread_cleanup_pop with a nonzero
* 'execute' argument
* NOTE: pthread_push_cleanup, ptw32_pop_cleanup must be paired
* in the same lexical scope.
*
* RESULTS
* pthread_cleanup_t *
* pointer to the previous cleanup
*
* ------------------------------------------------------
*/
{
cleanup->routine = routine;
cleanup->arg = arg;
cleanup->prev = (ptw32_cleanup_t *) pthread_getspecific (ptw32_cleanupKey);
pthread_setspecific (ptw32_cleanupKey, (void *) cleanup);
} /* ptw32_push_cleanup */
-50
View File
@@ -1,50 +0,0 @@
/*
* condvar.c
*
* Description:
* This translation unit implements condition variables and their primitives.
*
*
* --------------------------------------------------------------------------
*
* Pthreads-win32 - POSIX Threads Library for Win32
* Copyright(C) 1998 John E. Bossom
* Copyright(C) 1999,2005 Pthreads-win32 contributors
*
* Contact Email: rpj@callisto.canberra.edu.au
*
* The current list of contributors is contained
* in the file CONTRIBUTORS included with the source
* code distribution. The list can also be seen at the
* following World Wide Web location:
* http://sources.redhat.com/pthreads-win32/contributors.html
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library in the file COPYING.LIB;
* if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
*/
#include "pthread.h"
#include "implement.h"
#include "ptw32_cond_check_need_init.c"
#include "pthread_condattr_init.c"
#include "pthread_condattr_destroy.c"
#include "pthread_condattr_getpshared.c"
#include "pthread_condattr_setpshared.c"
#include "pthread_cond_init.c"
#include "pthread_cond_destroy.c"
#include "pthread_cond_wait.c"
#include "pthread_cond_signal.c"

Some files were not shown because too many files have changed in this diff Show More