Update of /cvsroot/playerstage/code/player/server/drivers/mixed/rflex
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30646/server/drivers/mixed/rflex

Modified Files:
        rflex.cc rflex_commands.cc 
Log Message:
applied patch to fix busy loop in rflex driver

Index: rflex_commands.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/rflex/rflex_commands.cc,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** rflex_commands.cc   6 Sep 2005 05:37:31 -0000       1.22
--- rflex_commands.cc   30 May 2006 22:57:52 -0000      1.23
***************
*** 167,170 ****
--- 167,173 ----
                        start = now;
                count = (now.tv_sec - start.tv_sec) * 1000000 + (now.tv_usec - 
start.tv_usec);
+ 
+                // release somewhat so other threads can run.
+                usleep(500);
        } while (count < 10000);
  

Index: rflex.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/mixed/rflex/rflex.cc,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** rflex.cc    26 Jan 2006 13:31:11 -0000      1.34
--- rflex.cc    30 May 2006 22:57:52 -0000      1.35
***************
*** 515,518 ****
--- 515,525 ----
      command = *reinterpret_cast<player_position2d_cmd_vel_t *> (data);
      Unlock();
+  
+     // reset command_type since we have a new 
+     // velocity command so we can get into the 
+     // velocity control section in RFLEX::Main()
+     
+     command_type = 0;
+     
      return 0;
    }
***************
*** 1157,1160 ****
--- 1164,1171 ----
    }
    Unlock();
+ 
+   // release cpu somewhat so other threads can run.
+   usleep(1000);
+   
    }
    pthread_exit(NULL);



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to