OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [gdb/] [testsuite/] [gdb.base/] [interrupt.c] - Blame information for rev 157

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 jeremybenn
#include <errno.h>
2
#include <stdio.h>
3
#include <unistd.h>
4
#include <stdlib.h>
5
int
6
main ()
7
{
8
  char x;
9
  int nbytes;
10
#ifdef usestubs
11
  set_debug_traps();
12
  breakpoint();
13
#endif
14
  printf ("talk to me baby\n");
15
  while (1)
16
    {
17
      nbytes = read (0, &x, 1);
18
      if (nbytes < 0)
19
        {
20
#ifdef EINTR
21
          if (errno != EINTR)
22
#endif
23
            perror ("");
24
        }
25
      else if (nbytes == 0)
26
        {
27
          printf ("end of file\n");
28
          exit (0);
29
        }
30
      else
31
        write (1, &x, 1);
32
    }
33
  return 0;
34
}
35
 
36
int
37
func1 ()
38
{
39
  return 4;
40
}

powered by: WebSVN 2.1.0

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