On Sat, 8 Dec 2001, Bogdan Marinca wrote:
> (ok, sa ne uitam acuma dupa ``active_tasks'')
>
> (in acelasi fisier)
>
> /*
> * Nr of active tasks - counted in fixed-point numbers
> */
> static unsigned long count_active_tasks(void)
> {
> struct task_struct *p;
> unsigned long nr = 0;
>
> read_lock(&tasklist_lock);
> for_each_task(p) {
> if ((p->state == TASK_RUNNING ||
> (p->state & TASK_UNINTERRUPTIBLE)))
> nr += FIXED_1;
> }
> read_unlock(&tasklist_lock);
> return nr;
> }
>
> iar in ``include/linux/sched.h'' gasim
> [...]
> #define CALC_LOAD(load,exp,n) \
> load *= exp; \
> load += n*(FIXED_1-exp); \
> load >>= FSHIFT;
> [...]
>
>
> eh, acuma e mai clar? :)
Da, acuma este exact ce voiam :-)
Thx,
Socrate
--
Radu Filip
Network Administrator @ Technical University of Iasi
[EMAIL PROTECTED] Information Technology and Communication Center
http://socrate.tuiasi.ro/ [EMAIL PROTECTED] | http://ccti.tuiasi.ro/
---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to
unsubscribe from this list.