13 #ifndef INCLUDE_CAN_DELAY_H_ 14 #define INCLUDE_CAN_DELAY_H_ 22 static inline unsigned int udelay(
unsigned int usec)
24 timespec requested, remaining;
25 requested.tv_sec = usec/1000000;
26 requested.tv_nsec = usec*1000;
27 return ((
unsigned int) nanosleep(&requested, &remaining));
33 static inline void do_gettimeofday(timeval *tv)
35 gettimeofday(tv, NULL);
54 #define atomic_read(v) ((v)->counter) 64 #define atomic_set(v,i) (v->counter = i)