diff options
author | Tim Janik <timj@gtk.org> | 1998-12-16 05:38:35 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-12-16 05:38:35 +0000 |
commit | b2e318ff3ecc50d72121a4e8561442a6d79a7a84 (patch) | |
tree | 87b800eae111a2ace0cde58292ae72fea3a8c19d /gmodule | |
parent | 06600bd0e6b82639410394ed6b5ebb1189cfdeb3 (diff) | |
download | glib-b2e318ff3ecc50d72121a4e8561442a6d79a7a84.tar.gz |
version bump to 1.1.8, binary age 0, interface age 0.
Wed Dec 16 03:16:58 1998 Tim Janik <timj@gtk.org>
* configure.in: version bump to 1.1.8, binary age 0, interface age 0.
* glib.h: changed g_lock() to G_LOCK(), g_unlock() to G_UNLOCK() and
g_trylock() to G_TRYLOCK(), since these are macros that expand to
nothing with --disable-threads.
changed G_LOCK_DEFINE() to G_LOCK_DECLARE() and introduced
G_LOCK_DECLARE_STATIC() to achive the results of static G_LOCK_DECLARE().
changed semantics of g_thread_supported to g_thread_supported() so it
can be used as a function like g_module_supported(). the actuall
definition is still a macro that expands into a variable for
performance reasons though.
various indentation and coding style cleanups.
* configure.in: added --enable-threads that defaults to yes.
* gmutex.c: changed tests g_thread_supported to g_thread_supported (),
changed variable settings of g_thread_supported
to g_threads_got_initialized.
garray.c:
gcache.c:
gdataset.c:
gdate.c:
ghash.c:
glist.c:
gmain.c:
gnode.c:
gslist.c:
gstring.c:
gtree.c:
gutils.c:
changed s/g_lock/G_LOCK/, s/g_unlock/G_UNLOCK/,
s/static G_LOCK_DEFINE/G_LOCK_DECLARE_STATIC/.
Diffstat (limited to 'gmodule')
-rw-r--r-- | gmodule/gmodule.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gmodule/gmodule.c b/gmodule/gmodule.c index 71f614570..99f38a6a4 100644 --- a/gmodule/gmodule.c +++ b/gmodule/gmodule.c @@ -64,7 +64,7 @@ static inline GModule* g_module_find_by_name (const gchar *name); /* --- variables --- */ -static G_LOCK_DEFINE (g_module_global); +G_LOCK_DECLARE_STATIC (GModule); const char *g_log_domain_gmodule = "GModule"; static GModule *modules = NULL; static GModule *main_module = NULL; @@ -78,7 +78,7 @@ g_module_find_by_handle (gpointer handle) GModule *module; GModule *retval = NULL; - g_lock (g_module_global); + G_LOCK (GModule); if (main_module && main_module->handle == handle) retval = main_module; else @@ -88,7 +88,7 @@ g_module_find_by_handle (gpointer handle) retval = module; break; } - g_unlock (g_module_global); + G_UNLOCK (GModule); return retval; } @@ -99,14 +99,14 @@ g_module_find_by_name (const gchar *name) GModule *module; GModule *retval = NULL; - g_lock (g_module_global); + G_LOCK (GModule); for (module = modules; module; module = module->next) if (strcmp (name, module->file_name) == 0) { retval = module; break; } - g_unlock (g_module_global); + G_UNLOCK (GModule); return retval; } @@ -198,7 +198,7 @@ g_module_open (const gchar *file_name, if (!file_name) { - g_lock (g_module_global); + G_LOCK (GModule); if (!main_module) { handle = _g_module_self (); @@ -213,7 +213,7 @@ g_module_open (const gchar *file_name, main_module->next = NULL; } } - g_unlock (g_module_global); + G_UNLOCK (GModule); return main_module; } @@ -256,10 +256,10 @@ g_module_open (const gchar *file_name, module->ref_count = 1; module->is_resident = FALSE; module->unload = NULL; - g_lock (g_module_global); + G_LOCK (GModule); module->next = modules; modules = module; - g_unlock (g_module_global); + G_UNLOCK (GModule); /* check initialization */ if (g_module_symbol (module, "g_module_check_init", (gpointer) &check_init)) @@ -313,7 +313,7 @@ g_module_close (GModule *module) last = NULL; - g_lock (g_module_global); + G_LOCK (GModule); node = modules; while (node) { @@ -329,7 +329,7 @@ g_module_close (GModule *module) node = last->next; } module->next = NULL; - g_unlock (g_module_global); + G_UNLOCK (GModule); _g_module_close (module->handle, FALSE); g_free (module->file_name); |