mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-02 18:21:19 -08:00
This can improve performance significantly on stdio-bottlenecked code. E.g., make-docfile is 3x faster on my Fedora 25 x86-64 desktop. * admin/merge-gnulib (GNULIB_MODULES): Add unlocked-io. * lib-src/ebrowse.c, lib-src/emacsclient.c, lib-src/etags.c: * lib-src/hexl.c, lib-src/make-docfile.c, lib-src/movemail.c: * lib-src/profile.c, lib-src/update-game-score.c: Include unlocked-io.h instead of stdio.h, since these programs are single-threaded. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/unlocked-io.h, m4/unlocked-io.m4: New files, copied from Gnulib. * src/charset.c, src/cm.c, src/emacs.c, src/image.c, src/keyboard.c: * src/lread.c, src/term.c: Include sysstdio.h, possibly instead of stdio.h, to define the unlocked functions if the system does not provide them. * src/charset.c, src/lread.c (getc_unlocked): Remove, since sysstdio.h now defines it if needed. * src/cm.c (cmputc, cmcheckmagic): * src/dispnew.c (update_frame, update_frame_with_menu) (update_frame_1, Fsend_string_to_terminal, Fding, bitch_at_user): * src/emacs.c (main, Fdump_emacs): * src/fileio.c (Fdo_auto_save, Fset_binary_mode): * src/image.c (slurp_file, png_read_from_file, png_load_body) (our_stdio_fill_input_buffer): * src/keyboard.c (record_char, kbd_buffer_get_event, handle_interrupt): * src/lread.c (readbyte_from_file): * src/minibuf.c (read_minibuf_noninteractive): * src/print.c (printchar_to_stream, strout) (Fredirect_debugging_output): * src/sysdep.c (reset_sys_modes, procfs_ttyname) (procfs_get_total_memory): * src/term.c (tty_ring_bell, tty_send_additional_strings) (tty_set_terminal_modes, tty_reset_terminal_modes) (tty_update_end, tty_clear_end_of_line, tty_write_glyphs) (tty_write_glyphs_with_face, tty_insert_glyphs) (tty_menu_activate): * src/xfaces.c (Fx_load_color_file): Use unlocked stdio when it should be safe. * src/sysstdio.h (clearerr_unlocked, feof_unlocked, ferror_unlocked) (fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked) (fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked) (putc_unlocked, putchar_unloced): Provide substitutes if not declared. |
||
|---|---|---|
| .. | ||
| 00gnulib.m4 | ||
| absolute-header.m4 | ||
| acl.m4 | ||
| alloca.m4 | ||
| byteswap.m4 | ||
| c-strtod.m4 | ||
| clock_time.m4 | ||
| close-stream.m4 | ||
| count-leading-zeros.m4 | ||
| count-one-bits.m4 | ||
| count-trailing-zeros.m4 | ||
| dirent_h.m4 | ||
| dirfd.m4 | ||
| dup2.m4 | ||
| environ.m4 | ||
| errno_h.m4 | ||
| euidaccess.m4 | ||
| execinfo.m4 | ||
| extensions.m4 | ||
| extern-inline.m4 | ||
| faccessat.m4 | ||
| fcntl.m4 | ||
| fcntl_h.m4 | ||
| fdatasync.m4 | ||
| fdopendir.m4 | ||
| filemode.m4 | ||
| flexmember.m4 | ||
| fpending.m4 | ||
| fstatat.m4 | ||
| fsync.m4 | ||
| getdtablesize.m4 | ||
| getgroups.m4 | ||
| getloadavg.m4 | ||
| getopt.m4 | ||
| gettime.m4 | ||
| gettimeofday.m4 | ||
| gnulib-common.m4 | ||
| gnulib-comp.m4 | ||
| group-member.m4 | ||
| include_next.m4 | ||
| inttypes.m4 | ||
| largefile.m4 | ||
| limits-h.m4 | ||
| localtime-buffer.m4 | ||
| longlong.m4 | ||
| lstat.m4 | ||
| manywarnings.m4 | ||
| md5.m4 | ||
| memrchr.m4 | ||
| minmax.m4 | ||
| mkostemp.m4 | ||
| mktime.m4 | ||
| multiarch.m4 | ||
| nocrash.m4 | ||
| off_t.m4 | ||
| pipe2.m4 | ||
| pkg.m4 | ||
| pselect.m4 | ||
| pthread_sigmask.m4 | ||
| putenv.m4 | ||
| readlink.m4 | ||
| readlinkat.m4 | ||
| secure_getenv.m4 | ||
| sha1.m4 | ||
| sha256.m4 | ||
| sha512.m4 | ||
| sig2str.m4 | ||
| signal_h.m4 | ||
| socklen.m4 | ||
| ssize_t.m4 | ||
| st_dm_mode.m4 | ||
| stat-time.m4 | ||
| std-gnu11.m4 | ||
| stdalign.m4 | ||
| stddef_h.m4 | ||
| stdint.m4 | ||
| stdio_h.m4 | ||
| stdlib_h.m4 | ||
| stpcpy.m4 | ||
| strftime.m4 | ||
| string_h.m4 | ||
| strtoimax.m4 | ||
| strtoll.m4 | ||
| symlink.m4 | ||
| sys_select_h.m4 | ||
| sys_socket_h.m4 | ||
| sys_stat_h.m4 | ||
| sys_time_h.m4 | ||
| sys_types_h.m4 | ||
| tempname.m4 | ||
| time_h.m4 | ||
| time_r.m4 | ||
| time_rz.m4 | ||
| timegm.m4 | ||
| timer_time.m4 | ||
| timespec.m4 | ||
| tm_gmtoff.m4 | ||
| unistd_h.m4 | ||
| unlocked-io.m4 | ||
| utimbuf.m4 | ||
| utimens.m4 | ||
| utimes.m4 | ||
| vararrays.m4 | ||
| warnings.m4 | ||
| wchar_t.m4 | ||