URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 24 |
Rev 157 |
#include <stdio.h>
|
#include <stdio.h>
|
#include <signal.h>
|
#include <signal.h>
|
|
|
#ifdef __sh__
|
#ifdef __sh__
|
#define signal(a,b) /* Signals not supported on this target - make them go away */
|
#define signal(a,b) /* Signals not supported on this target - make them go away */
|
#endif
|
#endif
|
|
|
|
|
#ifdef PROTOTYPES
|
#ifdef PROTOTYPES
|
void
|
void
|
handle_USR1 (int sig)
|
handle_USR1 (int sig)
|
{
|
{
|
}
|
}
|
#else
|
#else
|
void
|
void
|
handle_USR1 (sig)
|
handle_USR1 (sig)
|
int sig;
|
int sig;
|
{
|
{
|
}
|
}
|
#endif
|
#endif
|
|
|
int value;
|
int value;
|
|
|
#ifdef PROTOTYPES
|
#ifdef PROTOTYPES
|
int
|
int
|
main (void)
|
main (void)
|
#else
|
#else
|
int
|
int
|
main ()
|
main ()
|
#endif
|
#endif
|
{
|
{
|
int my_array[3] = { 1, 2, 3 };
|
int my_array[3] = { 1, 2, 3 };
|
|
|
value = 7;
|
value = 7;
|
|
|
#ifdef SIGUSR1
|
#ifdef SIGUSR1
|
signal (SIGUSR1, handle_USR1);
|
signal (SIGUSR1, handle_USR1);
|
#endif
|
#endif
|
|
|
printf ("value is %d\n", value);
|
printf ("value is %d\n", value);
|
printf ("my_array[2] is %d\n", my_array[2]);
|
printf ("my_array[2] is %d\n", my_array[2]);
|
|
|
{
|
{
|
int i;
|
int i;
|
for (i = 0; i < 5; i++)
|
for (i = 0; i < 5; i++)
|
value++;
|
value++;
|
}
|
}
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.