IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 23, 2006, 3:05:21 PM (20 years ago)
Author:
eugene
Message:

adding working threads to server/client mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pantasks/pantasks_server.c

    r7940 r7952  
    1616int main (int argc, char **argv) {
    1717 
    18   pthread_t thread;
     18  pthread_t clientsThread;
     19  pthread_t tasksThread;
     20  pthread_t jobsThread;
     21  pthread_t inputsThread;
     22  pthread_t controllerThread;
    1923  int InitSocket, BindSocket;
    2024  SockAddress Address;
     
    3236 
    3337  gprintInit ();  // each thread needs to init the printing system
     38  InitInputs ();
    3439
    3540  signal (SIGPIPE, gotsignal);
     
    3843  signal (SIGINT, SIG_DFL);
    3944
    40   // startup (&argc, argv);
    41 
    42   /* set up mechanisms for sharing data between the threads */
    43   // init_data_handling ();
     45  startup (&argc, argv);
    4446
    4547  /* start up the background threads here */
    46   pthread_create (&thread, NULL, &ListenClients, NULL);
    47 
    48   // pthread_create (&thread, NULL, &RunScheduler, NULL);
    49   // pthread_create (&thread, NULL, &RunController, NULL);
     48  pthread_create (&clientsThread,    NULL, &ListenClients,         NULL);
     49  pthread_create (&tasksThread,      NULL, &CheckTasksThread,      NULL);
     50  pthread_create (&jobsThread,       NULL, &CheckJobsThread,       NULL);
     51  pthread_create (&controllerThread, NULL, &CheckControllerThread, NULL);
     52  pthread_create (&inputsThread,     NULL, &CheckInputsThread,     NULL);
    5053
    5154  /* in this loop, we listen for incoming connections, validate, and
Note: See TracChangeset for help on using the changeset viewer.