Commit 1f8d4591 authored by claes's avatar claes

arg -n added to start without neth

parent 9791a83b
/* /*
* Proview $Id: rt_qmon.c,v 1.11 2006-09-05 12:11:47 claes Exp $ * Proview $Id: rt_qmon.c,v 1.12 2008-09-05 08:55:39 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -340,10 +340,14 @@ main (int argc, char *argv[]) ...@@ -340,10 +340,14 @@ main (int argc, char *argv[])
qcom_sQid my_q = qcom_cNQid; qcom_sQid my_q = qcom_cNQid;
pid_t pid; pid_t pid;
int count = 0; int count = 0;
int noneth = 0;
/* Vnta en stund ... */ /* Vnta en stund ... */
// sleep(5); // sleep(5);
if ( argc > 1 && strcmp( argv[1], "-n") == 0)
noneth = 1;
/* Wait for scheduler to be set */ /* Wait for scheduler to be set */
pid = getpid(); pid = getpid();
...@@ -387,18 +391,20 @@ main (int argc, char *argv[]) ...@@ -387,18 +391,20 @@ main (int argc, char *argv[])
neth_qid.qix = net_cProcHandler; neth_qid.qix = net_cProcHandler;
neth_qid.nid = qcom_cNNid; neth_qid.nid = qcom_cNNid;
for ( ; ; ) { if ( !noneth) {
qdb_sQue *qp = NULL; for ( ; ; ) {
qdb_sQue *qp = NULL;
qdb_ScopeLock { qdb_ScopeLock {
qp = qdb_Que(NULL, &neth_qid, NULL); qp = qdb_Que(NULL, &neth_qid, NULL);
} qdb_ScopeUnlock; } qdb_ScopeUnlock;
if (qp != NULL) if (qp != NULL)
break; break;
errh_Info("Waiting for Nethandler to start..."); errh_Info("Waiting for Nethandler to start...");
sleep(1); sleep(1);
}
} }
do { do {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment