newdoc: mp: improve documentation

This commit is contained in:
Daniel Kochmański 2016-11-10 19:43:28 +01:00
parent c1067620a7
commit a95e33b9e0
2 changed files with 37 additions and 13 deletions

View file

@ -42,7 +42,30 @@ both for flexibility and a greater risk. In order to control access to
different resources, ECL provides the user with locks, as explained in
the next section.
@node Native threads reference
@node Locks (mutexes)
@subsection Locks and readers-writer locks
Locks are used to synchronize access to the shared data. Lock may be
owned only by a single thread at any given time. Recursive locks may be
re-acquired by the same thread multiple times (and non-recursive locks
can't).
Readers-writer (or shared-exclusive ) lock allows concurrent access for
read-only operations and write operations require exclusive access.
@node Condition variables
@subsection Condition variables
Condition variables are used to wait for a particular condition becoming
true (e.g new client connects to the server).
@node Synchronization primitives
@subsection Semaphores
@subsection Barriers
@subsection Mailboxes
@subsection Atomic operations
@node Native threads dictionary
@subsection Native threads reference
@include extensions/mp_ref_process.txi

View file

@ -1,19 +1,20 @@
@node Locks
@subsubsection Locks (mutexes)
/* threads/process.d */
@lspindex mp:make_lock
@cppindex mp_make_lock
@defun mp:make_lock
@table @var
@item returns
???
@item C/C++ signature
cl_object mp_make_lock _ECL_ARGS((cl_narg narg, ...));
@end table
@node Locks dictionary
@subsubsection Locks dictionary
@cppindex ecl_make_lock
@deftypefun ecl_make_lock (cl_object name, bool recursive)
@end deftypefun
@lspindex mp:make-lock
@defun mp:make-lock &key name ((:recursive recursive) ECL_NIL)
@end defun
@lspindex mp:recursive_lock_p
@lspindex mp_recursive_lock_p
@defun mp:recursive_lock_p