Commit Graph

286 Commits

Author SHA1 Message Date
Ryan Lortie
413186a962 emufutex: remove init from g_thread_init_glib
Use a GStaticMutex instead.
2011-09-09 13:23:48 -04:00
Ryan Lortie
cfa1d0540e Move the GThread implementations to glib/
We can now get threads initialised from inside of libglib by calling
g_thread_init_glib().
2011-09-09 12:47:40 -04:00
Ryan Lortie
96e4896804 invert gthread-impl includes
configure.ac defined G_THREAD_SOURCE and gthread-impl would #include it.

Instead, since we only have two thread implementations now, and since we
always use the Windows one only on Windows, move the logic to the
Makefile, predicated on 'if OS_WIN32'.  Then have the chosen backend do
the #include "gthread-impl.c" from there.

Remove the G_THREAD_SOURCE define from configure.ac.
2011-09-09 12:47:40 -04:00
Ryan Lortie
fc6a9275a4 win32 threads: assume TryEnterCriticalSection
Remove the dynamic lookup for TryEnterCriticalSection, which has existed
since Windows 2000.
2011-09-09 12:47:40 -04:00
Ryan Lortie
7cf89847e2 Stop using HAVE_G_THREAD_IMPL_INIT
Just always call the init function.
2011-09-09 12:47:40 -04:00
Ryan Lortie
46af418e05 Move thread priority translation into the backends
The translation of GLib priorities into the thread priorities of
different operating systems belongs in the implementation -- not
half-way in the front end.
2011-09-09 12:47:40 -04:00
Ryan Lortie
a4777122c8 Remove useless macros from when we supported DCE
These are non-ops now, and easily replaced.
2011-09-09 12:47:40 -04:00
Ryan Lortie
715f94e951 Remove support for DCE threads 2011-09-09 12:47:40 -04:00
Ryan Lortie
7d885253fa Remove support for custom thread implementations 2011-09-09 12:47:39 -04:00
Ryan Lortie
cef0acb945 Remove the dead 'none' thread implementation 2011-09-09 12:47:39 -04:00
Ryan Lortie
3f93141243 GThread: remove errorcheck mutex support
This can only possibly work if we call g_thread_init(), which we are
moving away from.
2011-09-09 12:47:39 -04:00
Ryan Lortie
41cbb40dca gthread: remove some unused forward declarations 2011-09-09 12:47:39 -04:00
Ryan Lortie
e48573c402 Deprecated (undocumented) g_thread_gettime
g_thread_gettime() is an undocumented public function pointer that
points to a function that returns the monotonic time in nanoseconds.
g_get_monotonic_time() does the same in microseconds, so it can be used
instead.

GLib had one internal user in GFileMonitor that only cared about
millisecond accuracy; it has been ported to g_get_monotonic_time().
2011-09-09 12:47:39 -04:00
Dan Winship
5bc7729d16 Make threads mandatory
G_THREADS_ENABLED still exists, but is always defined. It is still
possible to use libglib without threads, but gobject (and everything
above it) is now guaranteed to be using threads (as, in fact, it was
before, since it was accidentally impossible to compile with
--disable-threads).

https://bugzilla.gnome.org/show_bug.cgi?id=616754
2011-09-09 12:41:55 -04:00
Ryan Lortie
d87eddbb13 .gitignore the gwakeup-fallback testcase 2011-07-25 18:52:36 +02:00
Ryan Lortie
c81eb121a1 GWakeup: make it private API
Colin requests that we keep this one private for now.

Include it at each point of use (libglib, libgio, tests).
2011-07-25 18:51:03 +02:00
Ryan Lortie
0584f0c504 GWakeup: test fallback case
We need to test the case of eventfd in the libc but no kernel support.

In order to do that, we add a separate compile of the GWakeup testcase
that interposes an 'eventfd' symbol that always returns -1 with errno
set.  That will trigger the fallback case.
2011-07-25 17:43:28 +02:00
Ryan Lortie
3c25f9f609 GWakeup .gitignore fixes 2011-07-25 15:30:36 +02:00
Ryan Lortie
4026b33174 add a couple of testcases for GWakeup 2011-07-25 15:30:35 +02:00
Ryan Lortie
804e3ba4dd gitignore tweaks 2011-07-22 15:47:24 +02:00
Matthias Clasen
6dfd21caef Run some tests with errorcheck mutexes too
All in the name of better test coverage.
2011-06-23 00:05:18 -04:00
Colin Walters
4344838781 gthread tests: Remove spurious return; 2011-06-20 14:09:50 -04:00
Colin Walters
c2364ce9a4 spawn-multithreaded: Clean up IO channel code
I modeled the new bits after how gunixmount.c handles GIOChannel;
it's apparently easier not to look at the condition.

https://bugzilla.gnome.org/show_bug.cgi?id=652072
2011-06-14 19:23:36 -04:00
Colin Walters
922f6aa496 spawn-singlethread.c: New test
https://bugzilla.gnome.org/show_bug.cgi?id=652072
2011-06-14 19:23:35 -04:00
Colin Walters
01ee9449e3 spawn-multithreaded: Also look for lt-test-echo
I hate libtool =(

https://bugzilla.gnome.org/show_bug.cgi?id=652072
2011-06-14 19:23:35 -04:00
Dan Winship
7412e073d1 update .gitignores 2011-06-12 16:17:30 -04:00
Chun-wei Fan
405b4ff4f4 Update the year in the *.rc.in files
Sorry this change came a bit late...
2011-06-07 08:55:31 +08:00
Ryan Lortie
df0b208831 Implement pointer sized bitlocks
Based on a patch from Alexander Larsson.

https://bugzilla.gnome.org/show_bug.cgi?id=651467
2011-06-03 20:50:18 -04:00
Colin Walters
d51198baad spawn-multithreaded: New test case
We didn't have any coverage of threads spawning processes, which we
should definitely support.

https://bugzilla.gnome.org/show_bug.cgi?id=651725
2011-06-03 11:43:26 -04:00
Simon McVittie
22cc6ce679 Add a regression test for GNOME#642026
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=642026
Bug-NB: NB#257512
2011-05-28 10:00:42 -04:00
Marc-André Lureau
30672af7ff gthread: build unix tests only on unix
The build fails when compiling with mingw32. Correct the build of a
unix tests on unix only.

https://bugzilla.gnome.org/show_bug.cgi?id=649973
2011-05-26 11:19:20 +02:00
Matthias Clasen
9255350a70 Add some atomic ops tests 2011-05-22 01:29:22 -04:00
Dan Winship
181763438a Update .gitignores 2011-05-02 09:54:15 -04:00
Colin Walters
549d895fa4 glib-unix: New API to watch some Unix signals
This new API allows watching a few select Unix signals;
looking through the list on my system, I didn't see anything
else that I think it'd reasonable to watch.

We build on the previous patch to make the child watch helper thread
that existed on Unix handle these signals in the threaded case.
In the non-threaded case, they're just global variables.

https://bugzilla.gnome.org/show_bug.cgi?id=644941
2011-04-27 16:01:39 -04:00
Matthias Clasen
1bbf4cb87c Remove the dead --disable-visiblity configure option
At the same time, document --disable-Bsymbolic.
2010-12-15 11:41:05 -05:00
Ryan Lortie
b3b7ea8e22 Replace -I with $(glib_INCLUDES) and friends
Stop using ad hoc -I in all of our Makefile.am.  Use the new variables
instead.
2010-08-06 13:10:34 -04:00
paul
9f6faaffb6 Add $(top_builddir)/glib to includes
This is required to find glibconfig.h during srcdir != builddir builds
2010-08-05 09:08:34 -04:00
Matthias Clasen
9174569736 Also use trylock in the bitlock tests 2010-07-31 02:40:16 -04:00
Ryan Lortie
c9553af68f Use -Bsymbolic-functions, drop g*alias PLT hackery
This is a minimal patch-out of the galias functionality.  We will do a
release like this so that we can easily back it out if there are
reported problems.

A more substantial cleanup (mostly removing #includes from every file)
will follow if there are no issues.
2010-06-21 13:55:28 -04:00
Christian Persch
7bb00fd0e8 Fix a preprocessor warning with --disable-visibility
Don't redefine DISABLE_VISIBILITY when already building with
--disable-visibility.
2010-06-19 19:07:36 +02:00
Christian Persch
1b8ee5196e Sprinkle some $(AM_V_GEN) around to make the build more silent. 2010-06-15 22:01:02 -04:00
Matthias Clasen
7b43d2d299 Fix !srcdir build
Bug 616216
2010-04-22 19:31:39 -04:00
Colin Walters
0d9a40b894 Fix typo in GMutex error message 2010-04-21 16:47:22 -04:00
Tor Lillqvist
154a5314be Update copyright years 2010-02-04 00:12:50 +02:00
Ryan Lortie
6aa73f03eb improve gitignore 2010-01-28 22:43:51 -05:00
Ryan Lortie
40eae351b1 Bug 548967 - 1 bit mutex lock: add tests
Add a test case for the new API.

Always check the emulated futex(2) implementation, even on systems with
futex support.
2010-01-28 18:41:20 -05:00
Alexander Larsson
0df3ca8f9b Relax g_thread_init() requirements
We now allow g_thread_init(NULL) to be called after other glib calls (with
some minor limitations). This is mainly a documentation change as this
really was already possible.

We also allow g_thread_init() to be called multiple times. Only the
first call actually initializes the threading system, further calls
are ignored (but print a warning if the argument is not NULL).

https://bugzilla.gnome.org/show_bug.cgi?id=606775
2010-01-12 21:37:20 +01:00
Matthias Clasen
e9fe53980b Fix --runtime-libdir option
For stable releases, it needs to take LT_REVISION into account, not
hardcode 0.
2009-09-29 23:08:03 -04:00
David Zeuthen
0ccd18bc83 Bug 586675 – Runtime library location
Introduce an option to specify the runtime location for libraries via
a relative path to libdir.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2009-06-23 12:58:35 -04:00
Matthias Clasen
785bed2e18 Update README files to refer to git
Update various README files to refer to git instead of svn.
Add a README.commits that is pretty much a copy of the same file
in GTK+. Also discontinue ChangeLog files.
2009-03-31 19:39:16 -04:00