Commit Graph

13 Commits

Author SHA1 Message Date
Tim Janik
85755f7e77 default initialize source_timeout with -1 so we have a sane timeout value
Mon Dec 21 03:48:04 1998  Tim Janik  <timj@gtk.org>

        * gmain.c (g_main_iterate): default initialize source_timeout with -1
        so we have a sane timeout value if (*prpare) doesn't set it.
1998-12-21 03:28:25 +00:00
Owen Taylor
7f237f6fcd Add #defines defining scale of priorities.
Sat Dec 19 16:56:02 1998  Owen Taylor  <otaylor@redhat.com>

	* glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
	scale of priorities.
1998-12-19 22:21:39 +00:00
Owen Taylor
bb19315fbd Allocate space for pollfd's _after_ adding poll wake-up-pipe record.
Sat Dec 19 16:56:02 1998  Owen Taylor  <otaylor@redhat.com>

	* gmain.c (g_main_poll): Allocate space for pollfd's
	_after_ adding poll wake-up-pipe record.

	* gmain.c (g_main_add_poll): Changed name
	of internal function g_main_add_poll_unlocked()
	back from the non-sensical g_main_add_unlocking_poll().
1998-12-19 22:11:49 +00:00
Tim Janik
e0153773a6 fixed up sys/poll.h and sys/types.h inclusions.
Sat Dec 19 04:27:17 1998  Tim Janik  <timj@gtk.org>

        * fixed up sys/poll.h and sys/types.h inclusions.
1998-12-19 03:44:30 +00:00
Owen Taylor
2623d2831a Dec 18 12:51:39 1998 Owen Taylor <otaylor@redhat.com>
* gmain.c: Fix errors in computation of timeout
	expiration times > 1sec.
1998-12-18 17:52:18 +00:00
Tim Janik
8be41eae4d new function to check whether a main loop has been quitted. (g_main_new):
Fri Dec 18 00:03:17 1998  Tim Janik  <timj@gtk.org>

        * glib.h:
        * gmain.c:
        (g_main_is_running): new function to check whether a main loop has been
        quitted.
        (g_main_new): added a gboolean argument to determine whether the loop
        should be considered initially running or not. however, g_main_run ()
        will still reset the main loops running state to TRUE upon initial
        entrance.

        * gmain.c:
        (g_main_iterate): documented this function's purpose in 5 steps.
        for step 2), flag sources as G_SOURCE_READY even if !dispatch and
        check G_SOURCE_READY prior to (*prepare), so we don't call (*prepare)
        on them multiple times.

Thu Dec 17 23:43:47 1998  Tim Janik  <timj@gtk.org>

        * gmain.c (g_main_add_poll): reordered arguments, so GPollFD* comes
        first, <sigh> (sorry Snorfle, i should have let you know in the first
        place).
        (g_main_dispatch): stack G_HOOK_FLAG_IN_CALL flags. call source's
        destructor when destroying a source.
1998-12-18 02:23:33 +00:00
CST 1998 Shawn T. Amundson
77ccad4d2f giounix.c: s/g_main_poll_add/g_main_remove_add/g
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 04:36:04 +00:00
Tim Janik
a62ebb0e75 if !G_THREADS_ENABLED, eat the trailing semicolon with a bogus function
Thu Dec 17 04:10:49 1998  Tim Janik  <timj@gtk.org>

        * glib.h (G_LOCK_DECLARE_*): if !G_THREADS_ENABLED, eat the
        trailing semicolon with a bogus function declaration, instead
        of with a bogus variable declarations, so we avoid unused
        variable warnings.
1998-12-17 04:06:27 +00:00
Sebastian Wilhelmi
2e57a36438 Updated to reflect the existence of gthread.
1998-12-16  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* docs/glib-config.1: Updated to reflect the existence of gthread.

	* gmain.c (g_main_poll_add_unlocking): Changed
	g_main_poll_add_unlocked to g_main_poll_add_unlocking to match
	semantic, (indeed, main_loop must be locked, when calling this
	function). Removed the unlocking from the end of that function, as
	that is not right. Made a 'HOLDS' comment above the function.
1998-12-16 09:34:30 +00:00
Tim Janik
b2e318ff3e version bump to 1.1.8, binary age 0, interface age 0.
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-16 05:38:35 +00:00
Owen Taylor
931ea95265 This commit merges the glib-threads branch into the main
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.
1998-12-15 05:28:02 +00:00
Manish Singh
738864a1a7 fixes to #undef HAVE_POLL case
-Yosh
1998-12-08 07:11:54 +00:00
Owen Taylor
beab982e3b Merge main loop into head. This probably breaks Win32, until
someone does the necessary updates.

Sat Nov 28 12:53:47 1998  Owen Taylor  <otaylor@redhat.com>

	* Makefile.am configure.in acconfig.h giochannel.c
	  glib.h glist.c gmain.c gutils.c:

        - Revised GIOChannel to provide a generic virtual-function
  	  based interface.
	- Added unix fd-based GIOChannel's
	- Added generic main-loop abstraction
	- Added timeouts and idle functions using main-loop abstraction.
1998-12-02 14:55:27 +00:00