2002-06-04 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Multi Threading): Document new autodetection.
This commit is contained in:
parent
4df073b733
commit
e202b91008
@ -1,3 +1,7 @@
|
|||||||
|
2002-06-04 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
|
* gpgme.texi (Multi Threading): Document new autodetection.
|
||||||
|
|
||||||
2002-06-04 Marcus Brinkmann <marcus@g10code.de>
|
2002-06-04 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
* Makefile.am (DISTCLEANFILES): New variable.
|
* Makefile.am (DISTCLEANFILES): New variable.
|
||||||
|
@ -450,17 +450,40 @@ If the following requirements are met, there should be no race
|
|||||||
conditions to worry about:
|
conditions to worry about:
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@item
|
||||||
|
@acronym{GPGME} supports the thread libraries pthread and GNU Pth.
|
||||||
|
The support for this has to be enabled at compile time.
|
||||||
|
@acronym{GPGME} will automatically detect the location in which the
|
||||||
|
thread libraries are installed and activate the support for them.
|
||||||
|
|
||||||
|
Support for other thread libraries is very easy to add. Please
|
||||||
|
contact us if you have the need.
|
||||||
|
|
||||||
|
@item
|
||||||
|
If you link your program dynamically to @acronym{GPGME} and your
|
||||||
|
supported thread library, @acronym{GPGME} will automatically detect
|
||||||
|
the presence of this library and activate its use. If you link to
|
||||||
|
both pthread and GNU Pth, @acronym{GPGME} will use the pthread
|
||||||
|
support. This feature requires weak symbol support.
|
||||||
|
|
||||||
|
@item
|
||||||
|
If you link your program statically to @acronym{GPGME}, there is
|
||||||
|
currently no easy way to make sure that @acronym{GPGME} detects the
|
||||||
|
presence of the thread library. This will be solved in a future
|
||||||
|
version.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
The function @code{gpgme_check_version} must be called before any
|
The function @code{gpgme_check_version} must be called before any
|
||||||
other function in the library, because it initializes the locking
|
other function in the library, because it initializes the thread
|
||||||
subsystem in @acronym{GPGME}. To achieve this in all generality, it
|
support subsystem in @acronym{GPGME}. To achieve this in all
|
||||||
is necessary to synchronize the call to this function with all other
|
generality, it is necessary to synchronize the call to this function
|
||||||
calls to functions in the library, using the synchronization
|
with all other calls to functions in the library, using the
|
||||||
mechanisms available in your thread library. Otherwise, specific
|
synchronization mechanisms available in your thread library.
|
||||||
compiler or CPU memory cache optimizations could lead to the situation
|
Otherwise, specific compiler or CPU memory cache optimizations could
|
||||||
where a thread is started and uses @acronym{GPGME} before the effects
|
lead to the situation where a thread is started and uses
|
||||||
of the initialization are visible for this thread. It doesn't even
|
@acronym{GPGME} before the effects of the initialization are visible
|
||||||
suffice to call @code{gpgme_check_version} before creating this other
|
for this thread. It doesn't even suffice to call
|
||||||
|
@code{gpgme_check_version} before creating this other
|
||||||
thread@footnote{In SMP systems the new thread could be started on
|
thread@footnote{In SMP systems the new thread could be started on
|
||||||
another CPU before the effects of the initialization are seen by that
|
another CPU before the effects of the initialization are seen by that
|
||||||
CPU's memory cache. Not doing proper synchronization here leads to
|
CPU's memory cache. Not doing proper synchronization here leads to
|
||||||
|
Loading…
Reference in New Issue
Block a user