~ubuntu-branches/ubuntu/lucid/quark/lucid

« back to all changes in this revision

Viewing changes to quark/main.h

  • Committer: Bazaar Package Importer
  • Author(s): Sven Luther
  • Date: 2003-10-14 15:16:34 UTC
  • Revision ID: james.westby@ubuntu.com-20031014151634-jcm0g761gilipd5e
Tags: upstream-3.21
ImportĀ upstreamĀ versionĀ 3.21

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __main_h
 
2
#define __main_h
 
3
 
 
4
#include <glib.h>
 
5
 
 
6
typedef enum {
 
7
    QUARK_STARTING,
 
8
    QUARK_RUNNING,
 
9
    QUARK_EXITING
 
10
} QuarkStatus;
 
11
 
 
12
extern gboolean        main_loop_at_end;
 
13
extern gboolean        main_random_order;
 
14
extern QuarkStatus     main_status;
 
15
extern GStaticMutex    main_mutex;
 
16
extern GStaticMutex    main_fifo_mutex;
 
17
extern GStaticMutex    main_signal_mutex;
 
18
 
 
19
void main_quit             ();
 
20
void main_set_loop_at_end  (gboolean loop);
 
21
void main_set_random_order (gboolean random);
 
22
 
 
23
#define thread_lock()   (g_static_mutex_lock (&main_mutex), \
 
24
                         g_static_mutex_lock (&main_fifo_mutex), \
 
25
                         g_static_mutex_lock (&main_signal_mutex))
 
26
#define thread_unlock() (g_static_mutex_unlock (&main_mutex), \
 
27
                         g_static_mutex_unlock (&main_fifo_mutex), \
 
28
                         g_static_mutex_unlock (&main_signal_mutex))
 
29
 
 
30
#endif