patch-2.1.34 linux/arch/alpha/mm/init.c
Next file: linux/arch/i386/defconfig
Previous file: linux/arch/alpha/lib/csum_partial_copy.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/alpha/mm/init.c
- Orig date:
Sun Jan 26 02:07:04 1997
diff -u --recursive --new-file v2.1.33/linux/arch/alpha/mm/init.c linux/arch/alpha/mm/init.c
@@ -64,10 +64,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);
@@ -163,7 +163,7 @@
clear_bit(PG_DMA, &mem_map[MAP_NR(tmp)].flags);
if (PageReserved(mem_map+MAP_NR(tmp)))
continue;
- mem_map[MAP_NR(tmp)].count = 1;
+ atomic_set(&mem_map[MAP_NR(tmp)].count, 1);
free_page(tmp);
}
tmp = nr_free_pages << PAGE_SHIFT;
@@ -189,9 +189,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