projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doc: use ASCII in .texi files where UTF-8 isn't needed
[gnulib.git]
/
lib
/
glthread
/
cond.h
diff --git
a/lib/glthread/cond.h
b/lib/glthread/cond.h
index
e205045
..
bf709a2
100644
(file)
--- a/
lib/glthread/cond.h
+++ b/
lib/glthread/cond.h
@@
-1,5
+1,5
@@
/* Condition variables for multithreading.
/* Condition variables for multithreading.
- Copyright (C) 2005-201
1
Free Software Foundation, Inc.
+ Copyright (C) 2005-201
4
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-12,8
+12,7
@@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Yoann Vandoorselaere <yoann@prelude-ids.org>, 2008.
Based on Bruno Haible <bruno@clisp.org> lock.h */
/* Written by Yoann Vandoorselaere <yoann@prelude-ids.org>, 2008.
Based on Bruno Haible <bruno@clisp.org> lock.h */
@@
-55,6
+54,14
@@
#include <time.h>
#include "glthread/lock.h"
#include <time.h>
#include "glthread/lock.h"
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GLTHREAD_COND_INLINE
+# define _GLTHREAD_COND_INLINE _GL_INLINE
+#endif
/* ========================================================================= */
/* ========================================================================= */
@@
-269,7
+276,7
@@
extern int glthread_cond_timedwait_multithreaded (gl_cond_t *cond, gl_lock_t *lo
/* ========================================================================= */
/* ========================================================================= */
-#if USE_WIN
32
_THREADS
+#if USE_WIN
DOWS
_THREADS
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
# include <windows.h>
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
# include <windows.h>
@@
-330,7
+337,7
@@
extern int glthread_cond_destroy_func (gl_cond_t *cond);
/* ========================================================================= */
/* ========================================================================= */
-#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN
32
_THREADS)
+#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN
DOWS
_THREADS)
/* Provide dummy implementation if threads are not supported. */
/* Provide dummy implementation if threads are not supported. */
@@
-370,7
+377,7
@@
extern "C" {
while (0)
#define gl_cond_timedwait(COND, LOCK, ABSTIME) \
gl_cond_timedwait_func (&COND, &LOCK, ABSTIME)
while (0)
#define gl_cond_timedwait(COND, LOCK, ABSTIME) \
gl_cond_timedwait_func (&COND, &LOCK, ABSTIME)
-
static inline
bool
+
_GLTHREAD_COND_INLINE
bool
gl_cond_timedwait_func (gl_cond_t *cond, gl_lock_t *lock, struct timespec *abstime)
{
int err = glthread_cond_timedwait (cond, lock, abstime);
gl_cond_timedwait_func (gl_cond_t *cond, gl_lock_t *lock, struct timespec *abstime)
{
int err = glthread_cond_timedwait (cond, lock, abstime);
@@
-406,4
+413,6
@@
gl_cond_timedwait_func (gl_cond_t *cond, gl_lock_t *lock, struct timespec *absti
}
#endif
}
#endif
+_GL_INLINE_HEADER_END
+
#endif /* _GLTHREAD_COND_H */
#endif /* _GLTHREAD_COND_H */