Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / libs / realtime / findconductor.c
blobdc53002f591b27b38cdff874d26d85e4bfe24820
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
8 #include <proto/exec.h>
9 #include "realtime_intern.h"
11 /*****************************************************************************
13 NAME */
14 #include <libraries/realtime.h>
16 AROS_LH1(struct Conductor *, FindConductor,
18 /* SYNOPSIS */
20 AROS_LHA(STRPTR, name, A0),
22 /* LOCATION */
24 struct Library *, RealTimeBase, 13, RealTime)
26 /* FUNCTION
28 Get the conductor with name 'name' or NULL if no conductor exists
29 with that name.
31 INPUTS
33 name -- The name of the conductor to find.
35 RESULT
37 A pointer to the conductor you wanted or NULL if it didn't exist.
39 NOTES
41 You have to lock the conductors with LockRealTime(RT_CONDUCTORS)
42 before calling this function.
44 EXAMPLE
46 BUGS
48 SEE ALSO
50 NextConductor(), LockRealTime(), UnlockRealTime()
52 INTERNALS
54 HISTORY
56 26.7.99 SDuvan implemented
58 ******************************************************************************/
61 AROS_LIBFUNC_INIT
63 struct Conductor *conductor = (struct Conductor *)
64 FindName((struct List *)&GPB(RealTimeBase)->rtb_ConductorList, name);
66 if (conductor == NULL)
68 return NULL;
71 if (conductor->cdt_Flags & CONDUCTF_PRIVATE)
73 return NULL;
76 return conductor;
78 AROS_LIBFUNC_EXIT
79 } /* FindConductor */