Evolution of the x86 context switch in Linux (2018)
1–10 of 35 posts
Re: Evolution of the x86 context switch in Linux (2018)
#2Was curious if it guards against some C pre-processor issues.
/** include/asm-i386/system.h */
#define switch_to(tsk) do {
[...]
} while (0)Re: Evolution of the x86 context switch in Linux (2018)
#3Enjoyed this article, anybody know the significance of adding the do..while(0) loop within the macro starting Linux 1.3? Was curious if it guards against some C pre-processor issues. /** include/asm-i386/system.h */ #define switch_to(tsk) do { [...] } while (0)
Re: Evolution of the x86 context switch in Linux (2018)
#4Enjoyed this article, anybody know the significance of adding the do..while(0) loop within the macro starting Linux 1.3? Was curious if it guards against some C pre-processor issues. /** include/asm-i386/system.h */ #define switch_to(tsk) do { [...] } while (0)
For details, see http://c-faq.com/cpp/multistmt.html:
Re: Evolution of the x86 context switch in Linux (2018)
#5Thanks to the author, for caring about the paper people. : )
Re: Evolution of the x86 context switch in Linux (2018)
#6Re: Evolution of the x86 context switch in Linux (2018)
#7Re: Evolution of the x86 context switch in Linux (2018)
#8Later, with Red Hat's 4g4g kernels that Linus rejected, the problem would go away for people who installed Red Hat's version of the OS on systems with many gigabytes of memory.
Re: Evolution of the x86 context switch in Linux (2018)
#9Re: Evolution of the x86 context switch in Linux (2018)
#10I really like how good the article looks when printed. I enjoy reading long, in-depth articles much more when I can read them in print. Unfortunately many blog posts need a lot of tweaking until I can get an acceptable print result. This one looks good enough without any trickery. Thanks to the author, for caring about the paper people. : )