Changeset 925a21e in mainline for uspace/lib/block/libblock.h
- Timestamp:
- 2011-09-24T14:20:29Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5bf76c1
- Parents:
- 867e2555 (diff), 1ab4aca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/block/libblock.h
r867e2555 r925a21e 1 1 /* 2 2 * Copyright (c) 2008 Jakub Jermar 3 * Copyright (c) 2008 Martin Decky 4 * Copyright (c) 2011 Martin Sucha 3 * Copyright (c) 2008 Martin Decky 4 * Copyright (c) 2011 Martin Sucha 5 5 * All rights reserved. 6 6 * … … 73 73 /** Readers / Writer lock protecting the contents of the block. */ 74 74 fibril_rwlock_t contents_lock; 75 /** Handle of the device where the block resides. */76 devmap_handle_t devmap_handle;75 /** Service ID of service providing the block device. */ 76 service_id_t service_id; 77 77 /** Logical block address */ 78 78 aoff64_t lba; … … 97 97 }; 98 98 99 extern int block_init(exch_mgmt_t, devmap_handle_t, size_t); 100 extern void block_fini(devmap_handle_t); 99 typedef struct { 100 uint16_t size; 101 uint8_t first_session; 102 uint8_t last_session; 103 104 uint8_t res0; 105 uint8_t adr_ctrl; 106 uint8_t first_track; 107 uint8_t res1; 108 109 uint32_t first_lba; 110 } __attribute__((packed)) toc_block_t; 101 111 102 extern int block_ bb_read(devmap_handle_t, aoff64_t);103 extern void *block_bb_get(devmap_handle_t);112 extern int block_init(exch_mgmt_t, service_id_t, size_t); 113 extern void block_fini(service_id_t); 104 114 105 extern int block_ cache_init(devmap_handle_t, size_t, unsigned, enum cache_mode);106 extern int block_cache_fini(devmap_handle_t);115 extern int block_bb_read(service_id_t, aoff64_t); 116 extern void *block_bb_get(service_id_t); 107 117 108 extern int block_get(block_t **, devmap_handle_t, aoff64_t, int); 118 extern int block_cache_init(service_id_t, size_t, unsigned, enum cache_mode); 119 extern int block_cache_fini(service_id_t); 120 121 extern int block_get(block_t **, service_id_t, aoff64_t, int); 109 122 extern int block_put(block_t *); 110 123 111 extern int block_seqread( devmap_handle_t, size_t *, size_t *, aoff64_t *, void *,124 extern int block_seqread(service_id_t, size_t *, size_t *, aoff64_t *, void *, 112 125 size_t); 113 126 114 extern int block_get_bsize(devmap_handle_t, size_t *); 115 extern int block_get_nblocks(devmap_handle_t, aoff64_t *); 116 extern int block_read_direct(devmap_handle_t, aoff64_t, size_t, void *); 117 extern int block_read_bytes_direct(devmap_handle_t, aoff64_t, size_t, void *); 118 extern int block_write_direct(devmap_handle_t, aoff64_t, size_t, const void *); 127 extern int block_get_bsize(service_id_t, size_t *); 128 extern int block_get_nblocks(service_id_t, aoff64_t *); 129 extern toc_block_t *block_get_toc(service_id_t, uint8_t); 130 extern int block_read_direct(service_id_t, aoff64_t, size_t, void *); 131 extern int block_read_bytes_direct(service_id_t, aoff64_t, size_t, void *); 132 extern int block_write_direct(service_id_t, aoff64_t, size_t, const void *); 119 133 120 134 #endif … … 122 136 /** @} 123 137 */ 124
Note:
See TracChangeset
for help on using the changeset viewer.