Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

__volatile__ __asm__

Name: Anonymous 2011-12-06 21:57

volatile is a C keyword, and programmers know better than using asm as an identifier. Why do people insist on using double underscores around them, especially Linux kernel developers?

Also, why do people use things like __attribute__((aligned(n))) instead of defining a macro ALIGNED(n)?

Name: Anonymous 2011-12-07 12:09

>>6
I write kernel code so it appears a lot.
You are retarded. In fact this entire thread is retarded.

"Declaring your variables volatile will have no useful effect, and will simply cause your code to run a *lot* slower when you turn on optimisation in your compiler." - Bryan O' Sullivan

"...the use of volatile accomplishes nothing but to prevent the compiler from making useful and desirable optimizations, providing no help whatsoever in making code "thread safe". " - David Butenhof

http://software.intel.com/en-us/blogs/2007/11/30/volatile-almost-useless-for-multi-threaded-programming/

Name: Anonymous 2011-12-07 12:12

>>9

I pretty much believe you are retarded.

volatile has legitimate uses in hardware programming, and (competent) kernel developers are well aware of those uses. No one has said anything about volatile and multithreading.

Also, you're just parroting information from other threads without even knowing what they're about.

Name: Anonymous 2011-12-07 12:15

>>7[code]'
>Why doesn't C have abstract
>Implying a non-oop lanaguage would have a oop keyword
[code]

Name: Anonymous 2011-12-07 12:17

>>10
volatile has legitimate uses in hardware programming, and (competent) kernel developers are well aware of those uses.
vs

I write kernel code so it appears a lot.

Nope, it's definitely you!

Name: Anonymous 2011-12-07 12:21

Name: Anonymous 2011-12-07 16:25

>>15
Of course, busy-
waiting is generally an anti-social act to begin with.

what do you think the correct way is?

inb4

while(my_varaible != what_i_what);

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List