Removed G_THREADS_IMPL_NSPR. Shouldn't be used anyway.

1999-12-02  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib-sections.txt, tmpl/threads.sgml: Removed
	G_THREADS_IMPL_NSPR. Shouldn't be used anyway.

	* glib-overrides.txt: New file, that makes most of the thread
	related macros look like functions.

	* Makefile.am: Added glib-overrides.txt to EXTRA_DIST.

	* tmpl/threads.sgml: Minor updates.
This commit is contained in:
Sebastian Wilhelmi 1999-12-02 14:32:41 +00:00 committed by Sebastian Wilhelmi
parent c54892b11b
commit d1bbb7f07f
7 changed files with 226 additions and 19 deletions

View File

@ -1,3 +1,15 @@
1999-12-02 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib-sections.txt, tmpl/threads.sgml: Removed
G_THREADS_IMPL_NSPR. Shouldn't be used anyway.
* glib-overrides.txt: New file, that makes most of the thread
related macros look like functions.
* Makefile.am: Added glib-overrides.txt to EXTRA_DIST.
* tmpl/threads.sgml: Minor updates.
Tue Aug 17 08:42:17 1999 Owen Taylor <otaylor@redhat.com>
* tmpl/datasets.sgml: Added missing </para>

View File

@ -37,7 +37,8 @@ install-data-local:
EXTRA_DIST = \
$(DOC_MAIN_SGML_FILE) \
$(DOC_MODULE)-sections.txt \
glib-decl.txt
glib-decl.txt \
glib-overrides.txt
dist-hook:
mkdir $(distdir)/tmpl

View File

@ -0,0 +1,191 @@
# This file makes most of the thread related macros look like
# functions, which they really were, if possible easy.
# default thread implementation
<MACRO>
<NAME>G_THREADS_IMPL_POSIX</NAME>
#define G_THREADS_IMPL_POSIX
</MACRO>
<MACRO>
<NAME>G_THREADS_IMPL_SOLARIS</NAME>
#define G_THREADS_IMPL_SOLARIS
</MACRO>
<MACRO>
<NAME>G_THREADS_IMPL_NONE</NAME>
#define G_THREADS_IMPL_NONE
</MACRO>
# threads supported?
<FUNCTION>
<NAME>g_thread_supported</NAME>
<RETURNS>gboolean</RETURNS>
</FUNCTION>
# GMutex
<FUNCTION>
<NAME>g_mutex_new</NAME>
<RETURNS>GMutex *</RETURNS>
</FUNCTION>
<FUNCTION>
<NAME>g_mutex_lock</NAME>
<RETURNS>void</RETURNS>
GMutex *mutex
</FUNCTION>
<FUNCTION>
<NAME>g_mutex_trylock</NAME>
<RETURNS>gboolean</RETURNS>
GMutex *mutex
</FUNCTION>
<FUNCTION>
<NAME>g_mutex_unlock</NAME>
<RETURNS>void</RETURNS>
GMutex *mutex
</FUNCTION>
<FUNCTION>
<NAME>g_mutex_free</NAME>
<RETURNS>void</RETURNS>
GMutex *mutex
</FUNCTION>
# GStaticMutex
<STRUCT>
<NAME>GStaticMutex</NAME>
</STRUCT>
<MACRO>
<NAME>G_STATIC_MUTEX_INIT</NAME>
#define G_STATIC_MUTEX_INIT
</MACRO>
<FUNCTION>
<NAME>g_static_mutex_lock</NAME>
<RETURNS>void</RETURNS>
GStaticMutex* mutex
</FUNCTION>
<FUNCTION>
<NAME>g_static_mutex_trylock</NAME>
<RETURNS>gboolean</RETURNS>
GStaticMutex* mutex
</FUNCTION>
<FUNCTION>
<NAME>g_static_mutex_unlock</NAME>
<RETURNS>void</RETURNS>
GStaticMutex* mutex
</FUNCTION>
<FUNCTION>
<NAME>g_static_mutex_get_mutex</NAME>
<RETURNS>GMutex *</RETURNS>
GStaticMutex* mutex
</FUNCTION>
# G_LOCK_* macros
<MACRO>
<NAME>G_LOCK_DEFINE</NAME>
#define G_LOCK_DEFINE(name)
</MACRO>
<MACRO>
<NAME>G_LOCK_DEFINE_STATIC</NAME>
#define G_LOCK_DEFINE_STATIC(name)
</MACRO>
<MACRO>
<NAME>G_LOCK_EXTERN</NAME>
#define G_LOCK_EXTERN(name)
</MACRO>
<MACRO>
<NAME>G_LOCK</NAME>
#define G_LOCK(name)
</MACRO>
<MACRO>
<NAME>G_UNLOCK</NAME>
#define G_UNLOCK(name)
</MACRO>
<MACRO>
<NAME>G_TRYLOCK</NAME>
#define G_TRYLOCK(name)
</MACRO>
# GCond
<FUNCTION>
<NAME>g_cond_new</NAME>
<RETURNS>GCond*</RETURNS>
</FUNCTION>
<FUNCTION>
<NAME>g_cond_signal</NAME>
<RETURNS>void</RETURNS>
GCond *cond
</FUNCTION>
<FUNCTION>
<NAME>g_cond_broadcast</NAME>
<RETURNS>void</RETURNS>
GCond *cond
</FUNCTION>
<FUNCTION>
<NAME>g_cond_wait</NAME>
<RETURNS>void</RETURNS>
GCond *cond, GMutex *mutex
</FUNCTION>
<FUNCTION>
<NAME>g_cond_timed_wait</NAME>
<RETURNS>gboolean</RETURNS>
GCond *cond, GMutex *mutex, GTimeVal *abs_time
</FUNCTION>
<FUNCTION>
<NAME>g_cond_free</NAME>
<RETURNS>void</RETURNS>
GCond *cond
</FUNCTION>
# GPrivate
<FUNCTION>
<NAME>g_private_new</NAME>
<RETURNS>GPrivate*</RETURNS>
GDestroyNotify destructor
</FUNCTION>
<FUNCTION>
<NAME>g_private_get</NAME>
<RETURNS>gpointer</RETURNS>
GPrivate *private_key
</FUNCTION>
<FUNCTION>
<NAME>g_private_set</NAME>
<RETURNS>void</RETURNS>
GPrivate *private_key, gpointer data
</FUNCTION>
# GStaticPrivate
<MACRO>
<NAME>G_STATIC_PRIVATE_INIT</NAME>
#define G_STATIC_PRIVATE_INIT
</MACRO>

View File

@ -315,7 +315,6 @@ G_WIN32_MSG_HANDLE
G_THREADS_ENABLED
G_THREADS_IMPL_POSIX
G_THREADS_IMPL_SOLARIS
G_THREADS_IMPL_NSPR
G_THREADS_IMPL_NONE
<SUBSECTION>

View File

@ -1,3 +1,15 @@
1999-12-02 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib-sections.txt, tmpl/threads.sgml: Removed
G_THREADS_IMPL_NSPR. Shouldn't be used anyway.
* glib-overrides.txt: New file, that makes most of the thread
related macros look like functions.
* Makefile.am: Added glib-overrides.txt to EXTRA_DIST.
* tmpl/threads.sgml: Minor updates.
Tue Aug 17 08:42:17 1999 Owen Taylor <otaylor@redhat.com>
* tmpl/datasets.sgml: Added missing </para>

View File

@ -37,7 +37,8 @@ install-data-local:
EXTRA_DIST = \
$(DOC_MAIN_SGML_FILE) \
$(DOC_MODULE)-sections.txt \
glib-decl.txt
glib-decl.txt \
glib-overrides.txt
dist-hook:
mkdir $(distdir)/tmpl

View File

@ -32,12 +32,11 @@ that every thread has a private instance of (#GPrivate,
<para>
Currently there is only as much thread support included in GLib as is
necessary to make GLib itself multithread safe. Future versions of
GLib might contain functions to actually create threads and the
like. For now the most portable way to create threads is to require
the macro #G_THREADS_IMPL_POSIX to be defined and use POSIX threads
then. This will work on almost all platforms (except most notably
Solaris).
necessary to make GLib itself multithread safe. Version 1.4 of GLib
will contain full thread support. For now the most portable way to
create threads is to require the macro #G_THREADS_IMPL_POSIX to be
defined and use POSIX threads then. This will work on almost all
platforms (except most notably Solaris and DCE threads.).
</para>
<!-- ##### SECTION See_Also ##### -->
@ -73,15 +72,6 @@ This macro is defined, if the SOLARIS thread system is used.
<!-- ##### MACRO G_THREADS_IMPL_NSPR ##### -->
<para>
This macro is defined, if the NSPR thread implementation is used.
NSPR is the cross platform library of mozilla.
</para>
<!-- ##### MACRO G_THREADS_IMPL_NONE ##### -->
<para>
@ -501,11 +491,12 @@ give_me_next_number() example using the G_LOCK_* macros:
<example>
<title>Using the G_LOCK_* convenience macros</title>
<programlisting>
G_LOCK_DEFINE (current_number);
int give_me_next_number ()
{
static int current_number = 0;
int ret_val;
G_LOCK_DEFINE_STATIC (current_number);
G_LOCK (current_number);
ret_val = current_number = calc_next_number (current_number);