Changeset 5cf723b in mainline


Ignore:
Timestamp:
2008-10-28T10:49:54Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7858bc5f
Parents:
b0247bac
Message:

Need to have more stuff in block_t.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libblock/libblock.h

    rb0247bac r5cf723b  
    4040#include <stdint.h>
    4141#include "../../srv/vfs/vfs.h"
     42#include <futex.h>
     43#include <rwlock.h>
     44#include <libadt/hash_table.h>
     45#include <libadt/list.h>
    4246
    4347typedef struct block {
     48        /** Futex protecting the reference count. */
     49        futex_t lock;
     50        /** Number of references to the block_t structure. */
     51        unsigned refcnt;
     52        /** If true, the block needs to be written back to the block device. */
     53        bool dirty;
     54        /** Readers / Writer lock protecting the contents of the block. */
     55        rwlock_t contents_lock;
     56        /** Handle of the device where the block resides. */
     57        dev_handle_t dev_handle;
     58        /** Block offset on the block device. Counted in 'size'-byte blocks. */
     59        off_t boff;
     60        /** Size of the block. */
     61        size_t size;
     62        /** Link for placing the block into the free block list. */
     63        link_t free_link;
     64        /** Link for placing the block into the block hash table. */
     65        link_t hash_link;
     66        /** Buffer with the block data. */
    4467        void *data;
    45         size_t size;
    46         bool dirty;
    4768} block_t;
    4869
Note: See TracChangeset for help on using the changeset viewer.