Changeset 98000fb in mainline for kernel/generic/src/ddi


Ignore:
Timestamp:
2009-06-03T19:34:45Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
301ff30
Parents:
69e68e3
Message:

remove redundant index_t and count_t types (which were always quite ambiguous and not actually needed)

Location:
kernel/generic/src/ddi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ddi/ddi.c

    r69e68e3 r98000fb  
    9898 *
    9999 */
    100 static int ddi_physmem_map(uintptr_t pf, uintptr_t vp, count_t pages, int flags)
     100static int ddi_physmem_map(uintptr_t pf, uintptr_t vp, size_t pages, int flags)
    101101{
    102102        ASSERT(TASK);
     
    119119        /* Find the zone of the physical memory */
    120120        spinlock_lock(&zones.lock);
    121         count_t znum = find_zone(ADDR2PFN(pf), pages, 0);
    122        
    123         if (znum == (count_t) -1) {
     121        size_t znum = find_zone(ADDR2PFN(pf), pages, 0);
     122       
     123        if (znum == (size_t) -1) {
    124124                /* Frames not found in any zones
    125125                 * -> assume it is hardware device and allow mapping
     
    243243        return (unative_t) ddi_physmem_map(ALIGN_DOWN((uintptr_t) phys_base,
    244244            FRAME_SIZE), ALIGN_DOWN((uintptr_t) virt_base, PAGE_SIZE),
    245             (count_t) pages, (int) flags);
     245            (size_t) pages, (int) flags);
    246246}
    247247
  • kernel/generic/src/ddi/irq.c

    r69e68e3 r98000fb  
    100100 * there will be collisions between different keys.
    101101 */
    102 static index_t irq_ht_hash(unative_t *key);
    103 static bool irq_ht_compare(unative_t *key, count_t keys, link_t *item);
     102static size_t irq_ht_hash(unative_t *key);
     103static bool irq_ht_compare(unative_t *key, size_t keys, link_t *item);
    104104static void irq_ht_remove(link_t *item);
    105105
     
    116116 * elements with single key (sharing of one IRQ).
    117117 */
    118 static index_t irq_lin_hash(unative_t *key);
    119 static bool irq_lin_compare(unative_t *key, count_t keys, link_t *item);
     118static size_t irq_lin_hash(unative_t *key);
     119static bool irq_lin_compare(unative_t *key, size_t keys, link_t *item);
    120120static void irq_lin_remove(link_t *item);
    121121
     
    127127
    128128/** Number of buckets in either of the hash tables. */
    129 static count_t buckets;
     129static size_t buckets;
    130130
    131131/** Initialize IRQ subsystem.
     
    134134 * @param chains Number of chains in the hash table.
    135135 */
    136 void irq_init(count_t inrs, count_t chains)
     136void irq_init(size_t inrs, size_t chains)
    137137{
    138138        buckets = chains;
     
    299299 * @return Index into the hash table.
    300300 */
    301 index_t irq_ht_hash(unative_t key[])
     301size_t irq_ht_hash(unative_t key[])
    302302{
    303303        inr_t inr = (inr_t) key[KEY_INR];
     
    325325 * @return True on match or false otherwise.
    326326 */
    327 bool irq_ht_compare(unative_t key[], count_t keys, link_t *item)
     327bool irq_ht_compare(unative_t key[], size_t keys, link_t *item)
    328328{
    329329        irq_t *irq = hash_table_get_instance(item, irq_t, link);
     
    372372 * @return Index into the hash table.
    373373 */
    374 index_t irq_lin_hash(unative_t key[])
     374size_t irq_lin_hash(unative_t key[])
    375375{
    376376        inr_t inr = (inr_t) key[KEY_INR];
     
    398398 * @return True on match or false otherwise.
    399399 */
    400 bool irq_lin_compare(unative_t key[], count_t keys, link_t *item)
     400bool irq_lin_compare(unative_t key[], size_t keys, link_t *item)
    401401{
    402402        irq_t *irq = list_get_instance(item, irq_t, link);
Note: See TracChangeset for help on using the changeset viewer.