#ifndef DEFINES_DISK_H
#define DEFINES_DISK_H

/*
    *** Automatically generated from '/data/deadwood/gitAROS/AROS/rom/disk/disk.conf'. Edits will be lost. ***
    Copyright © 1995-2011, The AROS Development Team. All rights reserved.
*/

/*
    Desc: Defines for disk
*/

#include <aros/libcall.h>
#include <exec/types.h>
#include <aros/symbolsets.h>
#include <aros/preprocessor/variadic/cast2iptr.hpp>

__BEGIN_DECLS


#define __AllocUnit_WB(__DiskBase, __arg1) ({\
        AROS_LC1(BOOL, AllocUnit, \
                  AROS_LCA(LONG,(__arg1),D0), \
        struct Library *, (__DiskBase), 1, Disk);\
})

#define AllocUnit(arg1) \
    __AllocUnit_WB(DiskBase, (arg1))

#define __FreeUnit_WB(__DiskBase, __arg1) ({\
        AROS_LC1NR(void, FreeUnit, \
                  AROS_LCA(LONG,(__arg1),D0), \
        struct Library *, (__DiskBase), 2, Disk);\
})

#define FreeUnit(arg1) \
    __FreeUnit_WB(DiskBase, (arg1))

#define __GetUnit_WB(__DiskBase, __arg1) ({\
        AROS_LC1(struct DiscResourceUnit*, GetUnit, \
                  AROS_LCA(struct DiscResourceUnit *,(__arg1),A1), \
        struct Library *, (__DiskBase), 3, Disk);\
})

#define GetUnit(arg1) \
    __GetUnit_WB(DiskBase, (arg1))

#define __GiveUnit_WB(__DiskBase) ({\
        AROS_LC0NR(void, GiveUnit, \
        struct Library *, (__DiskBase), 4, Disk);\
})

#define GiveUnit() \
    __GiveUnit_WB(DiskBase)

#define __GetUnitID_WB(__DiskBase, __arg1) ({\
        AROS_LC1(ULONG, GetUnitID, \
                  AROS_LCA(LONG,(__arg1),D0), \
        struct Library *, (__DiskBase), 5, Disk);\
})

#define GetUnitID(arg1) \
    __GetUnitID_WB(DiskBase, (arg1))

#define __ReadUnitID_WB(__DiskBase, __arg1) ({\
        AROS_LC1(ULONG, ReadUnitID, \
                  AROS_LCA(LONG,(__arg1),D0), \
        struct Library *, (__DiskBase), 6, Disk);\
})

#define ReadUnitID(arg1) \
    __ReadUnitID_WB(DiskBase, (arg1))

__END_DECLS

#endif /* DEFINES_DISK_H*/
