* [ OFFTOPIC & trivial ] spinlock & atomic
@ 2004-05-11 14:21 FabF
0 siblings, 0 replies; only message in thread
From: FabF @ 2004-05-11 14:21 UTC (permalink / raw)
To: lkml
Hi,
Someone could explain why we have following code in kernel ?
spinlock (x)
atomic_inc (x->y)
spinunlock(x)
I mean y being part of x should be atomically modified with a "normal"
operation ? What am I missing ? Does it mean we defined y atomic_t in
order to have atomic operations elsewhere without the lock held ? Simply
?
Regards,
FabF
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-05-13 21:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-11 14:21 [ OFFTOPIC & trivial ] spinlock & atomic FabF
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®