2 Copyright © 2010, The AROS Development Team. All rights reserved.
5 Desc: GiveUnit() function.
9 #include <proto/disk.h>
10 #include <proto/exec.h>
11 #include <resources/disk.h>
13 AROS_LH0(void, GiveUnit
,
14 struct DiscResource
*, DiskBase
, 4, Disk
)
18 struct Task
*thistask
= FindTask(0);
19 struct DiscResourceUnit
*dru
;
22 if (DiskBase
->dr_CurrTask
== thistask
) {
23 DiskBase
->dr_CurrTask
= NULL
;
24 DiskBase
->dr_Flags
&= ~DRF_ACTIVE
;
25 dru
= (struct DiscResourceUnit
*)RemHead(&DiskBase
->dr_Waiting
);
28 ReplyMsg(&dru
->dru_Message
);