patch-2.1.34 linux/arch/i386/mm/init.c
Next file: linux/arch/m68k/mm/init.c
Previous file: linux/arch/i386/kernel/time.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Mon Apr 14 09:31:08 1997
- Orig file:
v2.1.33/linux/arch/i386/mm/init.c
- Orig date:
Sun Apr 13 10:18:20 1997
diff -u --recursive --new-file v2.1.33/linux/arch/i386/mm/init.c linux/arch/i386/mm/init.c
@@ -79,10 +79,10 @@
total++;
if (PageReserved(mem_map+i))
reserved++;
- else if (!mem_map[i].count)
+ else if (!atomic_read(&mem_map[i].count))
free++;
else
- shared += mem_map[i].count-1;
+ shared += atomic_read(&mem_map[i].count) - 1;
}
printk("%d pages of RAM\n",total);
printk("%d free pages\n",free);
@@ -259,7 +259,7 @@
datapages++;
continue;
}
- mem_map[MAP_NR(tmp)].count = 1;
+ atomic_set(&mem_map[MAP_NR(tmp)].count, 1);
#ifdef CONFIG_BLK_DEV_INITRD
if (!initrd_start || (tmp < initrd_start || tmp >=
initrd_end))
@@ -316,9 +316,9 @@
if (PageReserved(mem_map+i))
continue;
val->totalram++;
- if (!mem_map[i].count)
+ if (!atomic_read(&mem_map[i].count))
continue;
- val->sharedram += mem_map[i].count-1;
+ val->sharedram += atomic_read(&mem_map[i].count) - 1;
}
val->totalram <<= PAGE_SHIFT;
val->sharedram <<= PAGE_SHIFT;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov