[pso] [Tema5][Linux]Timer/No of rules

Alina Simion alina_simion2002 at yahoo.com
Mon Jun 9 17:45:18 EEST 2008


Initial am definitit o constanta 0.1, si intradevar era inlocuita cu 0, de-asta nu mergea. 
Dar punand Hz*0.1 vad ca e ok. Pot pune la fel de bine HZ/10.
Multumesc de raspuns.


----- Original MessagAe ----
From: Cosmin Ratiu <cosminratiu at gmail.com>
To: Proiectarea Sistemelor de Operare <pso at cursuri.cs.pub.ro>
Sent: Monday, June 9, 2008 4:01:49 PM
Subject: Re: [pso] [Tema5][Linux]Timer/No of rules



2008/6/9 Alina Simion <alina_simion2002 at yahoo.com>:

Da, armez pentru toate care ies si pentru alea care intra si sunt raspunsuri.

Liniile astea sunt problema:

mod_timer(&(tabela_reguli_din[i].timer), jiffies + (int)(HZ * 0.1));

si

tabela_reguli_din[i].timer.expires = jiffies + (int)(HZ * 0.1);

In kernel nu ai floating point din motive de eficienta. 0.1 de mai sus e inlocuit cu 0. Pentru a fi corect, foloseste ceva de genul 'jiffies + delay * HZ / 1000', unde delay este in milisecunde cat vrei sa fie.

Cosmin.



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/pso/attachments/20080609/cc3e86b2/attachment-0001.htm 


More information about the pso mailing list