diff options
author | Chris Johns <chrisj@rtems.org> | 2009-08-05 00:00:54 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2009-08-05 00:00:54 +0000 |
commit | 0d15414ed6c144f7f7e4ce63476b3eb9b94acceb (patch) | |
tree | d403db6ba0eae020e8613bb81a0427ca1ab85867 /cpukit/libblock/src/blkdev.c | |
parent | 2009-08-04 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-0d15414ed6c144f7f7e4ce63476b3eb9b94acceb.tar.bz2 |
009-08-05 Chris Johns <chrisj@rtems.org>
* libmisc/dummy/dummy-networking.c: New.
* libmisc/dummy/dummy.c, libmisc/Makefile.am: Move
trhe networking configuration into a separate file so
configuration varations do not cause conflicts.
* score/inline/rtems/score/object.inl,
score/include/rtems/score/object.h: Remove warnings.
* score/inline/rtems/score/object.inl: Add _Chain_First,
_Chain_Last, _Chain_Mext, and _Chain_Previous.
* sapi/inline/rtems/chain.inl: Add rtems_chain_first,
rtems_chain_last, rtems_chain_mext, and rtems_chain_previous.
* libblock/include/rtems/diskdevs.h: Remove the bdbuf pool id and
block_size_log2. Add media_block_size.
* libblock/src/diskdevs.c: Remove size restrictions on block
size. Add media block size initialisation. Remove comment to clean
up the bdbuf cache.
* libblock/src/blkdev.c: Remove references to
block_size_log2. Allow any block size.
* libblock/include/rtems/bdbuf.h, libblock/src/bdbuf.c: Remove all
references to pools and make the cache handle demand driver
variable buffer size allocation. Added worker threads support the
swapout task.
* sapi/include/confdefs.h: Updated the bdbuf configutation.
Diffstat (limited to 'cpukit/libblock/src/blkdev.c')
-rw-r--r-- | cpukit/libblock/src/blkdev.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/cpukit/libblock/src/blkdev.c b/cpukit/libblock/src/blkdev.c index 341bccf4e5..25fe66d0e0 100644 --- a/cpukit/libblock/src/blkdev.c +++ b/cpukit/libblock/src/blkdev.c @@ -37,7 +37,6 @@ rtems_blkdev_generic_read( void * arg) { rtems_libio_rw_args_t *args = arg; - int block_size_log2; int block_size; char *buf; unsigned int count; @@ -51,15 +50,14 @@ rtems_blkdev_generic_read( if (dd == NULL) return RTEMS_INVALID_NUMBER; - block_size_log2 = dd->block_size_log2; block_size = dd->block_size; buf = args->buffer; count = args->count; args->bytes_moved = 0; - block = args->offset >> block_size_log2; - blkofs = args->offset & (block_size - 1); + block = args->offset / block_size; + blkofs = args->offset % block_size; while (count > 0) { @@ -97,7 +95,6 @@ rtems_blkdev_generic_write( void * arg) { rtems_libio_rw_args_t *args = arg; - int block_size_log2; uint32_t block_size; char *buf; uint32_t count; @@ -112,15 +109,14 @@ rtems_blkdev_generic_write( if (dd == NULL) return RTEMS_INVALID_NUMBER; - block_size_log2 = dd->block_size_log2; block_size = dd->block_size; buf = args->buffer; count = args->count; args->bytes_moved = 0; - block = args->offset >> block_size_log2; - blkofs = args->offset & (block_size - 1); + block = args->offset / block_size; + blkofs = args->offset % block_size; while (count > 0) { |