diff options
author | Juan Quintela <quintela@redhat.com> | 2009-09-10 03:04:26 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-09-11 10:19:52 -0500 |
commit | 6ee093c90761eabfc6255624000d3d8248802209 (patch) | |
tree | f550274a05a1cd7a379f3e4d1cb7789fb2e64b8c /hw/serial.c | |
parent | b03b2e48cb322cb695ff7a6666b25712140ea3c9 (diff) |
Unexport ticks_per_sec variable. Create get_ticks_per_sec() function
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/serial.c')
-rw-r--r-- | hw/serial.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/serial.c b/hw/serial.c index f5988a5fc6..f9c7246b60 100644 --- a/hw/serial.c +++ b/hw/serial.c @@ -246,7 +246,7 @@ static void serial_update_parameters(SerialState *s) ssp.parity = parity; ssp.data_bits = data_bits; ssp.stop_bits = stop_bits; - s->char_transmit_time = (ticks_per_sec / speed) * frame_size; + s->char_transmit_time = (get_ticks_per_sec() / speed) * frame_size; qemu_chr_ioctl(s->chr, CHR_IOCTL_SERIAL_SET_PARAMS, &ssp); #if 0 printf("speed=%d parity=%c data=%d stop=%d\n", @@ -286,7 +286,7 @@ static void serial_update_msl(SerialState *s) We'll be lazy and poll only every 10ms, and only poll it at all if MSI interrupts are turned on */ if (s->poll_msl) - qemu_mod_timer(s->modem_status_poll, qemu_get_clock(vm_clock) + ticks_per_sec / 100); + qemu_mod_timer(s->modem_status_poll, qemu_get_clock(vm_clock) + get_ticks_per_sec() / 100); } static void serial_xmit(void *opaque) @@ -695,7 +695,7 @@ static void serial_reset(void *opaque) s->mcr = UART_MCR_OUT2; s->scr = 0; s->tsr_retry = 0; - s->char_transmit_time = (ticks_per_sec / 9600) * 9; + s->char_transmit_time = (get_ticks_per_sec() / 9600) * 9; s->poll_msl = 0; fifo_clear(s,RECV_FIFO); |