On Thu Nov 30 22:00:39 2023 +0000, Zebediah Figura wrote:
> I don't like this pattern; in cases like this we should instead just
> split up the init_stream() helper to the part that's done on
> initialization and the part that's done on recreation. That said I would
> imagine more of this should be done on initialization...?
They're a bit intertwined; reader->streams can't be allocated before stream_count is known, which requires creating the wg_parser.
But yes, creating the reader from two places is cleaner than these conditionals, even if it's a few more lines of code.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4449#note_54577
On Thu Nov 30 22:00:38 2023 +0000, Zebediah Figura wrote:
> This cast should be unnecessary. I'd also make this an ERR or FIXME.
My thinking was that uint32_t is unsigned long, so it needs a cast.
But you're right, that's wrong. This is Unix side code, so uint32_t is not unsigned long. Fixed.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4449#note_54576
On Thu Nov 30 22:00:39 2023 +0000, Zebediah Figura wrote:
> This is ugly. Either we should explicitly block the read thread, or shut
> it down and restart it. The latter is probably simpler.
Recreating the thread throws approximately 99999 test failures about being called from wrong thread. Should I throw some todo_wine or something at them instead? Some of those tests feel kinda overzealous.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4449#note_54575
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.
--
v3: server: Check wineserver privileges on init with -20
server: Use setpriority to update thread niceness when safe.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4551
--
v4: wined3d: Set d3d 1-9 textures in the state as SRVs.
d3d9: Use wined3d_texture_acquire_identity_srv().
wined3d: Introduce an API for creating an identity SRV on a texture.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4436