Hi,
In the following code excerpt of kernel, why the 'count' field is
set by atomic_set while other fields of tha same structure can take an
assignment directly?
void tasklet_init(struct tasklet_struct *t,
void (*func)(unsigned long), unsigned long data)
{
t->func = func;
t->data = data;
t->state = 0;
atomic_set(&t->count, 0);
}
Furthermore, the definition of atomic_set is as follows
#define atomic_set(v,i) (((v)->counter) = (i))
and there is seemingly no 'atomic feature' at all.
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ