Skip to content
MarekBykowski edited this page Feb 11, 2021 · 63 revisions

Welcome to the readme wiki!

Floating-point in Linux Kernel

http://porterchen-note.blogspot.com/2011/03/linux-kernel-and-floating-point.html

Set/clear bit

#define NTH_BIT 4                                                              
                                                                               
unsigned int addr = 0xffffffff;                                        
enum flags { clear, set };                                             
                                                                               
addr &= ~(1<<NTH_BIT);                                                 
printf("mb: clearing %dth bit %x of %x\n", NTH_BIT, addr, 0xffffffff); 
                                                                               
addr |= (1<<NTH_BIT);                                                  
printf("mb: setting %dth bit %x\n", NTH_BIT, addr);                    

Clone this wiki locally