This is the current proton thread priority implementation by @rbernon rebased for upstream with a few `#ifdef`s added since AFAIK Linux is the only operating system where threads have a unique PID which can be used to set niceness on.
I also ran `./tools/make_requests` on https://gitlab.winehq.org/mzent/wine/-/commit/6705d3481be0409f7e971c1d2c7a3… as well and `autoconf` on https://gitlab.winehq.org/mzent/wine/-/commit/d7bafe40c411753662b2ad97148a6… (which does blow up the line count a bit).
A few tiny changes (with the ready variable for example) are in anticipation for Part 2, which also adds Mach thread priorities and recalculates thread priorities on process priority change.
Since this is a rather large MR, I hope the split here is appropriate (with the second part being slightly smaller), but I think logically it makes the most sense here.
--
v9: server: Check wineserver privileges on init with -20 niceness.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4551
push_dc_driver() places drivers based on their priorities, so the newly created driver is not
necessary on top. Thus in windrv_CreateDC(), find_dc_driver() should be used to find the dib
driver instead of assuming the dib driver is the top driver, which could be the path driver because
it has a higher priority.
--
v3: win32u: Find the correct DIB driver in windrv_CreateDC().
https://gitlab.winehq.org/wine/wine/-/merge_requests/4374
Along with !4450, this fixes WMV videos in microkiri (https://bugs.winehq.org/show_bug.cgi?id=9127#c102) and Wagamama High Spec Trial Edition (https://wagahigh.com/download_trial.php#normal ; ダウンロード means download).
--
v8: wmvcore/tests: Add tests for compressed output.
winegstreamer: Implement compressed output support in WMSyncReader.
winegstreamer: Leave pts/duration unchanged if they're not set.
winegstreamer: Introduce mutex for wm_reader read_thread_shutdown and wg_parser.
winegstreamer: Move file size to struct wm_reader.
winegstreamer: Fill in a few more pieces of WMV format handling.
winegstreamer: Add codec_data to WMVs.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4449