1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00
emacs/m4
Paul Eggert f6ef15cf84 Use unlocked stdio more systematically
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.
2017-06-22 11:22:53 -07:00
..
00gnulib.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
absolute-header.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
acl.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
alloca.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
byteswap.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
c-strtod.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
clock_time.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
close-stream.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
count-leading-zeros.m4 logb now works correctly on large integers 2017-03-03 09:19:08 -08:00
count-one-bits.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
count-trailing-zeros.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
dirent_h.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
dirfd.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
dup2.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
environ.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
errno_h.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
euidaccess.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
execinfo.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
extensions.m4 Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
extern-inline.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
faccessat.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
fcntl_h.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
fcntl.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
fdatasync.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
fdopendir.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
filemode.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
flexmember.m4 Merge from gnulib 2017-03-19 13:09:31 -07:00
fpending.m4 Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
fstatat.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
fsync.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
getdtablesize.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
getgroups.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
getloadavg.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
getopt.m4 Merge from gnulib 2017-04-27 15:24:07 -07:00
gettime.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
gettimeofday.m4 Merge from gnulib 2017-05-14 01:29:29 -07:00
gnulib-common.m4 Merge from gnulib 2017-03-12 00:03:37 -08:00
gnulib-comp.m4 Use unlocked stdio more systematically 2017-06-22 11:22:53 -07:00
group-member.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
include_next.m4 Merge from gnulib 2017-04-30 14:53:17 -07:00
inttypes.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
largefile.m4 Merge from gnulib 2017-05-14 01:29:29 -07:00
limits-h.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
localtime-buffer.m4 Merge from gnulib 2017-05-01 15:33:26 -07:00
longlong.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
lstat.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
manywarnings.m4 Merge with gnulib, pacifying GCC 7 2017-05-16 10:27:41 -07:00
md5.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
memrchr.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
minmax.m4 Add command to replace buffer contents 2017-06-17 15:40:58 +02:00
mkostemp.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
mktime.m4 Merge from gnulib 2017-04-30 14:53:17 -07:00
multiarch.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
nocrash.m4 Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
off_t.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
pipe2.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
pkg.m4 Merge from pkg-config 2017-05-03 18:19:25 -07:00
pselect.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
pthread_sigmask.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
putenv.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
readlink.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
readlinkat.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
secure_getenv.m4 Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
sha1.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
sha256.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
sha512.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
sig2str.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
signal_h.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
socklen.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
ssize_t.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
st_dm_mode.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
stat-time.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
std-gnu11.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
stdalign.m4 Merge from gnulib 2017-03-19 13:09:31 -07:00
stddef_h.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
stdint.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
stdio_h.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
stdlib_h.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
stpcpy.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
strftime.m4 Merge from gnulib 2017-04-30 14:53:17 -07:00
string_h.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
strtoimax.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
strtoll.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
symlink.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
sys_select_h.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
sys_socket_h.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
sys_stat_h.m4 Merge from gnulib 2017-05-14 01:29:29 -07:00
sys_time_h.m4 Merge from gnulib 2017-05-14 01:29:29 -07:00
sys_types_h.m4 Merge from gnulib 2017-06-11 17:30:06 -07:00
tempname.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
time_h.m4 Merge from gnulib 2017-05-14 01:29:29 -07:00
time_r.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
time_rz.m4 Merge from gnulib 2017-05-14 01:29:29 -07:00
timegm.m4 Merge from gnulib 2017-04-30 14:53:17 -07:00
timer_time.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
timespec.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
tm_gmtoff.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
unistd_h.m4 Merge from gnulib 2017-05-14 01:29:29 -07:00
unlocked-io.m4 Use unlocked stdio more systematically 2017-06-22 11:22:53 -07:00
utimbuf.m4 Merge from gnulib 2017-01-01 01:32:56 -08:00
utimens.m4 Merge from gnulib 2017-04-30 14:53:17 -07:00
utimes.m4 Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
vararrays.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
warnings.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00
wchar_t.m4 Update copyright year to 2017 2016-12-31 19:42:26 -08:00