~stewart/drizzle/docs-improvements-1

« back to all changes in this revision

Viewing changes to plugin/innobase/include/os0sync.h

merged with up to date trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
4
 
Copyright (c) 2008, Google Inc.
 
3
Copyright (C) 1995, 2009, Innobase Oy. All Rights Reserved.
 
4
Copyright (C) 2008, Google Inc.
5
5
 
6
6
Portions of this file contain modifications contributed and copyrighted by
7
7
Google, Inc. Those modifications are gratefully acknowledged and are described
76
76
                                        /*!< list of all created events */
77
77
};
78
78
 
 
79
/** Denotes an infinite delay for os_event_wait_time() */
 
80
#define OS_SYNC_INFINITE_TIME   ULINT_UNDEFINED
 
81
 
 
82
/** Return value of os_event_wait_time() when the time is exceeded */
 
83
#define OS_SYNC_TIME_EXCEEDED   1
 
84
 
79
85
/** Operating system mutex */
80
86
typedef struct os_mutex_struct  os_mutex_str_t;
81
87
/** Operating system mutex handle */
173
179
                                        os_event_reset(). */
174
180
 
175
181
#define os_event_wait(event) os_event_wait_low(event, 0)
 
182
#define os_event_wait_time(e, t) os_event_wait_time_low(event, t, 0)
176
183
 
 
184
/**********************************************************//**
 
185
Waits for an event object until it is in the signaled state or
 
186
a timeout is exceeded. In Unix the timeout is always infinite.
 
187
@return 0 if success, OS_SYNC_TIME_EXCEEDED if timeout was exceeded */
 
188
UNIV_INTERN
 
189
ulint
 
190
os_event_wait_time_low(
 
191
/*===================*/
 
192
        os_event_t      event,                  /*!< in: event to wait */
 
193
        ulint           time_in_usec,           /*!< in: timeout in
 
194
                                                microseconds, or
 
195
                                                OS_SYNC_INFINITE_TIME */
 
196
        ib_int64_t      reset_sig_count);       /*!< in: zero or the value
 
197
                                                returned by previous call of
 
198
                                                os_event_reset(). */
177
199
/*********************************************************//**
178
200
Creates an operating system mutex semaphore. Because these are slow, the
179
201
mutex semaphore of InnoDB itself (mutex_t) should be used where possible.