Commit Graph

11184 Commits

Author SHA1 Message Date
Ryan Lortie
ed35d2719b thread: Remove the zero_thread
This was only used for redundant assertion checks.
2011-10-12 18:22:31 -04:00
Ryan Lortie
2b281e40f3 GStaticRecMutex: implement via GRecMutex
Instead of doing our own hacked-up version.

This also reduces use of GSystemThread.
2011-10-12 18:18:16 -04:00
Ryan Lortie
96904b6790 thread: use GSList for g_thread_foreach list
...instead of having a 'next' pointer in the GThread struct.

Now GThread contains no fields used only by deprecated code (except for
the rather generic setup function field).
2011-10-12 17:05:50 -04:00
Ryan Lortie
9ca4f14264 thread: call g_enumerable_thread_add via callback
There are no longer any functions defined in gthread-deprecated.c called
from gthread.c.
2011-10-12 17:05:50 -04:00
Ryan Lortie
f788a2e5e1 thread: use GPrivate for enumerable threads
Use a GPrivate to track the destruction of enumerable threads and remove
them from the list.
2011-10-12 17:05:50 -04:00
Colin Walters
1368533dc2 gvariant: Doc typo fix 2011-10-12 15:25:12 -04:00
Colin Walters
15b9f64004 gvariant: Briefly mention limits 2011-10-12 15:23:39 -04:00
Dan Winship
0af48a5d7b gthread-deprecated: add a mising "static" to a method 2011-10-12 13:59:33 -04:00
Dan Winship
95cab96515 giomodule: make the default_modules mutex recursive
It is possible for _g_io_module_get_default() to be called recursively
(eg, if a module of one type is loaded that tries to look up gsettings
from its init() method and ends up causing the gsettings module to be
loaded). So use a recursive mutex.
2011-10-12 13:57:44 -04:00
Dan Winship
71cf70b39c Simplify checks for CLOCK_MONOTONIC
Remove the complicated configure-time and runtime checks, and just use
CLOCK_MONOTONIC if it's defined.

https://bugzilla.gnome.org/show_bug.cgi?id=661421
2011-10-12 08:59:35 -04:00
Matthias Clasen
daede1dc27 Disable deprecations where appropriate in tests 2011-10-12 00:48:18 -04:00
Matthias Clasen
bcdb865c59 Disable deprecations where appropriate in tests 2011-10-12 00:37:02 -04:00
Matthias Clasen
7455dd370e Make single includes mandatory
This has been the official line since 2.17, which seems plenty
long enough for a transition phase.
2011-10-12 00:25:38 -04:00
Ryan Lortie
9bb5a55bda GStaticPrivate: implement via GPrivate
Thanks to the modifications in 3d4846d923,
GStaticPrivate is not so directly tied in with GThread anymore.  It is
now a simple matter to cut it out completely by using a GPrivate to
store the GArray instead of storing it in the GThread.
2011-10-12 00:17:49 -04:00
Matthias Clasen
c6016458ba Update deprecation docs 2011-10-11 23:50:34 -04:00
Matthias Clasen
3d282dcc2e Silence deprecations in deprecated/ (again) 2011-10-11 23:44:43 -04:00
Chun-wei Fan
f5f242caf8 Update VS projects
Get rid of _CRT_SECURE_NO_WARNINGS and _CRT_NONSTDC_NO_WARNINGS
from the preprocessor definitions as those two macros are now defined
in msvc_recommended_pragmas.h, which is force-included in these projects
via the property sheets.  This will silence C4005 warnings on macro
redefinition.
2011-10-12 11:23:49 +08:00
Chun-wei Fan
b93d6ab83a Bug 661438: Update msvc_recommended_pragmas.h
Don't disable warning C4996 as that is the Visual C++ warning triggered by
__declspec(deprecated) and __declspec(deprecated('..."))-disabling that
warning will defeat the purpose of G_DPRECATED/G_DEPRECATED_FOR.

For people who don't want to see the GLib deprecation warnings during GLib
compilation, define GLIB_DISABLE_DEPRECATION_WARNINGS in the projects or
property sheet.
2011-10-12 10:53:30 +08:00
Chun-wei Fan
36ccdab760 Bug 661438: Fix up gmacros.h a bit
The macro here should be G_DEPRECATED, not G_GNUC_DEPRECATED.
2011-10-12 10:38:47 +08:00
Chun-wei Fan
17c713d3f6 Update VS property sheets
Missed the new glib/gstringchunk.h header that needed to be installed as
well.
2011-10-12 10:37:24 +08:00
Dan Winship
380ec80d07 g_time_val_from_iso8601: clarify the docs a bit 2011-10-11 19:28:59 -04:00
Ryan Lortie
baa394910b gmain: use GPrivate instead of GStaticPrivate 2011-10-11 18:42:03 -04:00
Dan Winship
b3e3914062 Fix two tests for G_DEBUG=gc-friendly 2011-10-11 15:36:42 -04:00
Chun-wei Fan
08d6e1147d Use GLIB_DEPRECATED instead of G_GNUC_DEPRECATED in our headers
This will let others opt out of seeing GLib deprecation warnings
by defining GLIB_DISABLE_DEPRECATION_WARNINGS.

https://bugzilla.gnome.org/show_bug.cgi?id=661438
2011-10-11 13:42:59 -04:00
Matthias Clasen
a1acf35653 Add our own deprecation macros
This will allow to suppress deprecation warnings on a per-module
basis, if needed. They are on by default now, though.
2011-10-11 13:42:58 -04:00
Matthias Clasen
0da0411a4a Add better deprecation macros
Unlike G_GNUC_... macros, the new G_DEPRECATED[_FOR] are
meant as abstractions that work with different compilers.
Using a new name also lets us restrict it to 'must be placed
before the declaration', which works with more compilers.

https://bugzilla.gnome.org/show_bug.cgi?id=661438
2011-10-11 13:13:27 -04:00
Chun-wei Fan
a73113908f Update VS property sheets
Copy the deprecated headers in their appropriate places.
2011-10-11 18:04:07 +08:00
Chun-wei Fan
0e71214bef glibconfig.win32(.in): Cleanup cruft
The definitions of _GMutex* and G_STATIC_MUTEX_INIT is now found in
glib/deprecated/gthread.h, and should no longer be in the mainline
code, so remove them from here.
2011-10-11 15:55:55 +08:00
Ryan Lortie
3e5a30fc17 GStaticMutex: ABI fixup
Everything was OK as long as GMutex was backed by pthread_mutex_t on
POSIX.  Since this is no longer the case, the ABI of GStaticMutex was
broken.

Fix that up by using pthread_mutex_t directly in the structure.  Since
that's potentially incompatible with our GMutex implementation, set
g_thread_use_default_impl to FALSE to cause the fallback code (which
manually allocates a GMutex) to run, even in the case of
already-existing code (without the need for a recompile).  This will
cause the pthread_mutex_t part of the struct to be completely ignored.
2011-10-10 19:44:23 -04:00
Matthias Clasen
2c1cbde21e Compile private test with -pthread on UNIX
We are using explicit pthread calls here, so we should
use the right linker flags for that.

https://bugzilla.gnome.org/show_bug.cgi?id=661318
2011-10-10 11:11:29 -04:00
Matthias Clasen
93e49aea1b Don't use deprecated GThread API in gio tests 2011-10-10 09:49:50 -04:00
Kjartan Maraas
5662619f22 Updated Norwegian bokmål translation 2011-10-10 07:55:29 +02:00
Algimantas Margevičius
918954e089 Updated Lithuanian translation 2011-10-09 22:00:49 +03:00
Matthias Clasen
5e2764d70c Silence deprecation warnings in deprecated/
We know we are all deprecated here...
2011-10-09 09:57:13 -04:00
Matthias Clasen
ff2dafb209 Add G_GNUC_DEPRECATED to deprecated functions in gio 2011-10-08 23:49:04 -04:00
Matthias Clasen
93b3f6477e Add G_GNUC_DEPRECATED to deprecated functions in gobject 2011-10-08 23:23:43 -04:00
Matthias Clasen
f9b29ca034 Add G_GNUC_DEPRECATED to deprecated APIs in glib 2011-10-08 23:16:01 -04:00
Matthias Clasen
30b320b61c Add some GHookList tests 2011-10-08 19:02:06 -04:00
Matthias Clasen
6109db27ae Test a few more GIOChannel functions 2011-10-08 19:02:06 -04:00
Matthias Clasen
d33f625444 Remove a bit of dead code 2011-10-08 19:02:06 -04:00
Matthias Clasen
b3ead3c998 Pass G_DEBUG=g-gc-friendly when running the tests 2011-10-08 19:02:06 -04:00
Matthias Clasen
d5a1ca8fd7 Add some more GMarkup tests 2011-10-08 19:02:06 -04:00
Matthias Clasen
08e17ae51b Call setlocale in markup-parse test
This is necessary to make utf-8 text come out properly.
2011-10-08 19:02:06 -04:00
Matthias Clasen
87cb246f46 Improve GNode test coverage 2011-10-08 19:02:05 -04:00
Matthias Clasen
dca6a601c1 Improve GCache test coverage 2011-10-08 19:02:05 -04:00
Matthias Clasen
eeedaac3e8 Improve coverage of string function tests 2011-10-08 19:02:05 -04:00
Matthias Clasen
944f66f38f Improve coverage of GHmac tests 2011-10-08 19:02:05 -04:00
Matthias Clasen
d9e9239a46 Add a test for g_date_time_new_from_timeval_utc 2011-10-08 19:02:05 -04:00
Antoine Jacoutot
c739a5df14 gio: enable test_peer regression test for OpenBSD
https://bugzilla.gnome.org/show_bug.cgi?id=661255
2011-10-08 17:11:39 +02:00
David Zeuthen
3c4d3dec09 GDBusConnection: Make pending calls error when the connection is lost
If the connection to the bus is lost while a method call is ongoing,
the method call does not get cancelled. Instead it just sits around
until it times out.

This is visible here on XO laptops when stopping the display manager
during shutdown. imsettings starts sending a sync message to give up
its bus name (via g_bus_unown_name()), then systemd terminates the
session bus at approximately the same time. imsettings then hangs for
about 20 seconds before timing out the message.

 http://lists.freedesktop.org/archives/dbus/2011-September/014717.html

imsettings behaviour could be improved as described in that thread,
but I think this is a glib bug. I've also come up with the attached
patch which fixes it.

Credits for the bug-fix goes to Daniel Drake <dsd@laptop.org>. The test
case was written by David Zeuthen <zeuthen@gmail.com>.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-10-07 14:23:03 -04:00