Subversion Repositories Kolibri OS

Rev

Rev 4103 | Rev 5270 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4103 Rev 5056
Line 74... Line 74...
74
 
74
 
75
/*
75
/*
76
 * The 64-bit value is not atomic - you MUST NOT read it
76
 * The 64-bit value is not atomic - you MUST NOT read it
77
 * without sampling the sequence number in jiffies_lock.
77
 * without sampling the sequence number in jiffies_lock.
-
 
78
 * get_jiffies_64() will do this for you as appropriate.
-
 
79
 */
-
 
80
extern u64 jiffies_64;
-
 
81
extern unsigned long volatile jiffies;
-
 
82
 
-
 
83
#if (BITS_PER_LONG < 64)
-
 
84
u64 get_jiffies_64(void);
78
 * get_jiffies_64() will do this for you as appropriate.
85
#else
79
static inline u64 get_jiffies_64(void)
86
static inline u64 get_jiffies_64(void)
80
{
87
{
81
    return (u64)GetTimerTicks();
88
	return (u64)jiffies;
-
 
89
}
Line 82... Line 90...
82
}
90
#endif
83
 
91
 
84
/*
92
/*
85
 *	These inlines deal with timer wrapping correctly. You are
93
 *	These inlines deal with timer wrapping correctly. You are
Line 288... Line 296...
288
/*
296
/*
289
 * Convert various time units to each other:
297
 * Convert various time units to each other:
290
 */
298
 */
291
extern unsigned int jiffies_to_msecs(const unsigned long j);
299
extern unsigned int jiffies_to_msecs(const unsigned long j);
292
extern unsigned int jiffies_to_usecs(const unsigned long j);
300
extern unsigned int jiffies_to_usecs(const unsigned long j);
-
 
301
 
-
 
302
static inline u64 jiffies_to_nsecs(const unsigned long j)
-
 
303
{
-
 
304
	return (u64)jiffies_to_usecs(j) * NSEC_PER_USEC;
-
 
305
}
-
 
306
 
293
extern unsigned long msecs_to_jiffies(const unsigned int m);
307
extern unsigned long msecs_to_jiffies(const unsigned int m);
294
extern unsigned long usecs_to_jiffies(const unsigned int u);
308
extern unsigned long usecs_to_jiffies(const unsigned int u);
295
extern unsigned long timespec_to_jiffies(const struct timespec *value);
309
extern unsigned long timespec_to_jiffies(const struct timespec *value);
296
extern void jiffies_to_timespec(const unsigned long jiffies,
310
extern void jiffies_to_timespec(const unsigned long jiffies,
297
				struct timespec *value);
311
				struct timespec *value);