Commit Graph

5 Commits

Author SHA1 Message Date
Sebastian Wilhelmi
5e7134375e Added the missing POSIX_NO_YIELD and POSIX_NO_PRIORITIES warning messages.
2000-03-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: Added the missing POSIX_NO_YIELD and
	POSIX_NO_PRIORITIES warning messages.

	* configure.in: Use AC_TRY_RUN instead of AC_TRY_LINK, to test for
	real thread support. On solaris pthread_create can be linked to
	even in -lc, but it doesn't work then.

	* configure.in: Don't use priorities for threads, when the
	minimal/maximal priorities couldn't be determined at configure
	time.

	* configure.in, gthread.c: Always define GSystemThread in
	glibconfig.h to represent a system thread.

	* configure.in: Do not use native recursive threads, when
	possibe. We use some features, that they do not expose (namely the
	depth counter).

	* glib.h, gthread.c: Redefined GStaticRecMutex. The functions are
	now implemented in a different way, which should be way
	faster. Alsothere are now functions g_static_rec_mutex_unlock_full
	and g_static_rec_mutex_lock_full to leave/enter a recursive mutex
	completly.

	* gthread.c (g_thread_self): Do not test the system_thread to be
	non-zero to speed things up.

	* gthread.c (g_mutex_init): Therefore set the system_thread of the
	main thread here.

	* tests/thread-test.c: Rerun all tests once again, but this time
	we fool the system into thinking, that the available thread system
	is not native, but userprovided.

	* gthread/gthread-posix.c: Don't use priorities for threads,
	when the minimal/maximal priorities couldn't be determined at
	configure time.

	* gthread/gthread-posix.c: Don't check for errors, when
	setting the scope of a tread to system, as some posix
	implementations can't do that and we don't want the thing to
	fail because of that.
2000-03-17 14:49:59 +00:00
Sebastian Wilhelmi
760a7ceef2 Renamed GLIB_SIZEOF_PTHREAD_T to GLIB_SIZEOF_SYSTEM_THREAD to reflect
1999-11-16  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

        * acconfig.h, config.h.win32.in, configure.in: Renamed
        GLIB_SIZEOF_PTHREAD_T to GLIB_SIZEOF_SYSTEM_THREAD to reflect
        changed meaning.

        * configure.in: Cope with systems, that have a pthread_t type,
        that is not a pointer. Hint from Karl Nelson
        <kenelson@ece.ucdavis.edu>. Define GLIB_SIZEOF_SYSTEM_THREAD to 4
        for Solaris. Cope with systems, that have no default mutex
        initialize, like obviously most DCE systems.

        * glib.h, gthread.c: Changed the prototype of thread_create and
        thread_self to return the system thread into provided memory
        instead of a return value. This is necessary, as HPUX has a
        pthread_t, that is bigger than the biggest integral type there.

        * gthread.c: system_thread is no longer a pointer, but an memory
        area of size GLIB_SIZEOF_SYSTEM_THREAD. Changed the
        zeroinitialization and the tests for zeroness accordingly.
1999-11-16 10:30:25 +00:00
Manish Singh
7ea73a0199 G_OS_FOO #defines. I *think* I got the cygwin and beos stuff right, but
I haven't tested it. The respective porters should fix any screwups

-Yosh
1999-10-04 02:32:50 +00:00
Tor Lillqvist
be80f9a106 Update the pthreads snapshot version we want. Advice how to hand-expand
* README.win32: Update the pthreads snapshot version we want.
	Advice how to hand-expand the makefile.*.in files.

	* config.h.win32.in: Define values needed by Sebastian Wilhelmi's
	new thread stuff.

	* glib.def: Add new functions.

	* glibconfig.h.win32.in: Update the pthreads snapshot version.
	Fix typo.

	* gthread.c: Include config.h, guard inclusion of unistd.h.  When
 	using gcc on Win32, g_thread_functions_for_glib_use must be marked
 	for export here, too.

	* gtimer.c: Implement g_usleep on native Win32 using Sleep (which
	only has millisecond granularity, though).

	* makefile.cygwin.in
	* makefile.msc.in: Update pthreads snapshot version. File
	name changes. Remove testgthread.

	* tests/makefile.cygwin.in
	* tests/makefile.msc.in: Add thread-test. Link with gthread lib.

	* gthread-posix.c: Guard pthread_attr_setscope call with test
	for _POSIX_THREAD_PRIORITY_SCHEDULING, which should be defined
	in a <pthread.h> that supports that feature.
1999-06-20 22:20:43 +00:00
Sebastian Wilhelmi
90f6cc9bf2 Completed the thread support in GLib. Thread creation, prioritizing
1999-06-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in, acglib.m4, acconfig.h, glib.h, gthread.c:
	Completed the thread support in GLib. Thread creation,
	prioritizing threads, yielding, joining threads as well as
	reader/writer locks and recursive mutexes are now in place. Please
	test heavily on your platform. It is so far tested on
	Linux/i386/pthreads, Solaris/Sparc/pthreads and
	Solaris/Sparc/solaristhreads.

	* gtimer.c, glib.h: Implement g_usleep (gulong microseconds) for
	thread safe sleeping. (sleep() is not MT-safe at all!)

	* gutils.c: Avoid compiler warning.

	* tests/Makefile.am, tests/thread-test.c: New program to test some
	aspects of the thread implementation.

	* gthread.c, Makefile.am: Renamed from gmutex.c to reflect the
	change of content.

	* configure.in: Purged all appearances of nspr.

	* gthread/gthread-posix.c, gthread-solaris.c: Added the native
	implementations for the GLib's extended thread support.

	* gthread/gthread-nspr.c: Removed for good. NSPR is nothing we
	would want to build upon.

	* gthread/gthread.c: Renamed to gthread-impl.c to avoid
	confusion with ../gthread.c (Formerly known as the file called
	gmutex.c)

	* gthread/testgthread.c: Removed. The new and much extended
        tests are in ../tests/thread-test.c.

	* gthread/Makefile.am: Changed to reflect the changes above.
1999-06-17 15:39:31 +00:00