| 
									
										
										
										
											1998-12-15 05:28:02 +00:00
										 |  |  | /* GLIB - Library of useful routines for C programming
 | 
					
						
							|  |  |  |  * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2022-06-01 12:44:23 +01:00
										 |  |  |  * SPDX-License-Identifier: LGPL-2.1-or-later | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											1998-12-15 05:28:02 +00:00
										 |  |  |  * gthread.c: thread related functions | 
					
						
							|  |  |  |  * Copyright 1998 Sebastian Wilhelmi; University of Karlsruhe | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This library is free software; you can redistribute it and/or | 
					
						
							| 
									
										
										
										
											2000-07-26 11:02:02 +00:00
										 |  |  |  * modify it under the terms of the GNU Lesser General Public | 
					
						
							| 
									
										
										
										
											1998-12-15 05:28:02 +00:00
										 |  |  |  * License as published by the Free Software Foundation; either | 
					
						
							| 
									
										
										
										
											2017-01-05 14:02:45 +01:00
										 |  |  |  * version 2.1 of the License, or (at your option) any later version. | 
					
						
							| 
									
										
										
										
											1998-12-15 05:28:02 +00:00
										 |  |  |  * | 
					
						
							|  |  |  |  * This library is distributed in the hope that it will be useful, | 
					
						
							|  |  |  |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU | 
					
						
							| 
									
										
										
										
											2000-07-26 11:02:02 +00:00
										 |  |  |  * Lesser General Public License for more details. | 
					
						
							| 
									
										
										
										
											1998-12-15 05:28:02 +00:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2000-07-26 11:02:02 +00:00
										 |  |  |  * You should have received a copy of the GNU Lesser General Public | 
					
						
							| 
									
										
										
										
											2014-01-23 12:58:29 +01:00
										 |  |  |  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
 | 
					
						
							| 
									
										
										
										
											1998-12-15 05:28:02 +00:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1999-02-24 06:14:27 +00:00
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											2000-07-26 11:02:02 +00:00
										 |  |  |  * Modified by the GLib Team and others 1997-2000.  See the AUTHORS | 
					
						
							| 
									
										
										
										
											1999-02-24 06:14:27 +00:00
										 |  |  |  * file for a list of people on the GLib Team.  See the ChangeLog | 
					
						
							|  |  |  |  * files for a list of changes.  These files are distributed with | 
					
						
							| 
									
										
										
										
											2006-05-11 00:18:46 +00:00
										 |  |  |  * GLib at ftp://ftp.gtk.org/pub/gtk/.
 | 
					
						
							| 
									
										
										
										
											1999-02-24 06:14:27 +00:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-05-11 00:18:46 +00:00
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											1998-12-15 05:28:02 +00:00
										 |  |  |  * MT safe | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-01-14 00:06:26 -05:00
										 |  |  | #include "config.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-16 21:50:26 -04:00
										 |  |  | #include <glib.h>
 | 
					
						
							| 
									
										
										
										
											2011-08-31 18:00:03 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1998-12-15 05:28:02 +00:00
										 |  |  | void | 
					
						
							| 
									
										
										
										
											2011-09-19 01:02:44 -04:00
										 |  |  | g_thread_init (gpointer init) | 
					
						
							| 
									
										
										
										
											1998-12-15 05:28:02 +00:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2011-10-18 14:15:07 +02:00
										 |  |  |   if (init != NULL) | 
					
						
							|  |  |  |     g_warning ("GThread system no longer supports custom thread implementations."); | 
					
						
							| 
									
										
											  
											
												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
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2011-08-31 16:01:09 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | void | 
					
						
							| 
									
										
										
										
											2011-09-19 01:02:44 -04:00
										 |  |  | g_thread_init_with_errorcheck_mutexes (gpointer vtable) | 
					
						
							| 
									
										
										
										
											2011-08-31 16:01:09 -04:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2011-10-18 14:15:07 +02:00
										 |  |  |   g_assert (vtable == NULL); | 
					
						
							|  |  |  |   g_warning ("GThread system no longer supports errorcheck mutexes."); | 
					
						
							| 
									
										
										
										
											2011-08-31 16:01:09 -04:00
										 |  |  | } |