2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 #include "workbench_intern.h"
7 #include <workbench/workbench.h>
9 /*****************************************************************************
13 #include <proto/workbench.h>
15 AROS_LH1(BOOL
, UnregisterWorkbench
,
18 AROS_LHA(struct MsgPort
*, messageport
, A0
),
22 struct WorkbenchBase
*, WorkbenchBase
, 24, Workbench
)
25 The workbench application uses this functions to unregister itself
26 with the library. When it is done, messages will no longer be sent.
29 msgport - The message port of that was earlier passed in to
33 TRUE if the message port was successfully unregistered, FALSE otherwise.
34 The unregistration will fail if the message port isn't the same that
35 was passed in with RegisterWorkbench() earlier or if the passed
39 Note that "Workbench Application" in this context means the program that
40 is the file manager and handles the GUI of Workbench, not a program that
41 is started from Workbench!
52 ******************************************************************************/
55 AROS_LIBBASE_EXT_DECL(struct WorkbenchBase
*, WorkbenchBase
)
59 if (messageport
!= NULL
)
61 ObtainSemaphore(&(WorkbenchBase
->wb_WorkbenchPortSemaphore
));
63 if (WorkbenchBase
->wb_WorkbenchPort
== messageport
)
65 WorkbenchBase
->wb_WorkbenchPort
= NULL
;
69 ReleaseSemaphore(&(WorkbenchBase
->wb_WorkbenchPortSemaphore
));
75 } /* UnregisterWorkbench() */