to milliseconds.
+2006-03-16 Kevin Buettner <kevinb@redhat.com>
+
+ * include/gdbloop.h (gdbloop, gdbloop_poll): Revise comments
+ to indicate that timeout granulatiry is now in milliseconds
+ rather than seconds.
+ * lib/gdbloop.c (poll_gdbsocket): Change ``timeout'' granulatiry
+ from seconds to milliseconds.
+
2005-03-03 Kevin Buettner <kevinb@redhat.com>
* lib/crc32.h, lib/crc32.c: New files.
/* Really simple minded event-loop. Assumes that the target is using
both gdbsocket* and gdbsched* to implement things. If TIMEOUT is
- negative, block infinitely. If TIMEOUT is zero, don't block. */
+ negative, block infinitely. If TIMEOUT is zero, don't block.
+ Otherwise, a positive timeout represents the time in milliseconds
+ to wait. */
void gdbloop (long current_time, int timeout);
-/* Even more simple minded event-loop. Assumes that everything is in
- units of one second. Calls gdbloop() above, using time() for
- CURRENT_TIME. */
+/* An even more simple minded event-loop. Calls gdbloop()
+ above, using time() for CURRENT_TIME. TIMEOUT is as above
+ in which a negative TIMEOUT will block indefinitely, a zero
+ timeout won't block at all, and a positive TIMEOUT will
+ block for (at most) the specified number of milliseconds. */
void gdbloop_poll (int timeout);
}
static void
-poll_gdbsocket (long timeout)
+poll_gdbsocket (long timeout /* in milliseconds */)
{
int s;
struct fds fds;
if (timeout >= 0)
{
struct timeval timeval;
- timeval.tv_sec = timeout;
- timeval.tv_usec = 0;
+ timeval.tv_sec = timeout / 1000;
+ timeval.tv_usec = (timeout % 1000) * 1000;
s = select (fds.nr, &fds.read, &fds.write, NULL, &timeval);
}
else
+2006-03-16 Kevin Buettner <kevinb@redhat.com>
+
+ * server.c (main): Change polling interval for gdbloop_poll()
+ from one second to ten milliseconds.
+
2005-12-07 Kevin Buettner <kevinb@redhat.com>
* ptrace-target.c (ptrace_compute_signal, ptrace_process_signal):
/* Poll for socket traffic. */
while (! server_quit_p)
{
- gdbloop_poll (1 /* second */);
+ gdbloop_poll (10 /* milliseconds */);
if (! server_quit_p)
{
if (gdbserver.check_child_state (process))
+2006-03-16 Kevin Buettner <kevinb@redhat.com>
+
+ * server.c (main): Revise comment to indicate that polling
+ granularity is milliseconds.
+
2004-12-09 Jim Blandy <jimb@redhat.com>
* configure.in: Remove nonsense test.
/* Poll for socket traffic. */
while (! process->quit_server ())
{
- gdbloop_poll (0 /* second */);
+ gdbloop_poll (0 /* milliseconds */);
if (process->check_state ())
{
switch (process->status ())