summaryrefslogtreecommitdiff
path: root/gthread
AgeCommit message (Collapse)Author
2000-07-26applied patch from Andreas Persenius <ndap@swipnet.se> that updates theTim Janik
Wed Jul 26 12:59:31 2000 Tim Janik <timj@gtk.org> * *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that updates the license headers to the GNU Lesser General Public License, as well as updating the copyright year to 2000.
2000-07-14Include the "build" module in GLib, too, to make it more self-contained.Tor Lillqvist
2000-07-15 Tor Lillqvist <tml@iki.fi> * Makefile.am (SUBDIRS): Include the "build" module in GLib, too, to make it more self-contained. If your CVS client doesn't automatically get it, do a cvs get build in glib. * */makefile.mingw.in: Include make.mingw from build in the glib source directory.
2000-07-14Move glib-config to glib-config-2.0 move glib.m4 to glib-2.0.m4Owen Taylor
Fri Jul 14 12:22:49 2000 Owen Taylor <otaylor@redhat.com> * configure.in Makefile.am glib-config.m4 glib.m4: Move glib-config to glib-config-2.0 move glib.m4 to glib-2.0.m4 * Makefile.am gobject/Makefile.am gmodule/Makefile.am gthread/Makefile.am tests/Makefile.am: Change library names to libglib-1.3.la, etc, so that we can distinguish glib-1.2 and glib-2.0 on the linkline. * Makefile.am gobject/Makefile.am gmodule/Makefile.am: Move include files into /usr/include/glib-2.0. Thu Jul 6 18:54:49 2000 Owen Taylor <otaylor@redhat.com> * docs/Makefile.am (EXTRA_DIST): Remove info files from the build.
2000-05-13makefile.mingw.in tests/makefile.mingw.in Rename makefile.cygwin(.in) toTor Lillqvist
2000-05-13 Tor Lillqvist <tml@iki.fi> * makefile.mingw.in * tests/makefile.mingw.in * build-dll: Rename makefile.cygwin(.in) to makefile.mingw(.in), which better describes what it is. Move the build of gmodule, gthread and gobject DLLs to makefiles in those directories. Move resource file handling and build number bump to build-dll, where it sits much cleaner. * README.win32 * Makefile.am (EXTRA_DIST): Update accordingly. * glib.h: Add G_PI, G_PI_2, G_PI_4, G_E, G_LN2, G_LN10 and G_SQRT2. M_PI etc aren't necessarily in <math.h> in strict ISO C implementations. * glib.def: Add g_strcanon. * gtree.c (g_tree_node_rotate_left): Remove unused variables. * gwin32.c (g_win32_opendir): Remove unneeded statement. gmodule: * makefile.mingw.in: New file, with gmodule stuff moved from ../makefile.mingw.in. * Makefile.am: Add to EXTRA_DIST, and add rule to make makefile.mingw. gobject: * makefile.mingw.in * gobject.def * gobject.rc.in: New files, for Win32 (mingw) build. * Makefile.am: Add to EXTRA_DIST. Add rules to produce the corresponding non-*.in files. * gtype.h: (Win32:) Mark _g_type_fundamental_last for export/import from DLL. gthread: * makefile.mingw.in: New file, with gthread stuff moved from ../makefile.mingw.in. * Makefile.am: Add to EXTRA_DIST, add rule to build makefile.mingw.
2000-04-25Changed the scope of the initialized mutex to USYNC_THREAD. Thanks toSebastian Wilhelmi
2000-04-25 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gthread-solaris.c (g_mutex_new_solaris_impl): Changed the scope of the initialized mutex to USYNC_THREAD. Thanks to Soeren Sandmann <sandmann@daimi.au.dk> for pointing that out.
2000-03-24.cvsignore adaptationSebastian Wilhelmi
.cvsignore adaptation
2000-03-24Added various win32 related *.in files to EXTRA_DIST to let 'makeSebastian Wilhelmi
2000-03-24 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * Makefile.am, gthread/Makefile.am, gmodule/Makefile.am, tests/Makefile.am: Added various win32 related *.in files to EXTRA_DIST to let 'make distcheck' procude all the corresponding files, which it silently fails to do currently.
2000-03-20Forgot a '}' in a macro for DCE-threads. Thanks to Karl NelsonSebastian Wilhelmi
2000-03-20 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gthread-posix.c (posix_check_for_error): Forgot a '}' in a macro for DCE-threads. Thanks to Karl Nelson <kenelson@ece.ucdavis.edu> for pointing that out.
2000-03-17Added the missing POSIX_NO_YIELD and POSIX_NO_PRIORITIES warning messages.Sebastian Wilhelmi
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-02-22check for sysconf (_SC_THREAD_STACK_MIN), which returns the minimal stackSebastian Wilhelmi
2000-02-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gthread-posix.c, gthread-solaris.c: check for sysconf (_SC_THREAD_STACK_MIN), which returns the minimal stack size for new threads. Patch from Soeren Sandmann <sandmann@daimi.au.dk>.
2000-02-07Move to corresponding subdirectories.Tor Lillqvist
2000-02-07 Tor Lillqvist <tml@iki.fi> * gmodule.rc.in gthread.rc.in: Move to corresponding subdirectories. * Makefile.am * gmodule/Makefile.am * gthread/Makefile.am: Change accordingly. * makefile.cygwin: Corresponding changes, some cleanup.
1999-11-16Changed the prototype of thread_create and thread_self to return theSebastian Wilhelmi
1999-11-16 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gthread-posix.c, gthread-solaris.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. Made some more functions static. * gthread-posix.c: Small fixes for DCE threads: Detaching has to be done after thread creation for DCE.
1999-10-04G_OS_FOO #defines. I *think* I got the cygwin and beos stuff right, butManish Singh
I haven't tested it. The respective porters should fix any screwups -Yosh
1999-08-26added --export-dynamic so we can load dynmic modules, (required, accordingTim Janik
Thu Aug 26 15:09:36 1999 Tim Janik <timj@gtk.org> * Makefile.am: * gmodule/Makefile.am: * gthread/Makefile.am: added --export-dynamic so we can load dynmic modules, (required, according to the libtool 1.3.3 docu).
1999-07-2418:36. incorporated proposed cleanups from gtk-devel-list.Tim Janik
Sat Jul 24 20:11:35 1999 Tim Janik <timj@gtk.org> * merged GLib 1.3.0 with glib-1.2.3 from Fri Jul 16 22:18:36. * incorporated proposed cleanups from gtk-devel-list. * bumped version number to GLib-1.3.1 * glib.h: * gqueue.c: * gstring.c: * glist.c: removed string tokenisation (we got g_strsplit() and g_strjoin() already) and readline functions. s/g_list_delete/g_list_delete_link. implemented g_slist_delete_link. removed notion of g_ATEXIT() macro in glib.h, this is an *internal* macro, g_atexit() is provided for public consumption. added GTrashStack inline utility functions. reimplement double eneded queues. removed GStack implementation, people can use a queue or a (singly) linked list for this task. deprecated g_strescape(), we need the SunOS variants here. * gdate.c: added DEBUG_MSG() macro to wrap old messages. * *.*: CVS merges. * upgrade to libtool 1.3.3.
1999-06-20Update the pthreads snapshot version we want. Advice how to hand-expandTor Lillqvist
* 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-17Completed the thread support in GLib. Thread creation, prioritizingSebastian Wilhelmi
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-05-08Better testing reveals better methods. Fixes for BeOS.CDT 1999 Shawn T. Amundson
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org> * configure.in gmodule/Makefile.am gthread/Makefile.am: Better testing reveals better methods. Fixes for BeOS.
1999-05-08Port to BeOS by myself and Richard Offer.CDT 1999 Shawn T. Amundson
Sat May 8 01:52:29 CDT 1999 Shawn T. Amundson <amundson@gtk.org> * configure.in gerror.c gmain.c gstrfuncs.c gutils.c ltconfig ltmain.sh gmodule/Makefile.am gmodule/gmodule.c gmodule/gmoduleconf.h.in gmodule/gmodule-beos.c gthread/Makefile.am: Port to BeOS by myself and Richard Offer.
1999-04-24 Support added for building using a GNU toolchain on Win32,Tor Lillqvist
i.e. gcc -mno-cygwin on cygwin (a.k.a. mingw32, using egcs-1.1.2). * README.win32: Updated. * build-dll makefile.cygwin tests/makefile.cygwin: New files. * glib.h glib.def glibconfig.h.win32 makefile.msc: Slight updates. * gmain.c: No need to include <fcntl.h> and <io.h> on Win32. * gmain.c gutils.c testglib.c tests/string-test.c: Test for NATIVE_WIN32, not _MSC_VER. * gmutex.c: Must declare g_thread_functions_for_glib_use as exported (using the GUTILS_C_VAR macro). * gutils.c gmodule/libgplugin_[ab].c: LibMain not needed. * gmodule/gmoduleconf.h.win32: Need underscore with gcc. * gthread/gthread.c: With gcc on Win32, must use memcpy to assign value of g_thread_functions_for_glib_use (?). * makefile.msc tests/makefile.msc: Cosmetics.
1999-04-09New files to implement the Mersenne Twister Pseudo Random NumberSebastian Wilhelmi
1999-04-09 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * grand.c, tests/rand-test.c: New files to implement the Mersenne Twister Pseudo Random Number Generator. * glib.h, AUTHORS, Makefile.am, tests/Makefile.am: Changed accordingly.
1999-03-31Use the right default arguments for the construction of mutexes and condsSebastian Wilhelmi
1999-03-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gthread/gthread-posix.c: Use the right default arguments for the construction of mutexes and conds for dce threads, these are &pthread_(cond|mutex)attr_default instead of NULL. Hint from D. Emilio Grimaldo Tunon <emilio_tunon@nl.compuware.com>.
1999-03-18added new AC_SUBST(GTHREAD_COMPILE_IMPL_DEFINES) to hold various definesSebastian Wilhelmi
1999-03-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * configure.in: added new AC_SUBST(GTHREAD_COMPILE_IMPL_DEFINES) to hold various defines to get the right thread implementation on different platforms. Also look in -ldce for pthread_create. Should make it work on HP-UX 10.x. * gthread/Makefile.am (INCLUDES): Added @GTHREAD_COMPILE_IMPL_DEFINES@.
1999-03-12Test for posix threads first, then for dce threads.Sebastian Wilhelmi
1999-03-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * configure.in: Test for posix threads first, then for dce threads. * gthread/gthread-posix.c (g_private_get_posix_impl): Fixed typo for DCE implementation.
1999-03-11Revamped the thread configure stuff. Now dce threads (old posix draft) areSebastian Wilhelmi
1999-03-11 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * configure.in: Revamped the thread configure stuff. Now dce threads (old posix draft) are recogniced. This is necessary, because dce threads are in fact working quite differently from posix threads. Also changed the conditions for checking for MT safe functions a bit, because G_THREADS_IMPL_NONE still have to compile thread safe. * gthread/gthread-posix.c: Now handle both dce and posix threads. They are sufficently equal. NOTE: Please do not commit my change to glib-1-2/{acconfig.h,configure.in,config.h.win32} from 1999-03-03, as the current change will take care of that too.
1999-02-24inserted additional note to look for ChangeLog and AUTHORS file for a logCST 1999 Shawn T. Amundson
Wed Feb 24 00:08:42 CST 1999 Shawn T. Amundson <amundson@gtk.org> * *.[ch]: inserted additional note to look for ChangeLog and AUTHORS file for a log of modifications.
1999-02-15Changed signature of all g_static_mutex_* functions to take a pointerSebastian Wilhelmi
1999-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * glib.h, glibconfig.h.win32, configure.in: Changed signature of all g_static_mutex_* functions to take a pointer rather than the struct itself. This is not an issue at the moment, because those funcs are really macros, but is it un'G'ish and might fall on our feet in the future. * gthread/testgthread.c (test_mutexes): Use new signature of g_static_mutex* functions.
1999-02-10s/G_LOCK_DECLARE/G_LOCK_DEFINE/ throuhout glib. Added G_LOCK_EXTERN macroSebastian Wilhelmi
1999-02-10 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * glib.h: s/G_LOCK_DECLARE/G_LOCK_DEFINE/ throuhout glib. Added G_LOCK_EXTERN macro to declare a lock externally.
1999-02-08Changed the test for getpwuid_r to exclude those systems (i.e. IRIX), thatSebastian Wilhelmi
1999-02-08 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * configure.in, acconfig.h: Changed the test for getpwuid_r to exclude those systems (i.e. IRIX), that set ENOSYS after the call. Test, if pthread_getspecific is posix like or something different, as on PCThreads. * gthread/gthread-posix.c (g_private_get_posix_impl): Use the HAVE_PTHREAD_GETSPECIFIC_POSIX macro to determine, which signature to use for pthread_getspecific.
1999-01-19More Win32 updates. Add missing Win32 files to distributed files.Tor Lillqvist
Remove the obsolete makefile.lcc.
1999-01-17Oops, ChangeLog entries too, of course.Tor Lillqvist
1999-01-17Added missing gthread/gthread.def file. Incremented version numbersTor Lillqvist
in the *.h.win32 files.
1999-01-16Merge in current Win32 version. Almost no Unix code touched.Tor Lillqvist
* README.win32: More text. * config.h.win32 glibconfig.h.win32: Update to match the corresponding generated files on Unix. * makefile.msc: Update with new source files, and gthread library. Use the compiler flag -MD instead of using -D_DLL and "/nodefaultlib:libc msvcrt.lib" in the link phase. * glib.def: Include new functions, drop removed ones. * glib.h: Add comments about main loop and polling on Win32. (In general, it's only for the GIMP's use.) Add Win32 IO Channel functions. Remove the obsoleted old IO Channel stuff (which was in #if 0 already). * giowin32.c: New file. * gmain.c: Include config.h, conditionalize <sys/time.h> inclusion. Add g_poll implementation for Win32 (only for the GIMP's needs for now, it's hard or even impossible to be as clean and generic as on Unix). Implement g_get_current_time on Win32. If threads aren't supported, don't try to wake up main thread's loop. On Win32, use a semaphore and not a pipe to wake up the main loop. * gmessages.c: On Win32, allocate a console window if the standard output handle is invalid before writing to stdout, and reopen stdout to that console window. * giochannel.c: Conditionalize unistd.h inclusion. Some indentation cleanup. * gstrfuncs.c: Include <signal.h>. * gutils.c: On Win32, also check the HOMEDRIVE and HOMEPATH environment variables. * gmodule-dl.c gmodule-dld.c: In _g_module_build_path, don't add the "lib" prefix and ".so" or ".sl" suffix if already there. * gmodule-win32.c: Likewise for the ".dll" suffix. * gthread-posix.c: Conditionalize <sys/time.h> inclusion.
1999-01-11add support for freebsd (-lc_r for thread foo) and make sure testgthread.c ↵Chris Toshok
compiles on platforms with rand_r.
1999-01-07Here we must replace getpwuid by getpwuid_r, but as I do not know how forSebastian Wilhelmi
1999-01-07 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_any_init): Here we must replace getpwuid by getpwuid_r, but as I do not know how for now, I just made a FIXME note ;-) * gdate.c (g_date_set_time): localtime --> localtime_r to make it thread safe. * configure.in: We do not need to check for broken solaris mutex intitializer any longer. Provide a macro to show the used thread implementation. Not nice, but this is needed until thread support is completed here inside glib. * gthread/testgthread.c: conditionally compile according to the G_THREADS_IMPL_??? macros. (test_private_func): use rand_r instead of rand to make it thread safe.
1999-01-05ditch whitespace before GLIB_SYSDEFS #includes, the # needs to be inManish Singh
* configure.in: ditch whitespace before GLIB_SYSDEFS #includes, the # needs to be in column 1 * gthread/testgthread.c: cleanups * tests/node-test.c: #include unistd.h for exit() -Yosh
1999-01-05Shut up cvsManish Singh
-Yosh
1998-12-18Changed the last pthread_cond_init to pthread_attr_init.Sebastian Wilhelmi
1998-12-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * configure.in (have_threads): Changed the last pthread_cond_init to pthread_attr_init. 1998-12-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * testgthread.c (new_thread): As a joinable thread seems to be the default on posix, leave the explicit setting out, as it causes problems on some older platforms.
1998-12-17giounix.c: s/g_main_poll_add/g_main_remove_add/gCST 1998 Shawn T. Amundson
Wed Dec 16 22:32:13 CST 1998 Shawn T. Amundson <amundson@gtk.org> * glib.h: giounix.c: s/g_main_poll_add/g_main_remove_add/g s/g_main_poll_remove/g_main_remove_poll/g s/g_main_poll_add_unlocking/g_main_add_unlocking_poll/g (from Tim Janik) * gthread-posix.c: use g_free in mutex_free (from Tim Janik)
1998-12-17-DG_LOG_DOMAIN="GThread", we don't need an extern variable for thatTim Janik
Thu Dec 17 03:38:57 1998 Tim Janik <timj@gtk.org> * Makefile.am: -DG_LOG_DOMAIN="GThread", we don't need an extern variable for that (noticed by Joel Becker <jlbec@ocala.cs.miami.edu>)
1998-12-16version bump to 1.1.8, binary age 0, interface age 0.Tim Janik
Wed Dec 16 03:16:58 1998 Tim Janik <timj@gtk.org> * configure.in: version bump to 1.1.8, binary age 0, interface age 0. * glib.h: changed g_lock() to G_LOCK(), g_unlock() to G_UNLOCK() and g_trylock() to G_TRYLOCK(), since these are macros that expand to nothing with --disable-threads. changed G_LOCK_DEFINE() to G_LOCK_DECLARE() and introduced G_LOCK_DECLARE_STATIC() to achive the results of static G_LOCK_DECLARE(). changed semantics of g_thread_supported to g_thread_supported() so it can be used as a function like g_module_supported(). the actuall definition is still a macro that expands into a variable for performance reasons though. various indentation and coding style cleanups. * configure.in: added --enable-threads that defaults to yes. * gmutex.c: changed tests g_thread_supported to g_thread_supported (), changed variable settings of g_thread_supported to g_threads_got_initialized. garray.c: gcache.c: gdataset.c: gdate.c: ghash.c: glist.c: gmain.c: gnode.c: gslist.c: gstring.c: gtree.c: gutils.c: changed s/g_lock/G_LOCK/, s/g_unlock/G_UNLOCK/, s/static G_LOCK_DEFINE/G_LOCK_DECLARE_STATIC/.
1998-12-15updated.Sebastian Wilhelmi
1998-12-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * Makefile.am (EXTRA_DIST): updated. * testgthread.c, gthread-*.c: Changed private to private_key to avoid problems when compiling with under C++.
1998-12-15s/g_mutex_functions_for_glib_use/g_thread_functions_for_glib_use/Sebastian Wilhelmi
1998-12-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gthread-none.c: s/g_mutex_functions_for_glib_use/g_thread_functions_for_glib_use/ * ChangeLog: from now on there is an extra ChangeLog for gthread
1998-12-15Fixed --with-threads, small 64-bit probJeff Garzik
1998-12-15This commit merges the glib-threads branch into the mainOwen Taylor
branch. See the ChangeLog for details of the changes. In brief overview: - The set of threading functions can be set - A default implementation is provided in -lgthread - All static data structures are locked using these functions if g_thread_init() is called.