1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #151 from LudwigOrtmann/issue_147

fixes Issue 147
This commit is contained in:
Christian Mehlis 2013-08-21 14:29:59 -07:00
commit c5737312c2
6 changed files with 14 additions and 8 deletions

View File

@ -210,7 +210,10 @@ void hwtimer_arch_set_absolute(unsigned long value, short timer)
{
DEBUG("hwtimer_arch_set_absolute(%lu, %i)\n", value, timer);
value -= native_hwtimer_now;
return(hwtimer_arch_set(value, timer));
hwtimer_arch_set(value, timer);
return;
}
unsigned long hwtimer_arch_now(void)

View File

@ -52,7 +52,7 @@ void eINT(void);
/**
* register interrupt handler handler for interrupt sig
*/
int register_interrupt(int sig, void *handler);
int register_interrupt(int sig, void (*handler)(void));
/**
* unregister interrupt handler for interrupt sig

View File

@ -358,7 +358,7 @@ void native_isr_entry(int sig, siginfo_t *info, void *context)
* TODO: use appropriate data structure for signal
* handlers.
*/
int register_interrupt(int sig, void *handler)
int register_interrupt(int sig, void (*handler)(void))
{
struct sigaction sa;
DEBUG("XXX: register_interrupt()\n");
@ -369,8 +369,7 @@ int register_interrupt(int sig, void *handler)
native_irq_handlers[sig].func = handler;
sa.sa_sigaction = (void *) native_isr_entry;
/* sa.sa_handler = (void*) native_isr_entry; */
sa.sa_sigaction = native_isr_entry;
if (sigemptyset(&sa.sa_mask) == -1) {
err(1, "register_interrupt: sigemptyset");
@ -402,7 +401,6 @@ int unregister_interrupt(int sig)
native_irq_handlers[sig].func = NULL;
/* sa.sa_sigaction = SIG_IGN; */
sa.sa_handler = SIG_IGN;
if (sigemptyset(&sa.sa_mask) == -1) {
@ -437,7 +435,7 @@ void native_interrupt_init(void)
native_irq_handlers[i].func = NULL;
}
sa.sa_sigaction = (void *) native_isr_entry;
sa.sa_sigaction = native_isr_entry;
if (sigemptyset(&sa.sa_mask) == -1) {
err(1, "native_interrupt_init: sigemptyset");

View File

@ -106,7 +106,7 @@ void nativenet_switch_to_rx()
/* nativenet_internal.h *************************************************/
/************************************************************************/
int _nativenet_register_cb(int event, void *func)
int _nativenet_register_cb(int event, void (*func)(void))
{
if (event > NNEV_MAXEV) {
DEBUG("_nativenet_register_cb: event > NNEV_MAXEV");

View File

@ -48,6 +48,8 @@ void rtc_disable(void)
void rtc_set_localtime(struct tm *localt)
{
DEBUG("rtc_set_localtime()\n");
(void)localt; /* not implemented atm */
printf("setting time not supported.");
}

View File

@ -35,6 +35,9 @@ __attribute__((constructor)) static void startup(int argc, char **argv)
printf("usage: %s <tap interface>\n", argv[0]);
exit(EXIT_FAILURE);
}
#else /* args unused here */
(void) argc;
(void) argv;
#endif
native_cpu_init();