# include "pswarp.h"

// each thread runs this function, starting a new job when it finished with an old one
// it is called with a (void *) pointer to its own thread pointer
bool pswarpThread_pswarpTransformTile(psThreadJob *job)
{
    pswarpTransformTileArgs *args = job->args->data[0];
    bool status = pswarpTransformTile (args);
    return status;
}

bool pswarpSetThreads () {

    psThreadTask *task = NULL;

    task = psThreadTaskAlloc("PSWARP_TRANSFORM_TILE", 1);
    task->function = &pswarpThread_pswarpTransformTile;
    psThreadTaskAdd(task);
    psFree(task);

    return true;
}
