Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288791
b: refs/heads/master
c: 8357929
h: refs/heads/master
i:
  288789: 5e6be17
  288787: 9eaaf37
  288783: 754389c
v: v3
  • Loading branch information
John Stultz committed Jan 27, 2012
1 parent 4aef15d commit ac4e68b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 70471f2f061d59375e959b4e7d47ee62121babb1
refs/heads/master: 8357929e6ae3661d5a3a7378a717f29873ea18c6
15 changes: 0 additions & 15 deletions trunk/include/linux/timex.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,23 +234,9 @@ struct timex {
extern unsigned long tick_usec; /* USER_HZ period (usec) */
extern unsigned long tick_nsec; /* ACTHZ period (nsec) */

/*
* phase-lock loop variables
*/
extern int time_status; /* clock synchronization status bits */

extern void ntp_init(void);
extern void ntp_clear(void);

/**
* ntp_synced - Returns 1 if the NTP status is not UNSYNC
*
*/
static inline int ntp_synced(void)
{
return !(time_status & STA_UNSYNC);
}

/* Required to safely shift negative values */
#define shift_right(x, s) ({ \
__typeof__(x) __x = (x); \
Expand All @@ -267,7 +253,6 @@ static inline int ntp_synced(void)
extern u64 tick_length;

extern void second_overflow(void);
extern void update_ntp_one_tick(void);
extern int do_adjtimex(struct timex *);
extern void hardpps(const struct timespec *, const struct timespec *);

Expand Down
13 changes: 12 additions & 1 deletion trunk/kernel/time/ntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static struct hrtimer leap_timer;
static int time_state = TIME_OK;

/* clock status bits: */
int time_status = STA_UNSYNC;
static int time_status = STA_UNSYNC;

/* TAI offset (secs): */
static long time_tai;
Expand Down Expand Up @@ -233,6 +233,17 @@ static inline void pps_fill_timex(struct timex *txc)

#endif /* CONFIG_NTP_PPS */


/**
* ntp_synced - Returns 1 if the NTP status is not UNSYNC
*
*/
static inline int ntp_synced(void)
{
return !(time_status & STA_UNSYNC);
}


/*
* NTP methods:
*/
Expand Down

0 comments on commit ac4e68b

Please sign in to comment.