revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / camd / startclusternotify.c
blob7cd906b6582ba56439b3fdc97755a49ae493c504
1 /*
2 Copyright © 1995-2007, 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"
13 /*****************************************************************************
15 NAME */
17 AROS_LH1(void, StartClusterNotify,
19 /* SYNOPSIS */
20 AROS_LHA(struct ClusterNotifyNode *,cn,A0),
22 /* LOCATION */
23 struct CamdBase *, CamdBase, 37, Camd)
25 /* FUNCTION
26 void StartClusterNotify(struct ClusterNotifyNode *cn)
28 INPUTS
29 pointer to initialized ClusterNotifyNode structure
31 RESULT
32 void
34 NOTES
35 ClusterNotifyNode structure must remain valid until EndClusterNotify();
36 Will only signal added and removed clusters, not internal state changes.
38 EXAMPLE
39 struct ClusterNotifyNode cnn;
41 cnn.cnn_Task=IExec->FindTask(NULL);
42 cnn.cnn_SigBit=IExec->AllocSignal(-1);
43 StartClusterNotify(&cnn);
45 somewhere down the line...
47 Wait(1L<<cnn.cnn_SigBit)
48 printf("Cluster Changes have happened\n");
50 BUGS
52 SEE ALSO
53 EndClusterNotify()
55 INTERNALS
57 HISTORY
59 2001-01-12 ksvalast first created
60 2005-05-07 Lyle Hazelwood first implemented.
62 *****************************************************************************/
64 AROS_LIBFUNC_INIT
66 if(cn == NULL) return;
67 AddTail(&CB(CamdBase)->clusnotifynodes,(struct Node *)&cn->cnn_Node);
68 return;
70 AROS_LIBFUNC_EXIT