On MS-Windows, define _WIN32_WINNT in a single common place.
[deliverable/binutils-gdb.git] / gdb / gdbserver / notif.h
index c714e7bc7843d80c2970eb2f35b8c780689c4017..c0525126fdc8703c83a63ff66fa3ce25d7333f61 100644 (file)
@@ -1,5 +1,5 @@
 /* Notification to GDB.
-   Copyright (C) 1989-2013 Free Software Foundation, Inc.
+   Copyright (C) 1989-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include "ptid.h"
-#include "server.h"
+#ifndef GDBSERVER_NOTIF_H
+#define GDBSERVER_NOTIF_H
+
 #include "target.h"
-#include "queue.h"
+#include <list>
 
 /* Structure holding information related to a single event.  We
    keep a queue of these to push to GDB.  It can be extended if
    the event of given notification contains more information.  */
 
-typedef struct notif_event
+struct notif_event
 {
-  /* C requires that a struct or union has at least one member.  */
-  char dummy;
-} *notif_event_p;
+  virtual ~notif_event ()
+  {
+  }
 
-DECLARE_QUEUE_P (notif_event_p);
+  /* No payload needed.  */
+};
 
 /* A type notification to GDB.  An object of 'struct notif_server'
    represents a type of notification.  */
@@ -48,7 +50,7 @@ typedef struct notif_server
   /* A queue of events to GDB.  A new notif_event can be enque'ed
      into QUEUE at any appropriate time, and the notif_reply is
      deque'ed only when the ack from GDB arrives.  */
-  QUEUE (notif_event_p) *queue;
+  std::list<notif_event *> queue;
 
   /* Write event EVENT to OWN_BUF.  */
   void (*write) (struct notif_event *event, char *own_buf);
@@ -63,4 +65,4 @@ void notif_push (struct notif_server *np, struct notif_event *event);
 void notif_event_enque (struct notif_server *notif,
                        struct notif_event *event);
 
-void initialize_notif (void);
+#endif /* GDBSERVER_NOTIF_H */
This page took 0.024858 seconds and 4 git commands to generate.