/** @file pswarpSetThreads.c
 *
 *  @brief
 *
 *  @ingroup pswarp
 *
 *  @author IfA
 *  @version $Revision: 1.4.16.1 $ $Name: not supported by cvs2svn $
 *  @date $Date: 2009-02-02 21:57:10 $
 *  Copyright 2009 Institute for Astronomy, University of Hawaii
 */

# 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;
}
