Allow VC++ to be used as alternative to GCC for building in the WIN32 target.
TODOs: - Update README - Add dependency handling - Add rtimersupport
This commit is contained in:
parent
f83fb3704b
commit
5da4faf71e
3 changed files with 55 additions and 23 deletions
|
@ -39,7 +39,9 @@
|
|||
*/
|
||||
|
||||
#include <signal.h>
|
||||
#ifndef _WIN32
|
||||
#include <sys/time.h>
|
||||
#endif /* !_WIN32 */
|
||||
#include <stddef.h>
|
||||
|
||||
#include "sys/rtimer.h"
|
||||
|
@ -64,12 +66,15 @@ interrupt(int sig)
|
|||
void
|
||||
rtimer_arch_init(void)
|
||||
{
|
||||
#ifndef _WIN32
|
||||
signal(SIGALRM, interrupt);
|
||||
#endif /* !_WIN32 */
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
rtimer_arch_schedule(rtimer_clock_t t)
|
||||
{
|
||||
#ifndef _WIN32
|
||||
struct itimerval val;
|
||||
rtimer_clock_t c;
|
||||
|
||||
|
@ -83,5 +88,6 @@ rtimer_arch_schedule(rtimer_clock_t t)
|
|||
|
||||
val.it_interval.tv_sec = val.it_interval.tv_usec = 0;
|
||||
setitimer(ITIMER_REAL, &val, NULL);
|
||||
#endif /* !_WIN32 */
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue