Commit d693102d authored by claes's avatar claes

Wait a while for correct scheduler to be set before starting threads

parent 292f2695
/*
* Proview $Id: rt_qmon.c,v 1.10 2006-03-29 12:21:43 claes Exp $
* Proview $Id: rt_qmon.c,v 1.11 2006-09-05 12:11:47 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -338,9 +338,21 @@ main (int argc, char *argv[])
qcom_sQid qid = qdb_cQexport;
qcom_sQid neth_qid;
qcom_sQid my_q = qcom_cNQid;
pid_t pid;
int count = 0;
/* Vnta en stund ... */
// sleep(5);
/* Wait for scheduler to be set */
pid = getpid();
while ((sched_getscheduler(pid) == SCHED_OTHER) &&
(count < 5)) {
sleep(1);
count++;
}
errh_Init("pwr_qmon", errh_eAnix_qmon);
errh_SetStatus( PWR__SRVSTARTUP);
......
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