Fixed threadpool work function return and arguments.

This commit is contained in:
Armin Novak 2018-03-07 12:42:17 +01:00
parent 2517755d25
commit 66cc038c93
3 changed files with 6 additions and 6 deletions

View File

@ -949,7 +949,7 @@ static BOOL rfx_process_message_tileset(RFX_CONTEXT* context,
params[i].context = context;
params[i].tile = message->tiles[i];
if (!(work_objects[i] = CreateThreadpoolWork((PTP_WORK_CALLBACK)
if (!(work_objects[i] = CreateThreadpoolWork(
rfx_process_message_tile_work_callback,
(void*) &params[i], &context->priv->ThreadPoolEnv)))
{
@ -1367,7 +1367,7 @@ struct _RFX_TILE_COMPOSE_WORK_PARAM
RFX_CONTEXT* context;
};
void CALLBACK rfx_compose_message_tile_work_callback(PTP_CALLBACK_INSTANCE
static void CALLBACK rfx_compose_message_tile_work_callback(PTP_CALLBACK_INSTANCE
instance, void* context, PTP_WORK work)
{
RFX_TILE_COMPOSE_WORK_PARAM* param = (RFX_TILE_COMPOSE_WORK_PARAM*) context;
@ -1580,7 +1580,7 @@ RFX_MESSAGE* rfx_encode_message(RFX_CONTEXT* context, const RFX_RECT* rects,
workParam->tile = tile;
if (!(*workObject = CreateThreadpoolWork(
(PTP_WORK_CALLBACK)rfx_compose_message_tile_work_callback,
rfx_compose_message_tile_work_callback,
(void*) workParam,
&context->priv->ThreadPoolEnv)))
{

View File

@ -159,7 +159,7 @@ BOOL yuv_context_decode(YUV_CONTEXT* context, const BYTE* pYUVData[3], UINT32 iS
else
params[i].height = context->height % context->heightStep;
work_objects[i] = CreateThreadpoolWork((PTP_WORK_CALLBACK)yuv_process_work_callback,
work_objects[i] = CreateThreadpoolWork(yuv_process_work_callback,
(void*) &params[i], &context->ThreadPoolEnv);
if (!work_objects[i])
{

View File

@ -31,7 +31,7 @@ static BOOL test1(void)
int index;
PTP_WORK work;
printf("Global Thread Pool\n");
work = CreateThreadpoolWork((PTP_WORK_CALLBACK) test_WorkCallback, "world", NULL);
work = CreateThreadpoolWork(test_WorkCallback, "world", NULL);
if (!work)
{
@ -86,7 +86,7 @@ static BOOL test2(void)
}
SetThreadpoolCallbackCleanupGroup(&environment, cleanupGroup, NULL);
work = CreateThreadpoolWork((PTP_WORK_CALLBACK) test_WorkCallback, "world", &environment);
work = CreateThreadpoolWork(test_WorkCallback, "world", &environment);
if (!work)
{