Re: MOD_INC_USE_COUNT

Regis Duchesne (regis@via.ecp.fr)
Mon, 10 Nov 1997 12:28:33 +0100 (CET)


> |> During this non-atomic operation, before the increment occurs, we
> |> have a context switch (is this possible when we are in kernel code?)
> No.
Then, why are both MOD_INC_USE_COUNT and MOD_DEC_USE_COUNT needed in
functions like read_super() :

... read_super(...) {
MOD_INC_USE_COUNT;
...
MOD_DEC_USE_COUNT;
}

, since nothing else can happen while the function is executed?

Best regards,

Regis "HPReg" Duchesne - Engineering Student at ***** ******** *****
www http://www.via.ecp.fr/~regis/
(O o) I use Linux & 3Com (1135 KB/s over 10Mb/s ethernet)
--.oOO--(_)--OOo.-----------------------------------------------------------