projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve wording.
[pintos-anon]
/
src
/
devices
/
disk.c
diff --git
a/src/devices/disk.c
b/src/devices/disk.c
index 2bae0577ff044ec07657711cae1d7586338b9c49..14fc63158be840c550d7eb7a9d42d6ecb23b0c77 100644
(file)
--- a/
src/devices/disk.c
+++ b/
src/devices/disk.c
@@
-183,7
+183,7
@@
disk_print_stats (void)
slave, respectively--within the channel numbered CHAN_NO.
Pintos uses disks this way:
slave, respectively--within the channel numbered CHAN_NO.
Pintos uses disks this way:
- 0:0 - operating system kernel
+ 0:0 -
boot loader, command line args, and
operating system kernel
0:1 - file system
1:0 - scratch
1:1 - swap
0:1 - file system
1:0 - scratch
1:1 - swap
@@
-213,7
+213,9
@@
disk_size (struct disk *d)
}
/* Reads sector SEC_NO from disk D into BUFFER, which must have
}
/* Reads sector SEC_NO from disk D into BUFFER, which must have
- room for DISK_SECTOR_SIZE bytes. */
+ room for DISK_SECTOR_SIZE bytes.
+ Internally synchronizes accesses to disks, so external
+ per-disk locking is unneeded. */
void
disk_read (struct disk *d, disk_sector_t sec_no, void *buffer)
{
void
disk_read (struct disk *d, disk_sector_t sec_no, void *buffer)
{
@@
-236,7
+238,9
@@
disk_read (struct disk *d, disk_sector_t sec_no, void *buffer)
/* Write sector SEC_NO to disk D from BUFFER, which must contain
DISK_SECTOR_SIZE bytes. Returns after the disk has
/* Write sector SEC_NO to disk D from BUFFER, which must contain
DISK_SECTOR_SIZE bytes. Returns after the disk has
- acknowledged receiving the data. */
+ acknowledged receiving the data.
+ Internally synchronizes accesses to disks, so external
+ per-disk locking is unneeded. */
void
disk_write (struct disk *d, disk_sector_t sec_no, const void *buffer)
{
void
disk_write (struct disk *d, disk_sector_t sec_no, const void *buffer)
{