diff options
| author | Paul Eggert | 2012-06-22 14:17:42 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-06-22 14:17:42 -0700 |
| commit | d35af63cd671563fd188c3b0a1ef30067027c7aa (patch) | |
| tree | c9e01847ccf788e23794684da9331c3e0defd0d3 /src/ChangeLog | |
| parent | f143bfe38b43ad0a9d817f05c25e418982dca06f (diff) | |
| download | emacs-d35af63cd671563fd188c3b0a1ef30067027c7aa.tar.gz emacs-d35af63cd671563fd188c3b0a1ef30067027c7aa.zip | |
Support higher-resolution time stamps.
Fixes: debbugs:9000
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 169 |
1 files changed, 169 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index a5e10fe9473..65424205f34 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,172 @@ | |||
| 1 | 2012-06-22 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Support higher-resolution time stamps (Bug#9000). | ||
| 4 | The time stamps are only nanosecond-resolution at the C level, | ||
| 5 | since that's the best that any real-world system supports now. | ||
| 6 | But they are picosecond-resolution at the Lisp level, as that's | ||
| 7 | easy, and leaves room for future OS improvements. | ||
| 8 | |||
| 9 | * Makefile.in (LIB_CLOCK_GETTIME): New macro. | ||
| 10 | (LIBES): Use it. | ||
| 11 | |||
| 12 | * alloc.c (Fgarbage_collect): Port to higher-res time stamps. | ||
| 13 | Don't get current time unless it's needed. | ||
| 14 | |||
| 15 | * atimer.c: Include <sys/time.h> unconditionally, since gnulib | ||
| 16 | now provides it if it's absent. | ||
| 17 | (start_atimer): Port to higher-res time stamps. | ||
| 18 | Check for time stamp overflow. Don't get current time more | ||
| 19 | often than is needed. | ||
| 20 | |||
| 21 | * buffer.h (struct buffer): Buffer modtime now has high resolution. | ||
| 22 | Include systime.h, not time.h. | ||
| 23 | (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros. | ||
| 24 | |||
| 25 | * dired.c: Include stat-time.h. | ||
| 26 | (Ffile-attributes): File times now have higher resolution. | ||
| 27 | |||
| 28 | * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h. | ||
| 29 | (struct image): Timestamp now has higher resolution. | ||
| 30 | |||
| 31 | * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always | ||
| 32 | has at least microseconds now. All uses removed. | ||
| 33 | (update_frame, update_single_window, update_window, update_frame_1) | ||
| 34 | (Fsleep_for, sit_for): Port to higher-resolution time stamps. | ||
| 35 | |||
| 36 | * editfns.c (time_overflow): Now extern. | ||
| 37 | (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument) | ||
| 38 | (float-time, Fformat_time_string, Fcurrent_time_string) | ||
| 39 | (Fcurrent_time_zone): Accept and generate higher-resolution | ||
| 40 | time stamps. | ||
| 41 | (make_time_tail, make_lisp_time, dissassemble_lisp_time) | ||
| 42 | (decode_time_components, lisp_seconds_argument): New functions. | ||
| 43 | (make_time): Now static. | ||
| 44 | (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec. | ||
| 45 | Report an error if the time is invalid, rather than having the caller | ||
| 46 | do that. | ||
| 47 | |||
| 48 | * fileio.c: Include <stat-time.h> | ||
| 49 | (Fcopy_file): Copy higher-resolution time stamps. | ||
| 50 | Prefer to set the time stamp via a file descriptor if that works. | ||
| 51 | (Fset_file_times, Finsert_file_contents, Fwrite_region) | ||
| 52 | (Fverify_visited_file_modtime, Fclear_visited_file_modtime) | ||
| 53 | (Fvisited_file_modtime, Fset_visited_file_modtime): | ||
| 54 | Support higher-resolution time stamps. | ||
| 55 | |||
| 56 | * fns.c (Frandom): Use nanoseconds, not microseconds, for seed. | ||
| 57 | |||
| 58 | * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps. | ||
| 59 | |||
| 60 | * image.c (prepare_image_for_display, clear_image_cache) | ||
| 61 | (lookup_image): Port to higer-resolution time stamps. | ||
| 62 | |||
| 63 | * keyboard.c (start_polling, bind_polling_period): | ||
| 64 | Check for time stamp overflow. | ||
| 65 | (read_char, kbd_buffer_get_event, timer_start_idle) | ||
| 66 | (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check) | ||
| 67 | (Fcurrent_idle_time, init_keyboard, set_waiting_for_input): | ||
| 68 | Port to higher-resolution time stamps. Do not assume time_t is signed. | ||
| 69 | (decode_timer): New function. Timers are now vectors of length 9, | ||
| 70 | not 8, to accommodate the picosecond component. | ||
| 71 | (timer_check_2): Use it. | ||
| 72 | |||
| 73 | * nsterm.m (select_timeout, timeval_subtract): Remove. | ||
| 74 | (ns_timeout): Use Emacs's facilities for time stamp arithmetic, | ||
| 75 | as they're a bit more accurate and handle overflow better. | ||
| 76 | (ns_select): Change prototype to be compatible with pselect. | ||
| 77 | (ns_select, ns_term_shutdown): Port to ns-resolution time stamps. | ||
| 78 | * nsterm.h (ns_select): Adjust prototype. | ||
| 79 | |||
| 80 | * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes | ||
| 81 | us-resolution time stamps. | ||
| 82 | (sys_select): Use the new EMACS_TIME_SIGN macro instead. | ||
| 83 | |||
| 84 | * lread.c (read_filtered_event): Port to ns-resolution time stamps. | ||
| 85 | |||
| 86 | * lisp.h (time_overflow): New decl. | ||
| 87 | (wait_reading_process_output): First arg is now intmax_t, not int, | ||
| 88 | to accommodate larger waits. | ||
| 89 | |||
| 90 | * process.h (struct Lisp_Process.read_output_delay): | ||
| 91 | Now counts nanoseconds, not microseconds. | ||
| 92 | * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about | ||
| 93 | EMACS_HAS_USECS. | ||
| 94 | (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output) | ||
| 95 | (wait_reading_process_output): | ||
| 96 | Port to ns-resolution time stamps. | ||
| 97 | (Faccept_process_output, wait_reading_process_output): | ||
| 98 | Check for time stamp overflow. Do not assume time_t is signed. | ||
| 99 | (select_wrapper): Remove; we now use pselect. | ||
| 100 | (Fprocess_attributes): Now generates ns-resolution time stamps. | ||
| 101 | |||
| 102 | * sysdep.c: Include utimens.h. Don't include utime.h | ||
| 103 | or worry about struct utimbuf; gnulib does that for us now. | ||
| 104 | (gettimeofday): Remove; gnulib provides a substitute. | ||
| 105 | (make_timeval): New function. | ||
| 106 | (set_file_times): Now sets ns-resolution time stamps. | ||
| 107 | New arg FD; all uses changed. | ||
| 108 | (time_from_jiffies, ltime_from_jiffies, get_up_time) | ||
| 109 | (system_process_attributes): | ||
| 110 | Now returns ns-resolution time stamp. All uses changed. | ||
| 111 | Check for time stamp overflow. | ||
| 112 | |||
| 113 | * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib | ||
| 114 | provides a substitute now. | ||
| 115 | |||
| 116 | * systime.h: Include timespec.h rather than sys/time.h and time.h, | ||
| 117 | since it guarantees struct timespec. | ||
| 118 | (EMACS_TIME): Now struct timespec, so that we can support | ||
| 119 | ns-resolution time stamps. | ||
| 120 | (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros. | ||
| 121 | (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now. | ||
| 122 | (EMACS_USECS): Remove. | ||
| 123 | (EMACS_SET_USECS): The underlying time stamp now has ns resolution, | ||
| 124 | so multiply the arg by 1000 before storing it. | ||
| 125 | (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS): | ||
| 126 | New macros. | ||
| 127 | (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME): | ||
| 128 | Port to ns-resolution time stamps. | ||
| 129 | (EMACS_TIME_NEG_P): Remove; replaced by.... | ||
| 130 | (EMACS_TIME_SIGN): New macro. | ||
| 131 | (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P) | ||
| 132 | (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros. | ||
| 133 | (set_file_times, make_time, lisp_time_argument): Adjust signature. | ||
| 134 | (make_timeval, make_lisp_time, decode_time_components): New decls. | ||
| 135 | (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in | ||
| 136 | that it mishandled time_t overflow. You can't compare by subtracting! | ||
| 137 | (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE) | ||
| 138 | (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp. | ||
| 139 | |||
| 140 | * term.c: Include <sys/time.h>. | ||
| 141 | (timeval_to_Time): New function, for proper overflow wraparound. | ||
| 142 | (term_mouse_position, term_mouse_click): Use it. | ||
| 143 | |||
| 144 | * undo.c (record_first_change): Support higher-resolution time stamps | ||
| 145 | in the undo buffer. | ||
| 146 | (Fprimitive_undo): Use them when restoring time stamps. | ||
| 147 | |||
| 148 | * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull) | ||
| 149 | (w32_get_internal_run_time): | ||
| 150 | Port to higher-resolution Emacs time stamps. | ||
| 151 | (ltime): Now accepts single 64-bit integer, as that's more convenient | ||
| 152 | for callers. | ||
| 153 | |||
| 154 | * xdisp.c (start_hourglass): Port to ns-resolution time stamps. | ||
| 155 | |||
| 156 | * xgselect.c, xgselect.h (xg_select): Add sigmask argument, | ||
| 157 | for compatibility with pselect. Support ns-resolution time stamps. | ||
| 158 | |||
| 159 | * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps. | ||
| 160 | |||
| 161 | * xselect.c (wait_for_property_change, x_get_foreign_selection): | ||
| 162 | Check for time stamp overflow, and support ns-resolution time stamps. | ||
| 163 | |||
| 164 | * xterm.c: Don't include sys/time.h; gnulib does that for us now. | ||
| 165 | Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set. | ||
| 166 | (timeval_subtract): Remove; no longer needed. | ||
| 167 | (XTflash, XTring_bell, x_wait_for_event): | ||
| 168 | Port to ns-resolution time stamps. Don't assume time_t is signed. | ||
| 169 | |||
| 1 | 2012-06-22 Chong Yidong <cyd@gnu.org> | 170 | 2012-06-22 Chong Yidong <cyd@gnu.org> |
| 2 | 171 | ||
| 3 | * xdisp.c (x_consider_frame_title): Revert last change. | 172 | * xdisp.c (x_consider_frame_title): Revert last change. |