use dmb/dsb from asm/cpu.h file.
[AROS.git] / workbench / libs / muiscreen / closepubscreen.c
blobf0ee50ad070bf17ba90e9416ae38206535f18c77
1 /*
2 Copyright © 2009-2011, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <libraries/muiscreen.h>
7 #include <proto/intuition.h>
8 #include <intuition/screens.h>
9 #include <proto/intuition.h>
10 #include <proto/exec.h>
11 #include <exec/lists.h>
12 #include <string.h>
13 #define DEBUG 1
14 #include <aros/debug.h>
16 #include "muiscreen_intern.h"
18 /*****************************************************************************
20 NAME */
21 #include <proto/muiscreen.h>
23 AROS_LH1(BOOL, MUIS_ClosePubScreen,
25 /* SYNOPSIS */
26 AROS_LHA(char *, name, A0),
28 /* LOCATION */
29 struct MUIScreenBase_intern *, MUIScreenBase, 8, MUIScreen)
31 /* FUNCTION
33 INPUTS
35 RESULT
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
45 INTERNALS
47 ******************************************************************************/
50 AROS_LIBFUNC_INIT
52 struct List *pubscrlist;
53 struct PubScreenNode *pubscrnode;
54 BOOL found = FALSE;
55 BOOL retval = FALSE;
57 D(bug("MUIS_ClosePubScreen(%s)\n", name));
59 pubscrlist = LockPubScreenList();
60 ForeachNode(pubscrlist, pubscrnode)
62 if(strcmp(pubscrnode->psn_Node.ln_Name, name) == 0)
64 found = TRUE;
65 break;
68 UnlockPubScreenList();
70 if(found)
72 PubScreenStatus(pubscrnode->psn_Screen, PSNF_PRIVATE);
73 CloseScreen(pubscrnode->psn_Screen);
75 struct Node *node;
76 ForeachNode(&MUIScreenBase->clients, node)
78 struct MUIS_InfoClient *client = (struct MUIS_InfoClient*) node;
79 Signal(client->task, client->sigbit);
82 retval = TRUE;
85 return retval;
87 AROS_LIBFUNC_EXIT