[PATCH 3/5] programs/services: Break services into Loader groups
Sebastian Lackner
sebastian at fds-team.de
Thu Aug 11 07:19:25 CDT 2016
On 11.08.2016 14:04, Aric Stewart wrote:
> On 8/11/16 12:38 AM, Sebastian Lackner wrote:
>> On 09.08.2016 18:40, Aric Stewart wrote:
>>>
>>> Sort the groups by the service's tag to start in order
>>>
>>> Signed-off-by: Aric Stewart <aric at codeweavers.com> ---
>>> programs/services/services.c | 101
>>> ++++++++++++++++++++++++++++++++----------- 1 file changed, 75
>>> insertions(+), 26 deletions(-)
>>>
>>
>> I believe this can be solved a bit easier. Why not just a sort
>> function callback which sorts for both group and tag?
>>
>
> I feel like that is what I am doing. Part of the reason I am breaking
> each group into a separate set it that we will be wanting to start a
> single winedevice process for each group and that felt like an easier
> way to organize it.
>
> Alternate implementations are welcome.
>
> -aric
>
Well, one winedevice process might not always be sufficient. Wine also
supports loading 32-bit drivers in a 64-bit wineprefix, so we might need
at least two per group (default and wow64). Because of this issue, it
seems easier to search for a matching winedevice instance during process
startup.
In this patch, I would suggest to implement only the sorting itself, and
then later let service_start_process() deal with the search for a running
process of the same group / architecture / (probably other conditions).
This would reduce the patch to a call of qsort() with a callback which
sorts for both group and tag. I hope it is clear what I mean, if not I
can also help you updating these parts.
Regards,
Sebastian
More information about the wine-devel
mailing list