[haiku-commits] Re: r33785 - haiku/trunk/src/libs/compat/freebsd_network

  • From: Colin Günther <coling@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 27 Oct 2009 15:01:41 +0100

Colin Günther schrieb:

require a higher priority of the thread. Since it doesn't really do much, I guess that would be a good idea, anyway. However, why not using a timer for this? It much be much more lightweight and more accurate still. I'm talking about the add_timer() function here.
True, will change it to use the timer functionality. Reason I didn't use it right from start was, that I originally stuck with the 1 000 000 Hz (though usecs precision was needed) mentioned above and didn't reevaluated other possibilities, once I realized that 1000 Hz is quite enough, though.
Have to mark me wrong myself. The add_timer function provides usecs precision, in fact. So the reason I didn't use it, is because the network stack timer functions using a similiar approach I used (see init_timers() in kernel/network/stack/utility.cpp for an example). Though I'm not quite sure why the network stack doesn't make use of add_timer in the first place. Maybe you can give me a clue.


Other related posts: