2 Copyright © 1995-2007, 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 ******************************************************************************/
58 if (messageport
!= NULL
)
60 ObtainSemaphore(&(WorkbenchBase
->wb_WorkbenchPortSemaphore
));
62 if (WorkbenchBase
->wb_WorkbenchPort
== messageport
)
64 WorkbenchBase
->wb_WorkbenchPort
= NULL
;
68 ReleaseSemaphore(&(WorkbenchBase
->wb_WorkbenchPortSemaphore
));
74 } /* UnregisterWorkbench() */