Commit a85a1a92 authored by Alessandro Rubini's avatar Alessandro Rubini

bugfix: arch-bare-*: wrong structures

We had bare_timeval with both nsec and usec, but this doesn't work.
As a result, our timers were only second-grained and not
millisecond-grained (we got no nsec from clock_gettime).
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent fec90f15
......@@ -162,9 +162,13 @@ struct bare_ethhdr {
} __attribute__((packed));
struct bare_timeval {
unsigned long tv_sec;
unsigned long tv_usec;
unsigned long tv_nsec;
long tv_sec;
long tv_usec;
};
struct bare_timespec {
long tv_sec;
long tv_nsec;
};
#ifndef NULL
......
......@@ -35,7 +35,7 @@ int bare_timer_stop(struct pp_timer *tm)
int bare_timer_expired(struct pp_timer *tm)
{
struct bare_timeval now;
struct bare_timespec now;
uint64_t now_ms;
if (tm->start == 0) {
......
......@@ -35,7 +35,7 @@ int bare_timer_stop(struct pp_timer *tm)
int bare_timer_expired(struct pp_timer *tm)
{
struct bare_timeval now;
struct bare_timespec now;
uint64_t now_ms;
if (tm->start == 0) {
......
......@@ -162,9 +162,13 @@ struct bare_ethhdr {
} __attribute__((packed));
struct bare_timeval {
unsigned long tv_sec;
unsigned long tv_usec;
unsigned long tv_nsec;
long tv_sec;
long tv_usec;
};
struct bare_timespec {
long tv_sec;
long tv_nsec;
};
#ifndef NULL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment