IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 19, 2008, 12:28:34 PM (18 years ago)
Author:
eugene
Message:

adding thread options to host and job

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pcontrol/host.c

    r18098 r19124  
    33int host (int argc, char **argv) {
    44
     5  int N, max_threads;
    56  IDtype HostID;
    67  Host *host;
    78  Stack *AllHosts;
     9
     10  max_threads = 0;
     11  if ((N = get_argument (argc, argv, "-threads"))) {
     12    remove_argument (N, &argc, argv);
     13    max_threads = atoi(argv[N]);
     14    remove_argument (N, &argc, argv);
     15  }
    816
    917  if (argc != 3) goto usage;
     
    1220
    1321  if (!strcasecmp (argv[1], "ADD")) {
    14     HostID = AddHost (argv[2]);
     22    HostID = AddHost (argv[2], max_threads);
    1523    gprint (GP_LOG, "HostID: %d\n", (int) HostID);
    1624    return (TRUE);
    1725  }
     26
     27  if (max_threads) goto usage;
    1828
    1929  // this one is safe from in-flight entries: no one else pulls from OFF
     
    8797  gprint (GP_LOG, "USAGE: host (command) (hostname)\n");
    8898  gprint (GP_ERR, "  valid commands: add, on, retry, check, off, delete\n");
     99  gprint (GP_ERR, "  -threads Nthreads is optional for 'add'\n");
    89100  return (FALSE);
    90101}
Note: See TracChangeset for help on using the changeset viewer.