2012-06-11 Pedro Alves <palves@redhat.com>
authorPedro Alves <palves@redhat.com>
Mon, 11 Jun 2012 20:36:53 +0000 (20:36 +0000)
committerPedro Alves <palves@redhat.com>
Mon, 11 Jun 2012 20:36:53 +0000 (20:36 +0000)
commitddefb60ff89becf2b18d0cf7930358320c6ec0e6
tree88f0794b9680f0b82c2def63d8ebb4794c309b58
parentd5ad6aa5ce9ef3812c344bfebfb27bda36d8cb46
2012-06-11  Pedro Alves  <palves@redhat.com>

* ser-base.c (run_async_handler_and_reschedule): New.
(fd_event, push_event): Use it.
* serial.c (serial_open, serial_fdopen_ops): Set the initial
reference count to 1.
(do_serial_close): Set the bufp field to NULL.  Use serial_unref
instead of xfree.
(serial_is_open, serial_ref, serial_unref): New.
* serial.h (serial_open): Adjust comment.
(serial_is_open): Declare.
(serial_close): Adjust comment.
(serial_ref, serial_unref) Declare.
(struct serial): New field 'refcnt'.
gdb/ChangeLog
gdb/ser-base.c
gdb/serial.c
gdb/serial.h