Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234617
b: refs/heads/master
c: 5270873
h: refs/heads/master
i:
  234615: 292e2ce
v: v3
  • Loading branch information
Thomas Gleixner committed Feb 2, 2011
1 parent 1a84ec2 commit 1da76d2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 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: 81e294cba2596f5f10848bbe19d98b344c2a2d5c
refs/heads/master: 527087374faa488776a789375a7d6ea74fda6f71
2 changes: 1 addition & 1 deletion trunk/drivers/char/mmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ static int __init mmtimer_init(void)
}

sgi_clock_period = NSEC_PER_SEC / sn_rtc_cycles_per_second;
register_posix_clock(CLOCK_SGI_CYCLE, &sgi_clock);
posix_timers_register_clock(CLOCK_SGI_CYCLE, &sgi_clock);

printk(KERN_INFO "%s: v%s, %ld MHz\n", MMTIMER_DESC, MMTIMER_VERSION,
sn_rtc_cycles_per_second/(unsigned long)1E6);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/posix-timers.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ struct k_clock {

extern struct k_clock clock_posix_cpu;

void register_posix_clock(const clockid_t clock_id, struct k_clock *new_clock);
void posix_timers_register_clock(const clockid_t clock_id, struct k_clock *new_clock);

/* function to call to trigger timer event */
int posix_timer_event(struct k_itimer *timr, int si_private);
Expand Down
4 changes: 2 additions & 2 deletions trunk/kernel/posix-cpu-timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1618,8 +1618,8 @@ static __init int init_posix_cpu_timers(void)
};
struct timespec ts;

register_posix_clock(CLOCK_PROCESS_CPUTIME_ID, &process);
register_posix_clock(CLOCK_THREAD_CPUTIME_ID, &thread);
posix_timers_register_clock(CLOCK_PROCESS_CPUTIME_ID, &process);
posix_timers_register_clock(CLOCK_THREAD_CPUTIME_ID, &thread);

cputime_to_timespec(cputime_one_jiffy, &ts);
onecputick = ts.tv_nsec;
Expand Down
15 changes: 8 additions & 7 deletions trunk/kernel/posix-timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,11 @@ static __init int init_posix_timers(void)
.clock_get = posix_get_monotonic_coarse,
};

register_posix_clock(CLOCK_REALTIME, &clock_realtime);
register_posix_clock(CLOCK_MONOTONIC, &clock_monotonic);
register_posix_clock(CLOCK_MONOTONIC_RAW, &clock_monotonic_raw);
register_posix_clock(CLOCK_REALTIME_COARSE, &clock_realtime_coarse);
register_posix_clock(CLOCK_MONOTONIC_COARSE, &clock_monotonic_coarse);
posix_timers_register_clock(CLOCK_REALTIME, &clock_realtime);
posix_timers_register_clock(CLOCK_MONOTONIC, &clock_monotonic);
posix_timers_register_clock(CLOCK_MONOTONIC_RAW, &clock_monotonic_raw);
posix_timers_register_clock(CLOCK_REALTIME_COARSE, &clock_realtime_coarse);
posix_timers_register_clock(CLOCK_MONOTONIC_COARSE, &clock_monotonic_coarse);

posix_timers_cache = kmem_cache_create("posix_timers_cache",
sizeof (struct k_itimer), 0, SLAB_PANIC,
Expand Down Expand Up @@ -433,7 +433,8 @@ static struct pid *good_sigevent(sigevent_t * event)
return task_pid(rtn);
}

void register_posix_clock(const clockid_t clock_id, struct k_clock *new_clock)
void posix_timers_register_clock(const clockid_t clock_id,
struct k_clock *new_clock)
{
if ((unsigned) clock_id >= MAX_CLOCKS) {
printk(KERN_WARNING "POSIX clock register failed for clock_id %d\n",
Expand All @@ -454,7 +455,7 @@ void register_posix_clock(const clockid_t clock_id, struct k_clock *new_clock)

posix_clocks[clock_id] = *new_clock;
}
EXPORT_SYMBOL_GPL(register_posix_clock);
EXPORT_SYMBOL_GPL(posix_timers_register_clock);

static struct k_itimer * alloc_posix_timer(void)
{
Expand Down

0 comments on commit 1da76d2

Please sign in to comment.