|
Revision 4a770eb97fc40ec8d9f394337614ac3c2074ee01, 1.2 KB
(checked in by H. Peter Anvin <hpa@…>, 23 months ago)
|
|
core: add a ms-denominated timer
Add a timer denominated in milliseconds. This is still driven by the
18.2 Hz timer interrupt, but counts "real" milliseconds, including
handing the adjustment factor (which in reality means it advances by
55 for most timer ticks and 54 for some.)
Signed-off-by: H. Peter Anvin <hpa@…>
|
-
Property mode set to
100644
|
| Line | |
|---|
| 1 | /* ----------------------------------------------------------------------- |
|---|
| 2 | * |
|---|
| 3 | * Copyright 1994-2009 H. Peter Anvin - All Rights Reserved |
|---|
| 4 | * Copyright 2009-2010 Intel Corporation; author: H. Peter Anvin |
|---|
| 5 | * |
|---|
| 6 | * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | * it under the terms of the GNU General Public License as published by |
|---|
| 8 | * the Free Software Foundation, Inc., 53 Temple Place Ste 330, |
|---|
| 9 | * Boston MA 02111-1307, USA; either version 2 of the License, or |
|---|
| 10 | * (at your option) any later version; incorporated herein by reference. |
|---|
| 11 | * |
|---|
| 12 | * ----------------------------------------------------------------------- */ |
|---|
| 13 | |
|---|
| 14 | #include <inttypes.h> |
|---|
| 15 | #include <com32.h> |
|---|
| 16 | #include <syslinux/pmapi.h> |
|---|
| 17 | #include "core.h" |
|---|
| 18 | #include "fs.h" |
|---|
| 19 | |
|---|
| 20 | const struct com32_pmapi pm_api_vector = |
|---|
| 21 | { |
|---|
| 22 | .__pmapi_size = sizeof(struct com32_pmapi), |
|---|
| 23 | |
|---|
| 24 | .lmalloc = pmapi_lmalloc, /* Allocate low memory */ |
|---|
| 25 | .lfree = free, /* Free low memory */ |
|---|
| 26 | |
|---|
| 27 | .open_file = open_file, |
|---|
| 28 | .read_file = pmapi_read_file, |
|---|
| 29 | .close_file = close_file, |
|---|
| 30 | |
|---|
| 31 | .opendir = opendir, |
|---|
| 32 | .readdir = readdir, |
|---|
| 33 | .closedir = closedir, |
|---|
| 34 | |
|---|
| 35 | .idle = __idle, |
|---|
| 36 | .reset_idle = reset_idle, |
|---|
| 37 | |
|---|
| 38 | .chdir = chdir, |
|---|
| 39 | .getcwd = getcwd, |
|---|
| 40 | |
|---|
| 41 | .jiffies = &__jiffies, |
|---|
| 42 | .ms_timer = &__ms_timer, |
|---|
| 43 | }; |
|---|