Changeset e89a06a in mainline for uspace/srv/volsrv/types/part.h


Ignore:
Timestamp:
2018-07-06T22:13:20Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
be0f5e4
Parents:
6419c6e
Message:

Encapsulate partitions list in volume server. (Global state is not good coding practice.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/volsrv/types/part.h

    r6419c6e re89a06a  
    4040#include <adt/list.h>
    4141#include <atomic.h>
     42#include <fibril_synch.h>
    4243#include <stdbool.h>
    4344#include <types/label.h>
     
    4546/** Partition */
    4647typedef struct {
     48        /** Containing partition list */
     49        struct vol_parts *parts;
    4750        /** Link to vol_parts */
    4851        link_t lparts;
     
    6568} vol_part_t;
    6669
     70/** Partitions */
     71typedef struct vol_parts {
     72        /** Synchronize access to list of partitions */
     73        fibril_mutex_t lock;
     74        /** Partitions (list of vol_part_t) */
     75        list_t parts;
     76} vol_parts_t;
     77
    6778#endif
    6879
Note: See TracChangeset for help on using the changeset viewer.