IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18813


Ignore:
Timestamp:
Jul 30, 2008, 6:03:43 PM (18 years ago)
Author:
eugene
Message:

drop example test function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080719/pswarp/src/pswarpThreadLauncher.c

    r18753 r18813  
    11# include "pswarp.h"
    2 // XXX add in a thread exit api (set a local 'exit' variable)
    3 
    4 bool pswarpThreadTest (psArray *args) {
    5 
    6     pthread_t id = pthread_self();
    7 
    8     // int dtime = 500000*drand48();
    9 
    10     int dtime = (drand48() > 0.5) ? 500000 : 10000;
    11     bool status = (drand48() > 0.9) ? false : true;
    12 
    13     usleep (dtime);
    14     fprintf (stderr, "in thread %lu, args %s and %s, dtime %d, status %d\n", id, (char *) args->data[0], (char *) args->data[1], dtime, status);
    15 
    16     return status;
    17 }
    182
    193// each thread runs this function, starting a new job when it finished with an old one
     
    4226
    4327        // list all allowed job types here
    44         if (!strcmp (job->type, "THREAD_TEST")) {
    45             bool status = pswarpThreadTest (job->args);
    46             if (!status) {
    47                 self->fault = true;
    48             }
    49             // we do not have to lock here because this transition is not tied to the job queue
    50             self->busy = false; 
    51             continue;
    52         }
    53 
    54         // list all allowed job types here
    5528        if (!strcmp (job->type, "PSWARP_TRANSFORM_TILE")) {
    5629            pswarpTransformTileArgs *args = job->args->data[0];
Note: See TracChangeset for help on using the changeset viewer.