Changes between Version 139 and Version 140 of library_stdio
- Timestamp:
- Dec 12, 2015, 6:39:15 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
library_stdio
v139 v140 270 270 271 271 === 4) int '''giet_fat_read'''( unsigned int fd_id , void* buffer , unsigned int count ) === 272 This function has the same semantic as the UNIX "read()" function. It transfers "count" bytes from the kernel File_Cache associated to the file identified by "fd_id", to the user "buffer", starting from the current file offset. The offset value is incremented by count.272 This function has the same semantic as the UNIX read() function. It transfers <count> bytes from the kernel File_Cache associated to the file identified by <fd_id>, to the user <buffer>, starting from the current file offset. The offset value is incremented by count. 273 273 In case of miss in the File_Cache, it loads all involved clusters into cache. 274 274 … … 279 279 280 280 === 5) int '''giet_fat_write'''( unsigned int fd_id , void* buffer, unsigned int count ) === 281 This function has the same semantic as the UNIX "write()" function. It transfers "count" bytes from the user "buffer" to the kernel File_Cache associated to the file identified by "fd_id", starting from the current file offset. The offset value is incremented by count. It increases the file size and allocate new clusters if (count + offset) is larger than the current file size. Then it loads and updates all involved clusters in the cache.281 This function has the same semantic as the UNIX <write()> function. It transfers <count> bytes from the user <buffer> to the kernel File_Cache associated to the file identified by <fd_id>, starting from the current file offset. The offset value is incremented by count. It increases the file size and allocate new clusters if (count + offset) is larger than the current file size. Then it loads and updates all involved clusters in the cache. 282 282 The FAT region on block device is updated if new clusters are allocated, but the block device DATA region is NOT updated. 283 283