OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gdb/] [gdb-6.8/] [gdb-6.8.openrisc-2.1/] [gdb/] [testsuite/] [gdb.base/] [interrupt.c] - Diff between revs 24 and 33

Only display areas with differences | Details | Blame | View Log

Rev 24 Rev 33
#include <errno.h>
#include <errno.h>
#include <stdio.h>
#include <stdio.h>
#include <unistd.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdlib.h>
int
int
main ()
main ()
{
{
  char x;
  char x;
  int nbytes;
  int nbytes;
#ifdef usestubs
#ifdef usestubs
  set_debug_traps();
  set_debug_traps();
  breakpoint();
  breakpoint();
#endif
#endif
  printf ("talk to me baby\n");
  printf ("talk to me baby\n");
  while (1)
  while (1)
    {
    {
      nbytes = read (0, &x, 1);
      nbytes = read (0, &x, 1);
      if (nbytes < 0)
      if (nbytes < 0)
        {
        {
#ifdef EINTR
#ifdef EINTR
          if (errno != EINTR)
          if (errno != EINTR)
#endif
#endif
            perror ("");
            perror ("");
        }
        }
      else if (nbytes == 0)
      else if (nbytes == 0)
        {
        {
          printf ("end of file\n");
          printf ("end of file\n");
          exit (0);
          exit (0);
        }
        }
      else
      else
        write (1, &x, 1);
        write (1, &x, 1);
    }
    }
  return 0;
  return 0;
}
}
 
 
int
int
func1 ()
func1 ()
{
{
  return 4;
  return 4;
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.