aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix error messages in thread.cEli Zaretskii2016-12-101-4/+4
| | | | | * src/thread.c (lisp_mutex_unlock, Fcondition_wait) (Fcondition_notify, Fthread_join): Fix error messages.
* Improve doc strings in thread.cEli Zaretskii2016-12-101-30/+31
| | | | | | * src/thread.c (Fmake_condition_variable, Fcondition_wait) (Fcondition_notify, Fcondition_mutex, Fcondition_name, Fmake_thread) (Fthread_join, Fall_threads): Doc fixes.
* Fix building with check-lisp-object-typeEli Zaretskii2016-12-101-1/+1
| | | | | | * src/thread.c (mark_one_thread): Use NILP to compare with m_saved_last_thing_searched, which is a Lisp object. Reported by Andreas Politz <politza@hochschule-trier.de>.
* Documentation and commentary improvementsEli Zaretskii2016-12-103-0/+6
| | | | | | | | | | | | * src/lisp.h: * src/regex.c: * src/xgselect.c (xg_select): Improve commentary and formatting. * doc/lispref/objects.texi (Thread Type, Mutex Type) (Condition Variable Type): New subsections. (Type Predicates): Add thread-related predicates. * doc/lispref/objects.texi (Editing Types): * doc/lispref/elisp.texi (Top): Update higher-level menus.
* *src/sysdep.c: Fix a comment.Eli Zaretskii2016-12-091-1/+1
|
* Fix compilation error on Fedora 24Eli Zaretskii2016-12-091-6/+0
| | | | | * src/sysdep.c [HAVE_H_ERRNO]: Remove declaration of h_errno. Reported by Paul Eggert <eggert@cs.ucla.edu>.
* Fix compilation warnings due to prototype of thread_selectEli Zaretskii2016-12-094-5/+5
| | | | | | | | * src/thread.h <int select_func>: Make the 5th and 6th arguments be 'const'. * src/process.c [WINDOWSNT]: * src/w32proc.c: Make the 5th and 6th argument to sys_select be 'const'.
* Fix compilation on Debian GNU/LinuxEli Zaretskii2016-12-091-0/+1
| | | | | * src/thread.h: Include sys/types.h, for ssize_t that regex.h uses. Reported by Robert Marshall <robert.marshall@codethink.co.uk>.
* Fix subtle errors with let-binding of localized variablesEli Zaretskii2016-12-091-16/+14
| | | | | | | | | | * src/eval.c (do_specbind): Don't require a "symbol" that is actually a cons cell, in order to call set-default, as there are no longer such bindings. This makes do_specbind work like the pre-concurrency implementation in specbind for bindings of forwarded symbols. Use specpdl_kind to access the type of the binding. (specpdl_kind): New function.
* Fix compilation warningsEli Zaretskii2016-12-081-1/+1
| | | | | * src/thread.c (Fmake_thread): Call emacs_abort, to avoid compilation warning.
* Fix network streams.Eli Zaretskii2016-12-073-20/+27
| | | | | The original code messed up flags in fd_callback_data[], and also didn't call add_process_read_fd for process-related file descriptors.
* Minimize spurious diffs from master.Eli Zaretskii2016-12-073-5/+6
|
* Fix a typo in bytecode.c.Eli Zaretskii2016-12-061-2/+3
|
* Fix compilation problems.Eli Zaretskii2016-12-058-48/+10
|
* Fix merged code in process.c and eval.c.Eli Zaretskii2016-12-052-11/+33
|
* Merge branch 'concurrency'Eli Zaretskii2016-12-0426-441/+2780
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts (resolved): configure.ac src/Makefile.in src/alloc.c src/bytecode.c src/emacs.c src/eval.c src/lisp.h src/process.c src/regex.c src/regex.h
| * ; * src/systhread.c [WINDOWSNT]: Fix typos in comments.old-branches/concurrencyEli Zaretskii2015-11-031-5/+5
| |
| * Fix the MS-Windows buildEli Zaretskii2015-11-029-65/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/thread.h [WINDOWSNT]: Include sys/socket.h. * src/sysselect.h: Don't define fd_set and FD_* macros for MS-Windows here. * src/w32.h: Define them here. * src/process.h (sys_select): Declare prototype. * src/sysdep.c: * src/process.c: * src/filelock.c: * src/emacs.c: * src/callproc.c: Move inclusion of sys/select.h after lisp.h. * nt/inc/socket.h: Include w32.h instead of sysselect.h
| * merge from trunkKen Raeburn2015-11-01218-44080/+86889
| |\
| * | * src/eval.c (unbind_for_thread_switch): Fix iteration over theBarry O'Reilly2013-10-192-2/+7
| | | | | | | | | | | | specpdl stack.
| * | change condition-variablep to condition-variable-pTom Tromey2013-10-172-5/+5
| | |
| * | Fix crashes when unbind_for_thread_switch signals an error.Eli Zaretskii2013-09-014-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | src/eval.c (unbind_for_thread_switch): Accept a 'struct thread_state *' argument and use specpdl_ptr and specpdl of that thread. Fixes crashes if find_symbol_value signals an error. src/thread.c (post_acquire_global_lock): Update current_thread before calling unbind_for_thread_switch. Pass the previous thread to unbind_for_thread_switch.
| * | Improve MS-Windows implementation of threads.Eli Zaretskii2013-08-314-14/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/systhread.c (sys_cond_init): Set the 'initialized' member to true only if initialization is successful. Initialize wait_count and wait_count_lock. (sys_cond_wait, sys_cond_signal, sys_cond_broadcast): If 'initialized' is false, do nothing. (sys_cond_wait): Fix the implementation to avoid the "missed wakeup" bug: count the waiting threads, and reset the broadcast event once the last thread was released. (sys_cond_signal, sys_cond_broadcast): Use SetEvent instead of PulseEvent. Don't signal the event if no threads are waiting. (sys_cond_destroy): Only close non-NULL handles. (sys_thread_create): Return zero if unsuccessful, 1 if successful. src/systhread.h (w32thread_cond_t): New member 'initialized'. Rename waiters_count and waiters_count_lock to wait_count and wait_count_lock, respectively.
| * | Enable thread support in the MS-Windows build.Eli Zaretskii2013-08-303-0/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/systhread.h (w32thread_critsect, w32thread_cond_t, sys_mutex_t) (sys_cond_t, sys_thread_t) [WINDOWSNT]: New data types. src/systhread.c (sys_mutex_init, sys_mutex_lock, sys_mutex_unlock) (sys_mutex_destroy, sys_cond_init, sys_cond_wait) (sys_cond_signal, sys_cond_broadcast, sys_cond_destroy) (sys_thread_self, sys_thread_equal, w32_beginthread_wrapper) (sys_thread_create, sys_thread_yield) [WINDOWSNT]: New functions. configure.ac (THREADS_ENABLED): Enable threads for MinGW, even if pthreads is not available.
| * | rename thread-blocker to thread--blockerTom Tromey2013-08-271-1/+1
| | |
| * | remove binding_symbolTom Tromey2013-08-271-11/+3
| | |
| * | fix style of threadp, mutexp, and condition-variable-pTom Tromey2013-08-271-6/+3
| | |
| * | make thread_check_current_buffer return boolTom Tromey2013-08-272-4/+4
| | |
| * | add a comment before flush_stack_call_funcTom Tromey2013-08-271-0/+11
| | |
| * | fix whitespace_regexp warningTom Tromey2013-08-261-1/+3
| | |
| * | Fix MS-Windows build.Eli Zaretskii2013-08-2610-58/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/callproc.c: src/emacs.c: src/filelock.c: src/process.c: src/sysdep.c: src/w32.c: Reshuffle Windows-specific headers to avoid errors with redefinition of fd_set etc. src/process.c: Don't use num_pending_connects when NON_BLOCKING_CONNECT is not defined. src/sysselect.h: Move definitions of FD_* macros and of SELECT_TYPE here from w32.h. src/w32proc.c (sys_select): Adjust the argument types to what thread.h expects. nt/inc/sys/socket.h: Include stdint.h. Include sysselect.h instead of w32.h.
| * | use record_unwind_protect_void, avoid warningTom Tromey2013-08-261-4/+3
| | |
| * | implement --enable-threads and a thread-less modeTom Tromey2013-08-263-23/+112
| | |
| * | merge from trunkTom Tromey2013-08-2519-327/+466
| |\ \
| * | | fix up some merge errors in process.cTom Tromey2013-08-191-17/+1
| | | | | | | | | | | | | | | | | | | | remove a dead function clean up a fixme I added in create_pty during the merge
| * | | merge from trunkTom Tromey2013-08-1995-2885/+4242
| |\ \ \
| * \ \ \ merge from trunkTom Tromey2013-07-2674-1604/+2378
| |\ \ \ \
| * \ \ \ \ Merge from trunkTom Tromey2013-07-1256-1037/+1453
| |\ \ \ \ \
| * | | | | | Use thread_alive_p in a couple more spotsTom Tromey2013-07-111-2/+2
| | | | | | |
| * | | | | | fix xfree bug in run_threadTom Tromey2013-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this fixes run_thread to account for the dummy slot in specpdl
| * | | | | | merge from trunkTom Tromey2013-07-0670-24722/+27505
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this merges frmo trunk and fixes various build issues. this needed a few ugly tweaks. this hangs in "make check" now
| * | | | | | | add assertion to flush_stack_call_funcTom Tromey2013-07-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functions called via flush_stack_call_func are assumed to return with the global lock held again, and with current_thread reset. this assertion verifies part of this
| * | | | | | | call init_primary_thread from init_threadsTom Tromey2013-07-061-0/+1
| | | | | | | |
| * | | | | | | avoid SAFE_ALLOCATom Tromey2013-07-041-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | avoid SAFE_ALLOCA in xgselect.c. in this code it is just as easy to always use malloc; and it avoids thread-switching problems, as the safe-alloca stuff implicitly refers to the current thread
| * | | | | | | avoid current_thread sometimesTom Tromey2013-07-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this tweaks thread.c to use 'self' instead of current_thread in a couple spots. this is clearer and more robust
| * | | | | | | initialize saved_valueTom Tromey2013-07-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialize the saved_value field in all needed cases also, add an assertion to do_one_unbind
| * | | | | | | unlink thread laterTom Tromey2013-07-031-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unlink thread from global list later also remove some unnecessary destruction code
| * | | | | | | introduce thread_alive_p macroTom Tromey2013-07-031-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces the thread_alive_p macro and changes thread-alive-p to use it. This is a minor cleanup. It also changes all-threads to ignore dead threads.
| * | | | | | | Don't call unbind_for_thread_switch in run_threadTom Tromey2013-07-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the call to unbind_for_thread_switch from run_thread. This isn't necessary because acquire_global_lock does it properly.
| * | | | | | | remove unused field from struct thread_stateTom Tromey2013-07-031-6/+0
| | | | | | | |