platform/upstream/glib.git
13 years agoAdd another mimeapps test
Edward Sheldrake [Wed, 21 Sep 2011 18:14:50 +0000 (19:14 +0100)]
Add another mimeapps test

This tests the interaction between mimeinfo.cache, defaults.list and
mimeapps.list to ensure g_app_info_set_as_last_used_for_type doesn't
incorrectly change the default.

https://bugzilla.gnome.org/show_bug.cgi?id=658188

13 years agog_simple_async_result_complete_in_idle: add a minor doc clarification
Dan Winship [Mon, 26 Sep 2011 16:42:23 +0000 (12:42 -0400)]
g_simple_async_result_complete_in_idle: add a minor doc clarification

13 years agoglib tests: Compile new thread tests on win32
Ryan Lortie [Mon, 26 Sep 2011 13:05:53 +0000 (09:05 -0400)]
glib tests: Compile new thread tests on win32

They accidentally got added inside of a 'if OS_UNIX'.  Move them out.

13 years agowinxp threads: detect SRWLock emulation reentrancy
Ryan Lortie [Mon, 26 Sep 2011 08:44:41 +0000 (04:44 -0400)]
winxp threads: detect SRWLock emulation reentrancy

We lack SRWLock on Windows XP, so we use CRITICAL_SECTION to emulate it
there.  SRWLock is non-recursive, but CRITICAL_SECTION will happily
allow itself to be acquired multiple times by the same thread.

We need to detect if our second acquire succeeded because of the
recursive nature of CRITICAL_SECTION.  In the case of a _lock()
operation, we would normally have deadlocked, so abort.  In the case of
a _trylock() operation, we need to ensure that FALSE is properly
returned.

Problem caught by Matthias Clasen and Chun-wei Fan.

https://bugzilla.gnome.org/show_bug.cgi?id=660096

13 years ago[l10n]Updated Catalan (Valencian) translation
Carles Ferrando [Mon, 26 Sep 2011 12:40:23 +0000 (14:40 +0200)]
[l10n]Updated Catalan (Valencian) translation

13 years agoUpdate Czech translation
Petr Kovar [Sun, 25 Sep 2011 21:35:27 +0000 (23:35 +0200)]
Update Czech translation

13 years ago[l10n]Updated Catalan translation
Gil Forcada [Sun, 25 Sep 2011 21:12:36 +0000 (23:12 +0200)]
[l10n]Updated Catalan translation

13 years agogvariant: Add g_variant_get_fixed_array()
Stef Walter [Fri, 23 Sep 2011 08:57:55 +0000 (10:57 +0200)]
gvariant: Add g_variant_get_fixed_array()

Using g_variant_new_from_data() for creating new byte arrays is non-obvious.
This patch adds a g_variant_new_fixed_array() function.

https://bugzilla.gnome.org/show_bug.cgi?id=659923

13 years agoMore GThread docs tweaks
Matthias Clasen [Sun, 25 Sep 2011 05:32:41 +0000 (01:32 -0400)]
More GThread docs tweaks

13 years agoMove GThread docs around
Matthias Clasen [Sun, 25 Sep 2011 04:53:47 +0000 (00:53 -0400)]
Move GThread docs around

13 years agoMove includes to the top of the file
Matthias Clasen [Sun, 25 Sep 2011 04:42:37 +0000 (00:42 -0400)]
Move includes to the top of the file

13 years agoMove deprecated GThread functions to a separate file
Matthias Clasen [Sun, 25 Sep 2011 04:37:31 +0000 (00:37 -0400)]
Move deprecated GThread functions to a separate file

13 years agoGThread: more doc updates
Matthias Clasen [Sun, 25 Sep 2011 03:40:18 +0000 (23:40 -0400)]
GThread: more doc updates

13 years agoDrop G_THREADS_IMPL_NONE from the docs
Matthias Clasen [Sun, 25 Sep 2011 03:13:55 +0000 (23:13 -0400)]
Drop G_THREADS_IMPL_NONE from the docs

GLib can no longer be built without thread support.

13 years agoFix warning/error C4013 (implicit declarations)
Chun-wei Fan [Fri, 23 Sep 2011 03:27:45 +0000 (11:27 +0800)]
Fix warning/error C4013 (implicit declarations)

-Include gthread.h in gregex.c as g_once_init_enter and g_once_init_leave
 are used.
-Define prototype for g_thread_DllMain in gthreadprivate.h for Windows

13 years agogthread.c: Declare variable at start of block
Chun-wei Fan [Fri, 23 Sep 2011 05:37:08 +0000 (13:37 +0800)]
gthread.c: Declare variable at start of block

This is so that C89 compilers will not complain.

13 years agoDocument G_THREADS_IMPL_WIN32
Matthias Clasen [Sat, 24 Sep 2011 23:04:46 +0000 (19:04 -0400)]
Document G_THREADS_IMPL_WIN32

13 years agoGThread doc additions
Matthias Clasen [Sat, 24 Sep 2011 23:00:19 +0000 (19:00 -0400)]
GThread doc additions

13 years agoFix an uninialized variable warning
Matthias Clasen [Sat, 24 Sep 2011 20:38:51 +0000 (16:38 -0400)]
Fix an uninialized variable warning

13 years agoUpdated Slovak translation
Peter Mráz [Sat, 24 Sep 2011 19:52:10 +0000 (21:52 +0200)]
Updated Slovak translation

13 years agoUpdated Danish translation
Kenneth Nielsen [Sat, 24 Sep 2011 12:42:07 +0000 (14:42 +0200)]
Updated Danish translation

13 years agoAdd a testcase for bug 659866
Matthias Clasen [Sat, 24 Sep 2011 04:39:59 +0000 (00:39 -0400)]
Add a testcase for bug 659866

Mere inclusion of glib headers should not require you to define
any XYZ_SOURCE macros.

13 years agoAdd a test for GCond
Matthias Clasen [Sat, 24 Sep 2011 03:38:26 +0000 (23:38 -0400)]
Add a test for GCond

13 years agoAdd a nontrivial read-write lock test
Matthias Clasen [Sat, 24 Sep 2011 02:07:32 +0000 (22:07 -0400)]
Add a nontrivial read-write lock test

13 years agoAdd GOnce tests
Matthias Clasen [Sat, 24 Sep 2011 01:10:40 +0000 (21:10 -0400)]
Add GOnce tests

13 years agoMake the rec mutex test a little more verbose
Matthias Clasen [Fri, 23 Sep 2011 11:26:33 +0000 (07:26 -0400)]
Make the rec mutex test a little more verbose

13 years agogiostream: "closed" property should not be marked writable
Dan Winship [Fri, 23 Sep 2011 12:53:47 +0000 (08:53 -0400)]
giostream: "closed" property should not be marked writable

https://bugzilla.gnome.org/show_bug.cgi?id=659920

13 years agogio-2.0.pc.in: drop stray reference to libasyncns
Dan Winship [Fri, 23 Sep 2011 11:46:55 +0000 (07:46 -0400)]
gio-2.0.pc.in: drop stray reference to libasyncns

gio-2.0.pc's Libs.private was still using @LIBASYNCNS_LIBADD@, which
was no longer being substituted to anything and so broke "pkg-config
--static". Fix it to be @NETWORK_LIBS@ instead.

https://bugzilla.gnome.org/show_bug.cgi?id=659889

13 years agoAdd a non-trivial GRWLock test
Matthias Clasen [Fri, 23 Sep 2011 11:21:53 +0000 (07:21 -0400)]
Add a non-trivial GRWLock test

This one tests that the writer lock behaves like a mutex.
Adapted from the corresponding test in GMutex.

13 years agoAdd a non-trivial GRecMutex test
Matthias Clasen [Fri, 23 Sep 2011 11:14:13 +0000 (07:14 -0400)]
Add a non-trivial GRecMutex test

Adapted from the corresponding GMutex test.

13 years agoRemove an unused variable
Matthias Clasen [Fri, 23 Sep 2011 11:13:47 +0000 (07:13 -0400)]
Remove an unused variable

13 years agoUpdated Oriya Translation
Manoj Kumar Giri [Fri, 23 Sep 2011 10:53:44 +0000 (16:23 +0530)]
Updated Oriya Translation

13 years agoAdd some more rw lock tests
Matthias Clasen [Fri, 23 Sep 2011 10:31:12 +0000 (06:31 -0400)]
Add some more rw lock tests

These test some simple mixed reader/writer api usage.

13 years agoAdd a mutex test
Matthias Clasen [Fri, 23 Sep 2011 10:29:36 +0000 (06:29 -0400)]
Add a mutex test

This tests that mutexes do what they are supposed to do.
Copied from a similar test for bitlocks in gthread/tests/bitlock.c.

13 years agoUpdated Hebrew translation
Yaron Shahrabani [Fri, 23 Sep 2011 05:23:25 +0000 (08:23 +0300)]
Updated Hebrew translation

13 years agoAdd headers
Matthias Clasen [Fri, 23 Sep 2011 02:44:53 +0000 (22:44 -0400)]
Add headers

13 years agoFix g_rwlock_{writer,reader}_trylock
Matthias Clasen [Fri, 23 Sep 2011 02:44:05 +0000 (22:44 -0400)]
Fix g_rwlock_{writer,reader}_trylock

13 years agoAdd basic tests for GRWLock
Matthias Clasen [Fri, 23 Sep 2011 02:43:29 +0000 (22:43 -0400)]
Add basic tests for GRWLock

Just basic api usage, no functional test cases yet.

13 years agoVS support updates
Chun-wei Fan [Fri, 23 Sep 2011 02:41:19 +0000 (10:41 +0800)]
VS support updates

-Fix GLib project/filter files generation as some source items are under
 the "deprecated" subfolder, and filter out the gthread-*.c
-Explicitly specify gthread-win32.c in the GLib project/filter file
 templates, since tarballs are done on Linux.
-Don't define g_static_mutex_get_mutex in the pregenerated
 glibconfig.h.win32(.in) as it is defined in deprecated/gthread.h for Windows

13 years agoFix g_rec_mutex_trylock
Matthias Clasen [Fri, 23 Sep 2011 01:58:28 +0000 (21:58 -0400)]
Fix g_rec_mutex_trylock

13 years agoAdd trivial tests for GMutex and GRecMutex
Matthias Clasen [Fri, 23 Sep 2011 01:55:43 +0000 (21:55 -0400)]
Add trivial tests for GMutex and GRecMutex

Not testing any mutual exclusion with threads yet, just
basic api use. This is already enough to reveal g_rec_mutex_trylock
as broken...

13 years agogmappedfile.c: Define S_IFREG on Win32 when it's not available
Chun-wei Fan [Thu, 22 Sep 2011 14:10:23 +0000 (22:10 +0800)]
gmappedfile.c: Define S_IFREG on Win32 when it's not available

Make a workaround for S_IFREG in gmappedfile.c on Windows as it may not be
available for a given compiler on that platform

13 years agogvalue: Add explicitly signed g_value_get_schar() and g_value_set_schar()
Colin Walters [Thu, 22 Sep 2011 20:08:35 +0000 (16:08 -0400)]
gvalue: Add explicitly signed g_value_get_schar() and g_value_set_schar()

The documentation for G_TYPE_CHAR says:

"The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed
 integer."

However the return value for g_value_get_char() was just "char" which
in C has an unspecified signedness; on e.g. x86 it's signed (which
matches the GType), but on e.g. PowerPC or ARM, it's not.

We can't break the old API, so we need to suck it up and add new API.
Port most internal users, but keep some tests of the old API too.

https://bugzilla.gnome.org/show_bug.cgi?id=659870

13 years agotests: Add a some torture test cases for the generic marshaller
Colin Walters [Thu, 22 Sep 2011 21:52:08 +0000 (17:52 -0400)]
tests: Add a some torture test cases for the generic marshaller

In particular this has a test case for a G_TYPE_ENUM which we were
running into a failure on ppc64.

https://bugzilla.gnome.org/show_bug.cgi?id=659881

13 years agoAdd gthread.h to deprecated headers
Ryan Lortie [Thu, 22 Sep 2011 17:47:25 +0000 (13:47 -0400)]
Add gthread.h to deprecated headers

...not deprecated sources

13 years agoFix annotations for source/target in g_object_bind_property_*
Emmanuele Bassi [Thu, 22 Sep 2011 16:16:55 +0000 (17:16 +0100)]
Fix annotations for source/target in g_object_bind_property_*

We use gpointer for convience of the C API users, but introspection
users will not like it.

https://bugzilla.gnome.org/show_bug.cgi?id=659838

13 years agoUpdated Oriya Translation
Manoj Kumar Giri [Thu, 22 Sep 2011 14:16:01 +0000 (19:46 +0530)]
Updated Oriya Translation

13 years agoSome gthread doc updates
Matthias Clasen [Thu, 22 Sep 2011 05:16:41 +0000 (01:16 -0400)]
Some gthread doc updates

Marking things as deprecated, mostly.

13 years agoUse adaptive mutexes when available
Matthias Clasen [Thu, 22 Sep 2011 04:52:18 +0000 (00:52 -0400)]
Use adaptive mutexes when available

These are supposedly better on multi-cpu systems - and who doesn't
have multiple cpus nowadays. One single-processor systems, they
are identical to normal mutexes.
See e.g. http://bugzilla.mozilla.org/show_bug.cgi?id=132089

https://bugzilla.gnome.org/show_bug.cgi?id=659423

13 years agoGDateTime test: fix a race
Ryan Lortie [Thu, 22 Sep 2011 00:19:32 +0000 (20:19 -0400)]
GDateTime test: fix a race

We have a GDateTime test that compares the time now (as per the libc) to
the time now (as per GDateTime).  The problem is that the time could
change between those two "now"s.

13 years agogslice: remove single-threaded case
Ryan Lortie [Thu, 22 Sep 2011 00:13:57 +0000 (20:13 -0400)]
gslice: remove single-threaded case

GPrivate always works, so use it normally at all times.

13 years agoGMappedFile: Add API to create from an existing file descriptor
Philip Van Hoof [Wed, 21 Sep 2011 17:59:03 +0000 (19:59 +0200)]
GMappedFile: Add API to create from an existing file descriptor

At Tracker we want to mmap files using O_NOATIME. With GMappedFile this is at
the moment impossible. For that reason I added the constructor new_from_fd to
the GMappedFile type.

https://bugzilla.gnome.org/show_bug.cgi?id=659754

13 years agoDeprecate GStatic{,Rec,RW}Mutex
Ryan Lortie [Wed, 21 Sep 2011 18:57:22 +0000 (14:57 -0400)]
Deprecate GStatic{,Rec,RW}Mutex

The new versions use the primatives of the OS directly and don't have an
annoying ABI.

13 years agogtype: port from GStaticRWLock to GRWLock
Ryan Lortie [Wed, 21 Sep 2011 18:39:59 +0000 (14:39 -0400)]
gtype: port from GStaticRWLock to GRWLock

13 years agoPort internal GStaticRecMutex users to GRecMutex
Ryan Lortie [Wed, 21 Sep 2011 18:37:34 +0000 (14:37 -0400)]
Port internal GStaticRecMutex users to GRecMutex

13 years agoAdd a new recursive mutex type, GRecMutex
Ryan Lortie [Wed, 21 Sep 2011 18:36:53 +0000 (14:36 -0400)]
Add a new recursive mutex type, GRecMutex

This is implemented using the native facilities of each platform instead
of manually.

13 years agoAdd GRWLock
Ryan Lortie [Wed, 21 Sep 2011 14:19:36 +0000 (10:19 -0400)]
Add GRWLock

13 years agogthread: remove impl init functions
Ryan Lortie [Wed, 21 Sep 2011 04:33:16 +0000 (00:33 -0400)]
gthread: remove impl init functions

13 years agowin32: Add 'shared' support to SRWLock emulation
Ryan Lortie [Tue, 20 Sep 2011 14:06:57 +0000 (10:06 -0400)]
win32: Add 'shared' support to SRWLock emulation

13 years agogthread-win32: trivial condition change
Ryan Lortie [Tue, 20 Sep 2011 04:05:34 +0000 (00:05 -0400)]
gthread-win32: trivial condition change

Make another do-nothing change to the SRWLock emulation.

13 years agogthread-win32: rename a struct member
Ryan Lortie [Tue, 20 Sep 2011 04:04:43 +0000 (00:04 -0400)]
gthread-win32: rename a struct member

Our SRWLock is about to become a real reader/writer lock, so rename an
instance variable to prepare for that.

13 years agogthread.h: remove some bogus decl/comments
Ryan Lortie [Mon, 19 Sep 2011 17:58:36 +0000 (13:58 -0400)]
gthread.h: remove some bogus decl/comments

These are no longer relevent since the possibility of a thread-disabled
GLib disappeared.

13 years agoRevert "Drop an unused variable"
Ryan Lortie [Mon, 19 Sep 2011 17:51:07 +0000 (13:51 -0400)]
Revert "Drop an unused variable"

This reverts commit c7f9cd17d446938aaf4126e0753302676f66fd22.

The old macros in gthread.h used this variable, so it must remain in
place to keep ABI compatibility.

13 years agoDrop an unused variable
Matthias Clasen [Mon, 19 Sep 2011 11:19:17 +0000 (07:19 -0400)]
Drop an unused variable

13 years agoMore header cosmetics
Matthias Clasen [Mon, 19 Sep 2011 11:16:30 +0000 (07:16 -0400)]
More header cosmetics

13 years agotrivial: small header reordering
Matthias Clasen [Mon, 19 Sep 2011 04:29:53 +0000 (00:29 -0400)]
trivial: small header reordering

13 years agoMove some things to deprecated/gthread.h
Ryan Lortie [Mon, 19 Sep 2011 05:11:11 +0000 (01:11 -0400)]
Move some things to deprecated/gthread.h

13 years agog_thread_init: take a gpointer as the arg
Ryan Lortie [Mon, 19 Sep 2011 05:02:44 +0000 (01:02 -0400)]
g_thread_init: take a gpointer as the arg

GThreadFunctions is about to disappear.

13 years agodisable glib-ctor on win32
Ryan Lortie [Mon, 19 Sep 2011 04:55:16 +0000 (00:55 -0400)]
disable glib-ctor on win32

13 years agoDeprecate g_thread_create_full()
Ryan Lortie [Mon, 19 Sep 2011 04:45:19 +0000 (00:45 -0400)]
Deprecate g_thread_create_full()

Replace it with g_thread_create_with_stack_size() and a real function
implementation of g_thread_create().

Modify a testcase that was calling g_thread_create_full()
inappropriately (it was using the default values anyway).

13 years agoDrop g_thread_fail()
Ryan Lortie [Mon, 19 Sep 2011 04:31:33 +0000 (00:31 -0400)]
Drop g_thread_fail()

This is now unused.

13 years agog_system_thread_create: drop unused args
Ryan Lortie [Mon, 19 Sep 2011 04:30:30 +0000 (00:30 -0400)]
g_system_thread_create: drop unused args

The 'bound' and 'priority' arguments are no longer in use, so drop them.

13 years agoRemove the concept of 'bound'
Ryan Lortie [Mon, 19 Sep 2011 04:27:56 +0000 (00:27 -0400)]
Remove the concept of 'bound'

This was ignored on Windows.  On POSIX, where supported, it controlled
if we ended up with a proper system thread or a user-mode thread.  Linux
did not support this.

13 years agoRemove a leftover from errorcheck mutexes
Matthias Clasen [Mon, 19 Sep 2011 04:25:12 +0000 (00:25 -0400)]
Remove a leftover from errorcheck mutexes

13 years agoRemove g_thread_functions_for_glib_use_old
Ryan Lortie [Mon, 19 Sep 2011 04:11:46 +0000 (00:11 -0400)]
Remove g_thread_functions_for_glib_use_old

This has been unused for a while and it should definitely go away now
that g_thread_functions_for_glib_use is back in gthread.c.

13 years agoMerge g_thread_functions_for_glib_use
Ryan Lortie [Mon, 19 Sep 2011 04:03:40 +0000 (00:03 -0400)]
Merge g_thread_functions_for_glib_use

Move the now-identical copies of g_thread_functions_for_glib_use from
gthread-{posix,win32}.c back into gthread.c.

13 years agogthread.h: drop the vtable access macros
Ryan Lortie [Mon, 19 Sep 2011 04:01:29 +0000 (00:01 -0400)]
gthread.h: drop the vtable access macros

We're finally free of these.  Drop them.

13 years agoNULL g_system_thread_{exit,equal} in the vtable
Ryan Lortie [Mon, 19 Sep 2011 04:00:12 +0000 (00:00 -0400)]
NULL g_system_thread_{exit,equal} in the vtable

These were never used from gthread.h and are no longer used from
gthread.c.

13 years agoGSystemThread: port 'self' 'join' and 'create'
Ryan Lortie [Mon, 19 Sep 2011 03:58:12 +0000 (23:58 -0400)]
GSystemThread: port 'self' 'join' and 'create'

Switch 'self' 'join' and 'create' from using the vtable to being called
via normal g_system_thread_* internal API (implemented in each of
gthread-{posix,win32}.c).

Again, we can put NULL in the vtable since these were never used from
gthread.h.

13 years agoGThread: deprecate thread priorities
Ryan Lortie [Mon, 19 Sep 2011 03:43:27 +0000 (23:43 -0400)]
GThread: deprecate thread priorities

Thread priorities were already documented as not working on Solaris, and
they are meaningless on Linux unless the process separately requests
realtime scheduling (and even then, it appears only to work as root).

We can safely put a NULL into the vtable for set_priority since nothing
outside of gthread.c ever calls this (and that call is gone).

13 years agoDon't use the thread_exit vfunc
Matthias Clasen [Mon, 19 Sep 2011 03:18:17 +0000 (23:18 -0400)]
Don't use the thread_exit vfunc

Instead, just have the backends implement an internal function
named g_system_thread_exit.

13 years agoDon't use the thread_equal vfunc anymore
Matthias Clasen [Mon, 19 Sep 2011 03:10:25 +0000 (23:10 -0400)]
Don't use the thread_equal vfunc anymore

Just move the g_system_thread_equal implementation into
the posix and win32 implementations, and drop some micro macro
optimization.

13 years agogthread-win32: use __stdcall markers where needed
Ryan Lortie [Mon, 19 Sep 2011 03:07:24 +0000 (23:07 -0400)]
gthread-win32: use __stdcall markers where needed

The "unknown reason" that the native thread implementation was broken is
because functions in kernel32.dll are (obviously) following Microsoft's
__stdcall ABI, not the GCC ABI.

Change our function pointers to be __stdcall pointers and change our
emulated implementation to match.

13 years agog_private_new: use GSlice
Ryan Lortie [Mon, 19 Sep 2011 02:48:53 +0000 (22:48 -0400)]
g_private_new: use GSlice

We no longer call g_private_new() from anywhere in GLib, so we can use
gslice instead of malloc().

13 years agoAnd move the g_thread_yield() docs too
Matthias Clasen [Mon, 19 Sep 2011 02:11:12 +0000 (22:11 -0400)]
And move the g_thread_yield() docs too

13 years agoDon't use the thread vtable for g_thread_yield()
Matthias Clasen [Mon, 19 Sep 2011 01:39:35 +0000 (21:39 -0400)]
Don't use the thread vtable for g_thread_yield()

13 years agoMove g_private_new() to common code
Matthias Clasen [Mon, 19 Sep 2011 01:24:25 +0000 (21:24 -0400)]
Move g_private_new() to common code

The implementations for posix and win32 were identical, so
move it to gthread.c, to go with g_mutex_new() and g_cond_new().

13 years agoMove docs around
Matthias Clasen [Mon, 19 Sep 2011 01:17:33 +0000 (21:17 -0400)]
Move docs around

Move the docs of functions to the actual functions. Also add
docs for some new apis.

13 years agoClean up g_thread_yield implementation
Matthias Clasen [Mon, 19 Sep 2011 00:04:28 +0000 (20:04 -0400)]
Clean up g_thread_yield implementation

This was the last macro wrapper that was directly accessing the
vtable. Make it a regular function, like the rest.

13 years agogmem: move to glib-ctor
Ryan Lortie [Sun, 18 Sep 2011 06:27:03 +0000 (02:27 -0400)]
gmem: move to glib-ctor

13 years agogslice: move initialisation to glib-ctor
Ryan Lortie [Sun, 18 Sep 2011 06:17:17 +0000 (02:17 -0400)]
gslice: move initialisation to glib-ctor

13 years agoAdd glib-ctor functionality
Ryan Lortie [Sun, 18 Sep 2011 06:16:07 +0000 (02:16 -0400)]
Add glib-ctor functionality

A pair of macros to define a constructor function (on compilers that
support such a concept) and to ensure that the function is run exactly
once (on compilers that lack such support).

Presently only GCC is implemented.

13 years agoGThread: always initialise the system thread
Ryan Lortie [Sun, 18 Sep 2011 05:24:27 +0000 (01:24 -0400)]
GThread: always initialise the system thread

It's always safe to call the thread implementation 'self' function.

13 years agogmessages: do implicit GPrivate initialisation
Ryan Lortie [Sun, 18 Sep 2011 05:21:01 +0000 (01:21 -0400)]
gmessages: do implicit GPrivate initialisation

Initialise the GPrivate implicitly at the site of first use rather than
explicitly from the thread initialisation function.

13 years agoContinue GPrivate rework
Ryan Lortie [Sun, 18 Sep 2011 05:10:07 +0000 (01:10 -0400)]
Continue GPrivate rework

We remove the macros while at the same time switching all libglib users
from g_private_new() to g_private_init().  We deal with the strange
expectations of the libglib code that g_private_* should work before the
GPrivate has been initialised with a temporary shim.

13 years agoRework GPrivate
Ryan Lortie [Sun, 18 Sep 2011 02:00:27 +0000 (22:00 -0400)]
Rework GPrivate

 - expose the structure types for GLib internal use only

 - avoid infinite recursion hazards by ensuring that GPrivate never
   calls back into any other part of GLib

 - substantially rework the Windows implementation so that it never
   holds locks, contains no arbitrary limits and doesn't waste
   100*sizeof(void*) per thread

We have to keep the macro hacks for the time being since some code
inside libglib depends on it.

13 years agoGStaticMutex: remove ./configure checks
Ryan Lortie [Sun, 18 Sep 2011 00:15:07 +0000 (20:15 -0400)]
GStaticMutex: remove ./configure checks

Now that GMutex is exposed we can avoid the dance we did in ./configure
to allocate the correct amount of space for it within the GStaticMutex.

Remove the checks and move the definitions to gthread.h, trying very
hard to keep ABI-stable (even though we will be deprecating this soon).

13 years agoStop using GStaticMutex in two testcases
Ryan Lortie [Sat, 17 Sep 2011 23:33:30 +0000 (19:33 -0400)]
Stop using GStaticMutex in two testcases

13 years agoGParamSpecPool: port from GStaticMutex to GMutex
Ryan Lortie [Sat, 17 Sep 2011 23:32:57 +0000 (19:32 -0400)]
GParamSpecPool: port from GStaticMutex to GMutex

13 years agoGSettings: port from GStaticMutex to GMutex
Ryan Lortie [Sat, 17 Sep 2011 23:26:41 +0000 (19:26 -0400)]
GSettings: port from GStaticMutex to GMutex