25 Jan
2023
25 Jan
'23
12:19 p.m.
Piotr Caban (@piotr) commented about dlls/msvcrt/concurrency.c:
+ void *prev_exception, *new_exception; + struct scheduled_chore *sc, *next; + LONG removed = 0; + LONG prev_finished, new_finished; + + context = (ExternalContextBase*)this->context; + if (!context) + return; + scheduler = get_thread_scheduler_from_context(context); + if (!scheduler) + return; + + new_exception = this->exception; + do { + prev_exception = new_exception; + if ((ULONG_PTR)prev_exception & 0x2) Please avoid using magic constants. You can define _TaskCollectionStatus and use it here instead:
typedef enum
{
TASK_COLLECTION_SUCCESS = 1,
TASK_COLLECTION_CANCELLED
} _TaskCollectionStatus;
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/1979#note_21770