/*
*
Copyright 1993, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
* *
*/
#ifndef _XTHREADS_H_
# define _XTHREADS_H_
* this header file.
*/
# ifndef xmalloc
# endif
# ifndef xfree
# endif
# ifdef CTHREADS
# include <cthreads.h>
# else /* !CTHREADS */
# if defined(SVR4)
# include <thread.h>
# include <synch.h>
# if defined(__UNIXWARE__)
extern xthread_t (*_x11_thr_self)();
# else
# endif
# ifdef __sun
# define xthread_key_delete(k) 0
# else
# endif
# else /* !SVR4 */
# ifdef WIN32
# include <X11/Xwindows.h>
struct _xthread_waiter {
};
typedef struct {
&_tmptid); \
}
# define _XMUTEX_NESTS
}
extern struct _xthread_waiter *_Xthread_waiter();
LeaveCriticalSection(m); \
EnterCriticalSection(m); \
}
} \
}
struct _xthread_waiter *_tmpthr; \
}
# else /* !WIN32 */
# ifdef USE_TIS_SUPPORT
/*
* TIS support is intended for thread safe libraries.
* This should not be used for general client programming.
*/
# include <tis.h>
# else
# ifdef USE_NBSD_THREADLIB
/*
* NetBSD threadlib support is intended for thread safe libraries.
* This should not be used for general client programming.
*/
# include <threadlib.h>
/* XXX Create it detached? --thorpej */ \
# else
# include <pthread.h>
# ifndef XPRE_STANDARD_API
# else /* XPRE_STANDARD_API */
# define xthread_key_delete(k) 0
# endif /* XPRE_STANDARD_API */
# if defined(_DECTHREADS_)
# endif /* _DECTHREADS_ */
# if defined(__linux__)
# endif /* linux */
# ifdef DEBUG /* too much of a hack to enable normally */
/* see also cma__obj_set_name() */
# endif /* DEBUG */
# endif /* _CMA_VENDOR_ == _CMA__IBM */
# endif /* USE_NBSD_THREADLIB */
# endif /* USE_TIS_SUPPORT */
# endif /* WIN32 */
# endif /* SVR4 */
# endif /* CTHREADS */
# ifndef xcondition_malloc
# endif
# ifndef xcondition_free
# endif
# ifndef xmutex_malloc
# endif
# ifndef xmutex_free
# endif
# ifndef xthread_have_id
# endif
# ifndef xthread_clear_id
# endif
# ifndef xthread_equal
# endif
/* aids understood by some debuggers */
# ifndef xthread_set_name
# endif
# ifndef xmutex_set_name
# endif
# ifndef xcondition_set_name
# endif
#endif /* _XTHREADS_H_ */