grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / camd / unlinkmidilink.c
blob32ecab7f88b890831207b8501791a82cc36d5bf8
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #include <proto/exec.h>
11 #include "camd_intern.h"
14 /*
15 CLSemaphore must be exlusive obtained first.
18 void UnlinkMidiLink(
19 struct MidiLink *midilink,
20 BOOL unlinkfromnode,
21 struct CamdBase *CamdBase
23 struct MidiCluster *cluster=midilink->ml_Location;
24 int type=midilink->ml_Node.ln_Type;
25 struct MyMidiCluster *mycluster=(struct MyMidiCluster *)cluster;
27 if(cluster!=NULL){
28 if(type==NT_USER-MLTYPE_Receiver){
29 ObtainSemaphore(&mycluster->semaphore);
31 Remove(&midilink->ml_Node);
34 if(unlinkfromnode==TRUE){
35 Remove((struct Node *)&midilink->ml_OwnerNode);
38 if(cluster!=NULL){
39 if(type==NT_USER-MLTYPE_Receiver){
40 ReleaseSemaphore(&mycluster->semaphore);
42 LinkHasBeenRemovedFromCluster(cluster,CamdBase);