Changeset cec5c069 in rtems for cpukit/libblock
- Timestamp:
- 08/21/08 16:17:35 (16 years ago)
- Branches:
- 4.10, 4.11, 4.9, 5, master
- Children:
- 21c9770
- Parents:
- d9be8024
- Location:
- cpukit/libblock
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libblock/include/rtems/bdbuf.h
rd9be8024 rcec5c069 87 87 typedef struct rtems_bdbuf_pool 88 88 { 89 intblksize; /*< The size of the blocks (in bytes) */90 intnblks; /*< Number of blocks in this pool */89 uint32_t blksize; /*< The size of the blocks (in bytes) */ 90 uint32_t nblks; /*< Number of blocks in this pool */ 91 91 92 92 uint32_t flags; /*< Configuration flags */ … … 145 145 */ 146 146 typedef struct rtems_bdbuf_config { 147 intmax_read_ahead_blocks; /*< Number of blocks to read ahead. */148 intmax_write_blocks; /*< Number of blocks to write at once. */147 uint32_t max_read_ahead_blocks; /*< Number of blocks to read ahead. */ 148 uint32_t max_write_blocks; /*< Number of blocks to write at once. */ 149 149 rtems_task_priority swapout_priority; /*< Priority of the swap out task. */ 150 150 uint32_t swapout_period; /*< Period swapout checks buf timers. */ … … 318 318 */ 319 319 rtems_status_code 320 rtems_bdbuf_find_pool ( int block_size, rtems_bdpool_id *pool);320 rtems_bdbuf_find_pool (uint32_t block_size, rtems_bdpool_id *pool); 321 321 322 322 /** -
cpukit/libblock/include/rtems/diskdevs.h
rd9be8024 rcec5c069 48 48 int uses; /* Use counter. Device couldn't be 49 49 removed if it is in use. */ 50 intstart; /* Starting block number (0 for50 uint32_t start; /* Starting block number (0 for 51 51 physical devices, block offset 52 52 on the related physical device 53 53 for logical device) */ 54 intsize; /* Size of physical or logical disk54 uint32_t size; /* Size of physical or logical disk 55 55 in disk blocks */ 56 intblock_size; /* Size of device block (minimum56 uint32_t block_size; /* Size of device block (minimum 57 57 transfer unit) in bytes 58 58 (must be power of 2) */ 59 intblock_size_log2; /* log2 of block_size */59 uint32_t block_size_log2; /* log2 of block_size */ 60 60 rtems_bdpool_id pool; /* Buffer pool assigned to this 61 61 device */ -
cpukit/libblock/src/bdbuf.c
rd9be8024 rcec5c069 928 928 rtems_bdbuf_buffer* bd; 929 929 rtems_status_code sc; 930 intb;930 uint32_t b; 931 931 932 932 pool = rtems_bdbuf_get_pool (pid); … … 1297 1297 { 1298 1298 rtems_chain_node* node = rtems_chain_head (&pool->modified); 1299 intwrite_blocks = 0;1299 uint32_t write_blocks = 0; 1300 1300 1301 1301 node = node->next; … … 1528 1528 rtems_bdbuf_pool* pool; 1529 1529 rtems_bdbuf_buffer* bd = NULL; 1530 intread_ahead_count;1530 uint32_t read_ahead_count; 1531 1531 rtems_blkdev_request* req; 1532 1532 … … 1640 1640 * of the bdbuf code. 1641 1641 */ 1642 int result;1643 int b;1642 int result; 1643 uint32_t b; 1644 1644 1645 1645 rtems_bdbuf_unlock_pool (pool); … … 2043 2043 * calls sets the dev to use. 2044 2044 */ 2045 if (*dev == -1)2045 if (*dev == (dev_t)-1) 2046 2046 *dev = bd->dev; 2047 2047 … … 2236 2236 { 2237 2237 int result; 2238 int b;2238 uint32_t b; 2239 2239 2240 2240 /* … … 2436 2436 */ 2437 2437 rtems_status_code 2438 rtems_bdbuf_find_pool ( int block_size, rtems_bdpool_id *pool)2438 rtems_bdbuf_find_pool (uint32_t block_size, rtems_bdpool_id *pool) 2439 2439 { 2440 2440 rtems_bdbuf_pool* p; … … 2442 2442 rtems_bdpool_id curid = -1; 2443 2443 rtems_boolean found = FALSE; 2444 int cursize =INT_MAX;2444 uint32_t cursize = UINT_MAX; 2445 2445 int j; 2446 2446 -
cpukit/libblock/src/blkdev.c
rd9be8024 rcec5c069 59 59 { 60 60 rtems_bdbuf_buffer *diskbuf; 61 intcopy;62 rtems_status_code rc;61 uint32_t copy; 62 rtems_status_code rc; 63 63 64 64 rc = rtems_bdbuf_read(dev, block, &diskbuf); … … 92 92 { 93 93 rtems_libio_rw_args_t *args = arg; 94 int block_size_log2;95 intblock_size;94 int block_size_log2; 95 uint32_t block_size; 96 96 char *buf; 97 u nsigned intcount;98 u nsigned intblock;99 u nsigned intblkofs;97 uint32_t count; 98 uint32_t block; 99 uint32_t blkofs; 100 100 dev_t dev; 101 101 rtems_status_code rc; … … 120 120 { 121 121 rtems_bdbuf_buffer *diskbuf; 122 intcopy;122 uint32_t copy; 123 123 124 124 if ((blkofs == 0) && (count >= block_size)) -
cpukit/libblock/src/diskdevs.c
rd9be8024 rcec5c069 26 26 typedef struct rtems_disk_device_table { 27 27 rtems_disk_device **minor; /* minor-indexed disk device table */ 28 intsize; /* Number of entries in the table */28 uint32_t size; /* Number of entries in the table */ 29 29 } rtems_disk_device_table; 30 30 … … 33 33 34 34 /* Number of allocated entries in disktab table */ 35 static int disktab_size;35 static uint32_t disktab_size; 36 36 37 37 /* Mutual exclusion semaphore for disk devices table */ … … 77 77 { 78 78 rtems_disk_device_table *p; 79 int newsize;80 int i;79 uint32_t newsize; 80 uint32_t i; 81 81 newsize = disktab_size * 2; 82 82 if (major >= newsize) … … 98 98 (minor >= disktab[major].size)) 99 99 { 100 intnewsize;100 uint32_t newsize; 101 101 rtems_disk_device **p; 102 inti;103 ints = disktab[major].size;102 uint32_t i; 103 uint32_t s = disktab[major].size; 104 104 105 105 if (s == 0) -
cpukit/libblock/src/ramdisk.c
rd9be8024 rcec5c069 47 47 48 48 static struct ramdisk *ramdisk; 49 static intnramdisks;49 static uint32_t nramdisks; 50 50 51 51 #if RTEMS_RAMDISK_TRACE … … 104 104 for (i = 0; (remains > 0) && (i < req->bufnum); i++, sg++) 105 105 { 106 int count = sg->length;106 uint32_t count = sg->length; 107 107 from = ((char *)rd->area + (sg->block * rd->block_size)); 108 108 if (count > remains) … … 144 144 for (i = 0; (remains > 0) && (i < req->bufnum); i++, sg++) 145 145 { 146 int count = sg->length;146 uint32_t count = sg->length; 147 147 to = ((char *)rd->area + (sg->block * rd->block_size)); 148 148 if (count > remains)
Note: See TracChangeset
for help on using the changeset viewer.