summaryrefslogtreecommitdiff
path: root/tests/refcount
Commit message (Collapse)AuthorAgeFilesLines
* Replace -I with $(glib_INCLUDES) and friendsRyan Lortie2010-08-061-4/+1
| | | | | Stop using ad hoc -I in all of our Makefile.am. Use the new variables instead.
* Add $(top_builddir)/glib to includespaul2010-08-051-0/+1
| | | | This is required to find glibconfig.h during srcdir != builddir builds
* notify: Add tests for threadsafe object notifiesOlivier Crête2010-07-223-0/+375
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=166020
* initialize automake variables EXTRA_DIST and TEST_PROGS for unconditional21:06:47 Tim Janik2007-11-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-11-21 21:06:47 Tim Janik <timj@imendio.com> * Makefile.decl: initialize automake variables EXTRA_DIST and TEST_PROGS for unconditional appending via += in other makefiles. define recursive test targets: test, test-report, perf-report, full-report, as described here: http://mail.gnome.org/archives/gtk-devel-list/2007-November/msg00000.html * Makefile.am: * build/win32/vs8/Makefile.am, build/win32/dirent/Makefile.am: * build/win32/Makefile.am, build/Makefile.am: * docs/Makefile.am, docs/reference/Makefile.am: * docs/reference/glib/Makefile.am, docs/reference/gobject/Makefile.am: * gmodule/Makefile.am, tests/Makefile.am: * tests/refcount/Makefile.am, tests/gobject/Makefile.am: * glib/update-pcre/Makefile.am, glib/libcharset/Makefile.am: * glib/tests/Makefile.am, glib/pcre/Makefile.am: * glib/gnulib/Makefile.am, gobject/Makefile.am, m4macros/Makefile.am: * gthread/Makefile.am, glib/Makefile.am: include $(top_srcdir)/Makefile.decl, adapted EXTRA_DIST assignments. * glib/tests/Makefile.am: removed example testing rules. * glib/tests/testing.c: conditionalized performance and slow tests. * glib/gtestutils.h: * glib/gtestutils.c: work around g_test_config_vars not changing its exported value after value assignments, aparently due to symbol aliases. * glib/gtester.c: fixed off-by-one error which produced junk in logs. * configure.in: check for python >= 2.4 and provide $PYTHON for scripts. svn path=/trunk/; revision=5914
* Fixed up internal 'g_test*' names.Tim Janik2007-11-206-184/+184
| | | | | | | | | | | | * refcount/signals.c: * refcount/objects.c: * refcount/objects2.c: * refcount/closures.c: * refcount/properties.c: * refcount/properties2.c: changed namespace prefix from g_test_* to my_test_* to not clash with newly introduced g_test* API in glib. svn path=/trunk/; revision=5875
* Output newlines after thousand iterations of the inner-loop of theLoïc Minier2007-07-091-1/+1
| | | | | | | | | | 2007-07-09 Loïc Minier <lool@dooz.org> * tests/refcount/closures.c: (main): Output newlines after thousand iterations of the inner-loop of the closures test; this helps having smaller lines and continuously outputting new lines. (#447048). svn path=/trunk/; revision=5609
* removed all .cvsignore files. SVN doesn't need them.Michael Natterer2007-01-031-10/+0
| | | | | | | | | 2007-01-03 Michael Natterer <mitch@imendio.com> * removed all .cvsignore files. SVN doesn't need them. svn path=/trunk/; revision=5198
* Remove C++ commentMatthias Clasen2006-01-301-1/+1
|
* Add a missing reference to libglib in the LDADD for this test.Billy Biggs2005-11-071-1/+1
| | | | | | | 2005-11-07 Billy Biggs <vektor@dumbterm.net> * tests/refcount/Makefile.am: Add a missing reference to libglib in the LDADD for this test.
* Link the the refcount tests to the system thread library $(G_THREAD_LIBS).Sebastian Wilhelmi2005-09-111-1/+1
| | | | | | | | 2005-09-11 Sebastian Wilhelmi <seppi@seppi.de> * tests/refcount/Makefile.am (INCLUDES): Link the the refcount tests to the system thread library $(G_THREAD_LIBS). Fixes #313744 and #314217.
* remove unused n_threads variable.Manish Singh2005-08-061-1/+0
| | | | | | 2005-08-05 Manish Singh <yosh@gimp.org> * tests/refcount/closures.c: remove unused n_threads variable.
* Shut up CVSManish Singh2005-08-061-0/+1
|
* tests/refcount/objects.c tests/refcount/properties.c Use g_usleep()Tor Lillqvist2005-08-023-3/+3
| | | | | | | | | 2005-08-02 Tor Lillqvist <tml@novell.com> * tests/refcount/objects.c * tests/refcount/properties.c * tests/refcount/signals.c: Use g_usleep() instead of sleep() for portability.
* test high contention on closure reference counts to trigger and catchTim Janik2005-08-017-38/+353
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mon Aug 1 23:33:47 2005 Tim Janik <timj@imendio.com> * tests/refcount/closures.c: test high contention on closure reference counts to trigger and catch non-atomic updates. * tests/refcount/objects.c: * tests/refcount/objects2.c: * tests/refcount/properties.c: * tests/refcount/properties2.c: * tests/refcount/signals.c: fixed up test and threading fundamentals. variables accessed from all threads need to be volatile. context switches are enforced by using g_thread_yield(), not g_usleep(1) which may result in busy waits on some platforms. for testcode, always consider all warnings and critical messages fatal. issue the currently running program on stdout. improved progress indicators. * tests/refcount/properties.c: * tests/refcount/objects.c: don't overdo the number of testing threads to keep the testing machine usable, 2 threads can produce as much contention as 20 if executing the same code. * tests/refcount/signals.c: only start 1 thread per object. GObject doesn't provide mutually exclusive object access, but only mutually exclusive reference count modification. * tests/Makefile.am: added closures test.
* use G_CALLBACK for signal connections.Manish Singh2005-07-201-3/+3
| | | | | | 2005-07-20 Manish Singh <yosh@gimp.org> * tests/refcount/signals.c: use G_CALLBACK for signal connections.
* Shut up CVSManish Singh2005-07-201-0/+9
|
* Make refcounting threadsafe by using atomic operations. (#166020, WimMatthias Clasen2005-07-156-0/+1030
2005-07-15 Matthias Clasen <mclasen@redhat.com> Make refcounting threadsafe by using atomic operations. (#166020, Wim Taymans) * gobject.c: Use a recursive lock to protect the notify queue. (g_object_unref): Get rid of g_object_last_unref and do the last unref handling in g_object_unref. (g_object_ref, g_object_unref): Use atomic operations. * gsignal.c (struct _HandlerMatch): Use a full integer for the ref_count field. (handler_ref, handler_unref_R): Use atomic operations. * gparam.c (g_param_spec_ref, g_param_spec_unref): Use atomic operations instead of a lock to make the refcounting threadsafe. * gclosure.c (g_closure_ref, g_closure_unref): Use atomic operations. This is more complicated here, since the refcount is stored in a bitfield, so we also have to access all other bitfield members atomically. * gsignal.c (handlers_find): Read the meta_marshal flag of the closure atomically. * tests/Makefile.am (SUBDIRS): Add tests/refcount * configure.in: Add tests/refcount * tests/refcount/properties.c: Test property changes from multiple threads. * tests/refcount/signals.c: Test signal emission from multiple threads. * tests/refcount/objects.c: Test refcounting from multiple threads. * tests/refcount/objects2.c: * tests/refcount/properties2.c: Tests to measure the overhead of threadsafe refcounting. * glib/giochannel.c (g_io_channel_ref, g_io_channel_unref): Use atomic operations to make refcounting threadsafe. (#166020, Wim Taymans)