[lkml]   [2003]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: bitmaps/bitops
Pete Zaitcev writes:

> > but the prototype for test_and_set_bit() depends on $(ARCH), and it's
> > not consistent, with the second arg (bitmap address) being one of:
> > volatile void *
> > void *
> > volatile unsigned long *
> It should be unsigned long pointer. I have no idea why
> volatile is still alive. Perhaps Linus can remember why he
> left it in on is386. Other arch maintainers midnlessly ape him
> in this area. I think I even kept his e-mail where he explains
> why volatile has to go.

The volatile is there (at least in ppc) because without it you get
compile warnings. I don't see why the bitops particularly should be
the anti-volatile police. I agree that using volatile is usually a
bad idea (unless you are accessing a memory-mapped I/O device).

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:34    [W:0.352 / U:2.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site