2 Copyright © 2010, The AROS Development Team. All rights reserved.
5 Desc: GetUnit() function.
9 #include <proto/disk.h>
10 #include <proto/exec.h>
11 #include <resources/disk.h>
13 AROS_LH1(struct DiscResourceUnit
*, GetUnit
,
14 AROS_LHA(struct DiscResourceUnit
*, unitPointer
, A1
),
15 struct DiscResource
*, DiskBase
, 3, Disk
)
19 struct DiscResourceUnit
*old
= DiskBase
->dr_Current
;
22 if (DiskBase
->dr_Flags
& DRF_ACTIVE
) {
23 AddTail(&DiskBase
->dr_Waiting
, &unitPointer
->dru_Message
.mn_Node
);
27 DiskBase
->dr_Flags
|= DRF_ACTIVE
;
28 DiskBase
->dr_Current
= unitPointer
;
29 DiskBase
->dr_CurrTask
= FindTask(0);
31 old
= DiskBase
->dr_Current
;