[complement-svn] SF.net SVN: complement: [1553] trunk/complement/explore
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-03-12 18:25:17
|
Revision: 1553 http://svn.sourceforge.net/complement/?rev=1553&view=rev Author: complement Date: 2007-03-12 11:25:09 -0700 (Mon, 12 Mar 2007) Log Message: ----------- remove code for Novell NetWare; libxmt 1.10.3 Modified Paths: -------------- trunk/complement/explore/include/config/feature.h trunk/complement/explore/include/mt/xmt.h trunk/complement/explore/lib/mt/ChangeLog trunk/complement/explore/lib/mt/Makefile.inc trunk/complement/explore/lib/mt/xmt.cc Removed Paths: ------------- trunk/complement/explore/include/config/_mwccnlm.h trunk/complement/explore/include/config/_netware.h Deleted: trunk/complement/explore/include/config/_mwccnlm.h =================================================================== --- trunk/complement/explore/include/config/_mwccnlm.h 2007-03-09 17:48:37 UTC (rev 1552) +++ trunk/complement/explore/include/config/_mwccnlm.h 2007-03-12 18:25:09 UTC (rev 1553) @@ -1,27 +0,0 @@ -// -*- C++ -*- Time-stamp: <05/06/29 19:01:14 ptr> - -/* - * - * Copyright (c) 2003 - * Petr Ovchenkov - * - * Licensed under the Academic Free License Version 1.0 - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * 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. - * - */ - -#ifndef __config__mwccnlm_h -#define __config__mwccnlm_h - -#ident "@(#)$Id$" - - -#endif // __config__mwccnlm_h Deleted: trunk/complement/explore/include/config/_netware.h =================================================================== --- trunk/complement/explore/include/config/_netware.h 2007-03-09 17:48:37 UTC (rev 1552) +++ trunk/complement/explore/include/config/_netware.h 2007-03-12 18:25:09 UTC (rev 1553) @@ -1,30 +0,0 @@ -// -*- C++ -*- Time-stamp: <05/06/29 19:29:34 ptr> - -/* - * - * Copyright (c) 2005 - * Petr Ovtchenkov - * - * Licensed under the Academic Free License Version 2.1 - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * 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. - * - */ - -#ifndef __config__netware_h -#define __config__netware_h - -#ident "@(#)$Id$" - -#define __FIT_NETWARE // mark target: Novell Netware -#define __FIT_NOVELL_THREADS -#define _LITTLE_ENDIAN // Novell NetWare run only on Intel - -#endif // __config__netware_h Modified: trunk/complement/explore/include/config/feature.h =================================================================== --- trunk/complement/explore/include/config/feature.h 2007-03-09 17:48:37 UTC (rev 1552) +++ trunk/complement/explore/include/config/feature.h 2007-03-12 18:25:09 UTC (rev 1553) @@ -1,23 +1,14 @@ -/* Time-stamp: <05/12/12 10:47:17 ptr> */ +/* Time-stamp: <07/03/12 20:17:03 ptr> */ /* - * Copyright (c) 1999, 2002, 2003, 2004, 2005 + * Copyright (c) 1999, 2002-2007 * Petr Ovtchenkov * * Portion Copyright (c) 1999-2001 * Parallel Graphics Ltd. * - * Licensed under the Academic Free License Version 2.1 + * Licensed under the Academic Free License Version 3.0 * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * 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. - * */ #ifndef __config_feature_h @@ -76,13 +67,6 @@ #include <config/_windows.h> #endif -#ifdef N_PLAT_NLM -# include <config/_netware.h> -# ifdef __MWERKS__ -# include <config/_mwccnlm.h> -# endif -#endif - #ifdef __FIT_USE_DECLSPEC /* using export/import technique */ # ifdef __FIT_DLL # define __FIT_DECLSPEC __declspec( dllexport ) Modified: trunk/complement/explore/include/mt/xmt.h =================================================================== --- trunk/complement/explore/include/mt/xmt.h 2007-03-09 17:48:37 UTC (rev 1552) +++ trunk/complement/explore/include/mt/xmt.h 2007-03-12 18:25:09 UTC (rev 1553) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/02/02 21:32:58 ptr> +// -*- C++ -*- Time-stamp: <07/03/12 20:09:11 ptr> /* * Copyright (c) 1997-1999, 2002-2007 @@ -50,16 +50,6 @@ // # define __DLLEXPORT #endif // __unix -#ifdef __FIT_NOVELL_THREADS // Novell NetWare -# if defined( _REENTRANT ) && !defined(_NOTHREADS) -# include <nwthread.h> -# include <nwsemaph.h> -# include <nwproc.h> -# elif !defined(_NOTHREADS) // !_REENTRANT -# define _NOTHREADS -# endif -#endif - #include <cerrno> #include <mt/time.h> @@ -234,9 +224,6 @@ #ifdef __FIT_WIN32THREADS InitializeCriticalSection( &_M_lock ); #endif -#ifdef __FIT_NOVELL_THREADS - _M_lock = OpenLocalSemaphore( 1 ); -#endif } ~__mutex_base() @@ -250,9 +237,6 @@ #ifdef WIN32 DeleteCriticalSection( &_M_lock ); #endif -#ifdef __FIT_NOVELL_THREADS - CloseLocalSemaphore( _M_lock ); -#endif } private: @@ -269,12 +253,6 @@ #ifdef __FIT_WIN32THREADS CRITICAL_SECTION _M_lock; #endif -#ifdef __FIT_NOVELL_THREADS - // This is for ...LocalSemaphore() calls - // Alternative is EnterCritSec ... ExitCritSec; but ...CritSec in Novell - // block all threads except current - LONG _M_lock; -#endif #ifndef __FIT_WIN32THREADS private: @@ -340,9 +318,6 @@ #ifdef __FIT_WIN32THREADS EnterCriticalSection( &this->_M_lock ); #endif -#ifdef __FIT_NOVELL_THREADS - WaitOnLocalSemaphore( this->_M_lock ); -#endif } #if !defined( WIN32 ) || (defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0400) @@ -357,9 +332,6 @@ #ifdef __FIT_WIN32THREADS return TryEnterCriticalSection( &this->_M_lock ) != 0 ? 0 : -1; #endif -#ifdef __FIT_NOVELL_THREADS - return ExamineLocalSemaphore( this->_M_lock ) > 0 ? WaitOnLocalSemaphore( this->_M_lock ) : -1; -#endif #ifdef _NOTHREADS return 0; #endif @@ -377,9 +349,6 @@ #ifdef __FIT_WIN32THREADS LeaveCriticalSection( &this->_M_lock ); #endif -#ifdef __FIT_NOVELL_THREADS - SignalLocalSemaphore( this->_M_lock ); -#endif } private: @@ -453,9 +422,6 @@ # ifdef __FIT_UITHREADS thread_t _c_id = thr_self(); # endif -# ifdef __FIT_NOVELL_THREADS - int _c_id = GetThreadID(); -# endif if ( _c_id == _id ) { ++_count; return; @@ -479,9 +445,6 @@ # ifdef __FIT_UITHREADS thread_t _c_id = thr_self(); # endif -# ifdef __FIT_NOVELL_THREADS - int _c_id = GetThreadID(); -# endif if ( _c_id == _id ) { ++_count; return 0; @@ -522,9 +485,6 @@ # ifdef __FIT_UITHREADS thread_t _id; # endif -# ifdef __FIT_NOVELL_THREADS - int _id; -# endif }; #endif // __FIT_PTHREAD_SPINLOCK @@ -536,7 +496,7 @@ // (or XSI---X/Open System Interfaces Extention) has recursive mutex option. // Another specialization? -#if (defined(__unix) && !defined(__FIT_XSI_THR)) || defined(__FIT_NOVELL_THREADS) +#if (defined(__unix) && !defined(__FIT_XSI_THR)) // This specialization need for old POSIX and DCE threads, // before XSI (X/Open System Interfaces Extention) or Unix 98. @@ -557,9 +517,6 @@ # ifdef _PTHREADS _id( __STATIC_CAST(pthread_t,-1) ) # endif -# ifdef __FIT_NOVELL_THREADS - _id( -1 ) -# endif { } ~__Mutex() @@ -574,9 +531,6 @@ # ifdef __FIT_UITHREADS thread_t _c_id = thr_self(); # endif -# ifdef __FIT_NOVELL_THREADS - int _c_id = GetThreadID(); -# endif if ( _c_id == _id ) { ++_count; return; @@ -587,9 +541,6 @@ # ifdef __FIT_UITHREADS mutex_lock( &_M_lock ); # endif -# ifdef __FIT_NOVELL_THREADS - WaitOnLocalSemaphore( this->_M_lock ); -# endif _id = _c_id; _count = 0; # endif // !_NOTHREADS @@ -613,9 +564,6 @@ # ifdef __FIT_UITHREADS thread_t _c_id = thr_self(); # endif -# ifdef __FIT_NOVELL_THREADS - int _c_id = GetThreadID(); -# endif if ( _c_id == _id ) { ++_count; return 0; @@ -626,9 +574,6 @@ # ifdef __FIT_UITHREADS int res = mutex_trylock( &_M_lock ); # endif -# ifdef __FIT_NOVELL_THREADS - int res = ExamineLocalSemaphore( this->_M_lock ) > 0 ? WaitOnLocalSemaphore( this->_M_lock ) : -1; -# endif if ( res != 0 ) { return res; } @@ -652,10 +597,6 @@ _id = __STATIC_CAST(pthread_t,-1); pthread_mutex_unlock( &_M_lock ); # endif -# ifdef __FIT_NOVELL_THREADS - _id = -1; - SignalLocalSemaphore( this->_M_lock ); -# endif # endif // !_NOTHREADS } } @@ -675,9 +616,6 @@ # ifdef __FIT_UITHREADS thread_t _id; # endif -# ifdef __FIT_NOVELL_THREADS - int _id; -# endif }; #endif // __unix && !__FIT_XSI_THR @@ -719,10 +657,6 @@ #error Fix me! InitializeCriticalSection( &_M_lock ); #endif -#ifdef __FIT_NOVELL_THREADS -#error Fix me! - _M_lock = OpenLocalSemaphore( 1 ); -#endif } ~__mutex_rw_base() @@ -738,10 +672,6 @@ #error Fix me! DeleteCriticalSection( &_M_lock ); #endif -#ifdef __FIT_NOVELL_THREADS -#error Fix me! - CloseLocalSemaphore( _M_lock ); -#endif } private: @@ -760,13 +690,6 @@ #error Fix me! CRITICAL_SECTION _M_lock; #endif -#ifdef __FIT_NOVELL_THREADS - // This is for ...LocalSemaphore() calls - // Alternative is EnterCritSec ... ExitCritSec; but ...CritSec in Novell - // block all threads except current -#error Fix me! - LONG _M_lock; -#endif }; template <bool SCOPE> @@ -793,10 +716,6 @@ #error Fix me! EnterCriticalSection( &this->_M_lock ); #endif -#ifdef __FIT_NOVELL_THREADS -#error Fix me! - WaitOnLocalSemaphore( this->_M_lock ); -#endif } void wrlock() @@ -812,10 +731,6 @@ #error Fix me! EnterCriticalSection( &this->_M_lock ); #endif -#ifdef __FIT_NOVELL_THREADS -#error Fix me! - WaitOnLocalSemaphore( this->_M_lock ); -#endif } #if !defined( WIN32 ) || (defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0400) @@ -832,10 +747,6 @@ #error Fix me! return TryEnterCriticalSection( &this->_M_lock ) != 0 ? 0 : -1; #endif -#ifdef __FIT_NOVELL_THREADS -#error Fix me! - return ExamineLocalSemaphore( this->_M_lock ) > 0 ? WaitOnLocalSemaphore( this->_M_lock ) : -1; -#endif #ifdef _NOTHREADS #error Fix me! return 0; @@ -855,10 +766,6 @@ #error Fix me! return TryEnterCriticalSection( &this->_M_lock ) != 0 ? 0 : -1; #endif -#ifdef __FIT_NOVELL_THREADS -#error Fix me! - return ExamineLocalSemaphore( this->_M_lock ) > 0 ? WaitOnLocalSemaphore( this->_M_lock ) : -1; -#endif #ifdef _NOTHREADS #error Fix me! return 0; @@ -880,10 +787,6 @@ #error Fix me! LeaveCriticalSection( &this->_M_lock ); #endif -#ifdef __FIT_NOVELL_THREADS -#error Fix me! - SignalLocalSemaphore( this->_M_lock ); -#endif } private: @@ -978,9 +881,6 @@ #ifdef __FIT_WIN32THREADS explicit LockerExt( const CRITICAL_SECTION& m ) : #endif -#ifdef __FIT_NOVELL_THREADS - explicit LockerExt( const LONG& m ) : -#endif _M_lock( m ) { #ifdef _PTHREADS @@ -992,9 +892,6 @@ #ifdef __FIT_WIN32THREADS EnterCriticalSection( const_cast<CRITICAL_SECTION *>(&_M_lock) ); #endif -#ifdef __FIT_NOVELL_THREADS - WaitOnLocalSemaphore( const_cast<LONG&>(_M_lock) ); -#endif } ~LockerExt() @@ -1008,9 +905,6 @@ #ifdef __FIT_WIN32THREADS LeaveCriticalSection( const_cast<CRITICAL_SECTION *>(&_M_lock) ); #endif -#ifdef __FIT_NOVELL_THREADS - SignalLocalSemaphore( const_cast<LONG&>(_M_lock) ); -#endif } private: @@ -1026,13 +920,6 @@ #ifdef __FIT_WIN32THREADS const CRITICAL_SECTION& _M_lock; #endif -#ifdef __FIT_NOVELL_THREADS - // This is for ...LocalSemaphore() calls - // Alternative is EnterCritSec ... ExitCritSec; but ...CritSec in Novell - // block all threads except current - const LONG& _M_lock; -#endif - }; template <bool SCOPE> @@ -1059,9 +946,6 @@ #ifdef __FIT_UITHREADS cond_init( &_cond, 0, 0 ); #endif -#ifdef __FIT_NOVELL_THREADS - _cond = OpenLocalSemaphore( 0 ); -#endif } ~__Condition() @@ -1075,9 +959,6 @@ #ifdef __FIT_UITHREADS cond_destroy( &_cond ); #endif -#ifdef __FIT_NOVELL_THREADS - CloseLocalSemaphore( _cond ); -#endif } bool set( bool __v, bool _broadcast = false ) @@ -1111,16 +992,6 @@ } } #endif -#ifdef __FIT_NOVELL_THREADS - if ( __v == true && tmp == false ) { - if ( _broadcast ) { - // Unimplemented - // pthread_cond_broadcast( &_cond ); - } else { - SignalLocalSemaphore( _cond ); - } - } -#endif return tmp; } @@ -1129,7 +1000,7 @@ int try_wait() { -#if defined(__FIT_WIN32THREADS) || defined(__FIT_NOVELL_THREADS) +#if defined(__FIT_WIN32THREADS) _lock.lock(); #endif #if defined(__FIT_UITHREADS) || defined(_PTHREADS) @@ -1143,10 +1014,6 @@ } return 0; #endif -#ifdef __FIT_NOVELL_THREADS - _lock.unlock(); - return WaitOnLocalSemaphore( _cond ); -#endif #if defined(__FIT_UITHREADS) || defined(_PTHREADS) int ret = 0; while ( !_val ) { @@ -1161,7 +1028,7 @@ return ret; #endif } -#if defined(__FIT_WIN32THREADS) || defined(__FIT_NOVELL_THREADS) +#if defined(__FIT_WIN32THREADS) _lock.unlock(); #endif return 0; @@ -1195,12 +1062,6 @@ return ret; #endif -#ifdef __FIT_NOVELL_THREADS - _lock.lock(); - _val = false; - _lock.unlock(); - return WaitOnLocalSemaphore( _cond ); -#endif #ifdef _NOTHREADS return 0; #endif @@ -1236,9 +1097,6 @@ #ifdef __FIT_UITHREADS return _broadcast ? cond_broadcast( &_cond ) : cond_signal( &_cond ); #endif -#ifdef __FIT_NOVELL_THREADS - return SignalLocalSemaphore( _cond ); -#endif #ifdef _NOTHREADS return 0; #endif @@ -1254,9 +1112,6 @@ #ifdef __FIT_UITHREADS cond_t _cond; #endif -#ifdef __FIT_NOVELL_THREADS - LONG _cond; -#endif __Mutex<false,SCOPE> _lock; bool _val; @@ -1283,9 +1138,6 @@ #ifdef _PTHREADS sem_init( &_sem, SCOPE ? 1 : 0, cnt ); #endif -#ifdef __FIT_NOVELL_THREADS - _sem = OpenLocalSemaphore( cnt ); -#endif } ~__Semaphore() @@ -1299,9 +1151,6 @@ #ifdef _PTHREADS sem_destroy( &_sem ); #endif -#ifdef __FIT_NOVELL_THREADS - CloseLocalSemaphore( _sem ); -#endif } int wait() @@ -1320,9 +1169,6 @@ #ifdef _PTHREADS return sem_wait( &_sem ); #endif -#ifdef __FIT_NOVELL_THREADS - return WaitOnLocalSemaphore( _sem ); -#endif } __FIT_DECLSPEC int wait_time( const ::timespec *t ); // wait for time t, or signal @@ -1343,9 +1189,6 @@ #ifdef _PTHREADS return sem_trywait( &_sem ); #endif -#ifdef __FIT_NOVELL_THREADS - return ExamineLocalSemaphore( _sem ) > 0 ? WaitOnLocalSemaphore( _sem ) : -1; -#endif } int post() @@ -1359,9 +1202,6 @@ #ifdef _PTHREADS return sem_post( &_sem ); #endif -#ifdef __FIT_NOVELL_THREADS - return SignalLocalSemaphore( _sem ); -#endif } int value() @@ -1378,9 +1218,6 @@ return e == 0 ? v : -1; #endif -#ifdef __FIT_NOVELL_THREADS - return ExamineLocalSemaphore( _sem ); -#endif } protected: @@ -1394,9 +1231,6 @@ #ifdef _PTHREADS sem_t _sem; #endif -#ifdef __FIT_NOVELL_THREADS - LONG _sem; -#endif private: __Semaphore( const __Semaphore& ) { } @@ -1428,13 +1262,6 @@ return -1; // not implemented # endif #endif -#ifdef __FIT_NOVELL_THREADS - time_t ct = time( 0 ); - time_t _conv = abstime->tv_sec * 1000 + abstime->tv_nsec / 1000000; - - unsigned ms = _conv >= ct ? _conv - ct : 1; - return TimedWaitOnLocalSemaphore( _sem, ms ); -#endif } template <bool SCOPE> @@ -1461,10 +1288,6 @@ return -1; // not implemented # endif #endif -#ifdef __FIT_NOVELL_THREADS - unsigned ms = interval->tv_sec * 1000 + interval->tv_nsec / 1000000; - return TimedWaitOnLocalSemaphore( _sem, ms ); -#endif } template <bool SCOPE> @@ -1534,10 +1357,6 @@ typedef thread_key_t thread_key_type; typedef thread_t thread_id_type; #endif -#ifdef __FIT_NOVELL_THREADS - typedef void * thread_key_type; - typedef int thread_id_type; -#endif enum { // thread mode flags @@ -1562,13 +1381,6 @@ suspended = CREATE_SUSPENDED, daemon = detached, #endif -#ifdef __FIT_NOVELL_THREADS - bound = 0, - detached = 0x2, - new_lwp = 0, - suspended = 0, - daemon = detached, -#endif // state flags goodbit = 0x00, badbit = 0x01 @@ -1675,9 +1487,6 @@ #ifdef __FIT_WIN32THREADS unsigned long _thr_id; #endif -#ifdef __FIT_NOVELL_THREADS - __Condition<false> _thr_join; -#endif entrance_type _entrance; void *_param; size_t _param_sz; @@ -1692,15 +1501,12 @@ #ifdef __FIT_WIN32THREADS friend unsigned long __stdcall _xcall( void *p ); #endif -#ifdef __FIT_NOVELL_THREADS - friend void _xcall( void * ); -#endif }; template <bool SCOPE> int __Condition<SCOPE>::try_wait_time( const ::timespec *abstime ) { -#if defined(__FIT_WIN32THREADS) || defined(__FIT_NOVELL_THREADS) +#if defined(__FIT_WIN32THREADS) MT_LOCK( _lock ); #endif #if defined(__FIT_UITHREADS) || defined(_PTHREADS) @@ -1743,17 +1549,11 @@ return ret; #endif // _PTHREADS || __FIT_UITHREADS -#ifdef __FIT_NOVELL_THREADS - time_t ct = time( 0 ); - unsigned ms = abstime->tv_sec >= ct ? (abstime->tv_sec - ct) * 1000 + abstime->tv_nsec / 1000000 : 1; - MT_UNLOCK( _lock ); - return TimedWaitOnLocalSemaphore( _cond, ms ); -#endif #ifdef _NOTHREADS return 0; #endif } -#if defined(__FIT_WIN32THREADS) || defined(__FIT_NOVELL_THREADS) +#if defined(__FIT_WIN32THREADS) MT_UNLOCK( _lock ); #endif return 0; @@ -1762,7 +1562,7 @@ template <bool SCOPE> int __Condition<SCOPE>::try_wait_delay( const ::timespec *interval ) { -#if defined(__FIT_WIN32THREADS) || defined(__FIT_NOVELL_THREADS) +#if defined(__FIT_WIN32THREADS) MT_LOCK( _lock ); #endif #if defined(__FIT_UITHREADS) || defined(_PTHREADS) @@ -1809,17 +1609,13 @@ return ret; #endif // _PTHREADS || __FIT_UITHREADS -#ifdef __FIT_NOVELL_THREADS - MT_UNLOCK( _lock ); - return TimedWaitOnLocalSemaphore( _cond, interval->tv_sec * 1000 + interval->tv_nsec / 1000000 ); -#endif #ifdef _NOTHREADS return 0; #endif } -#if defined(__FIT_WIN32THREADS) || defined(__FIT_NOVELL_THREADS) +#if defined(__FIT_WIN32THREADS) MT_UNLOCK( _lock ); #endif return 0; @@ -1870,14 +1666,6 @@ return ret; #endif -#ifdef __FIT_NOVELL_THREADS - MT_LOCK( _lock ); - _val = false; - time_t ct = time( 0 ); - unsigned ms = abstime->tv_sec >= ct ? (abstime->tv_sec - ct) * 1000 + abstime->tv_nsec / 1000000 : 1; - MT_UNLOCK( _lock ); - return TimedWaitOnLocalSemaphore( _cond, ms ); -#endif #ifdef _NOTHREADS return 0; #endif @@ -1909,13 +1697,6 @@ return this->wait_time( &ct ); #endif -#ifdef __FIT_NOVELL_THREADS - MT_LOCK( _lock ); - _val = false; - unsigned ms = interval->tv_sec * 1000 + interval->tv_nsec / 1000000; - MT_UNLOCK( _lock ); - return TimedWaitOnLocalSemaphore( _cond, ms ); -#endif #ifdef _NOTHREADS return 0; #endif Modified: trunk/complement/explore/lib/mt/ChangeLog =================================================================== --- trunk/complement/explore/lib/mt/ChangeLog 2007-03-09 17:48:37 UTC (rev 1552) +++ trunk/complement/explore/lib/mt/ChangeLog 2007-03-12 18:25:09 UTC (rev 1553) @@ -1,3 +1,9 @@ +2007-03-12 Petr Ovtchenkov <pt...@is...> + + * xmt.h, xmt.cc: code for Novell NetWare removed. + + * libxmt: version 1.10.3 + 2007-02-08 Petr Ovtchenkov <pt...@is...> * shm.h: process-shared barrier may be allocated in shared Modified: trunk/complement/explore/lib/mt/Makefile.inc =================================================================== --- trunk/complement/explore/lib/mt/Makefile.inc 2007-03-09 17:48:37 UTC (rev 1552) +++ trunk/complement/explore/lib/mt/Makefile.inc 2007-03-12 18:25:09 UTC (rev 1553) @@ -1,8 +1,8 @@ -# -*- Makefile -*- Time-stamp: <07/02/02 20:56:56 ptr> +# -*- Makefile -*- Time-stamp: <07/03/12 20:14:01 ptr> LIBNAME = xmt MAJOR = 1 MINOR = 10 -PATCH = 2 +PATCH = 3 SRC_CC = xmt.cc thr_mgr.cc time.cc uid.cc shm.cc SRC_C = fl.c Modified: trunk/complement/explore/lib/mt/xmt.cc =================================================================== --- trunk/complement/explore/lib/mt/xmt.cc 2007-03-09 17:48:37 UTC (rev 1552) +++ trunk/complement/explore/lib/mt/xmt.cc 2007-03-12 18:25:09 UTC (rev 1553) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/02/02 21:34:56 ptr> +// -*- C++ -*- Time-stamp: <07/03/12 20:14:35 ptr> /* * Copyright (c) 1997-1999, 2002-2007 @@ -32,10 +32,6 @@ #include <memory> #include <functional> #include <cerrno> -#ifdef __FIT_NETWARE -# include <nwerrno.h> -# include <nwadv.h> -#endif #include <string> #ifdef __linux @@ -86,16 +82,11 @@ static pid_t _pid = syscall( SYS_getpid ); static pid_t _ppid = syscall( SYS_getppid ); -#ifdef __FIT_NOVELL_THREADS -xmt::Thread::thread_key_type _mt_key = 0; -#else // !__FIT_NOVELL_THREADS xmt::Thread::thread_key_type _mt_key = __STATIC_CAST(xmt::Thread::thread_key_type,-1); # ifndef __FIT_WIN32THREADS void *_uw_save = 0; # endif -#endif // !__FIT_NOVELL_THREADS - #ifdef _PTHREADS xmt::Mutex _F_lock; # define _F_locklock xmt::detail::_F_lock.lock(); @@ -106,7 +97,7 @@ # error "Unimplemented" #endif -#if defined(__FIT_WIN32THREADS) || defined(__FIT_NOVELL_THREADS) +#if defined(__FIT_WIN32THREADS) # define _F_locklock # define _F_lockunlock #endif @@ -244,10 +235,6 @@ # endif // !(__FreeBSD__ || __OpenBSD__) #endif // __FIT_UITHREADS || _PTHREADS -#ifdef __FIT_NOVELL_THREADS -const Thread::thread_id_type Thread::bad_thread_id = EFAILURE; -#endif // __FIT_NOVELL_THREADS - Thread::thread_key_type& Thread::_mt_key( detail::_mt_key ); __FIT_DECLSPEC @@ -266,9 +253,6 @@ #ifdef __FIT_WIN32THREADS _uw_alloc_type *user_words = static_cast<_uw_alloc_type *>(TlsGetValue( _mt_key )); #endif -#ifdef __FIT_NOVELL_THREADS - _uw_alloc_type *user_words = *static_cast<_uw_alloc_type **>(GetThreadDataAreaPtr()); -#endif // __FIT_NOVELL_THREADS alloc.deallocate( user_words, uw_alloc_size ); user_words = 0; uw_alloc_size = 0; @@ -300,9 +284,6 @@ #ifdef __FIT_WIN32THREADS TlsSetValue( _mt_key, user_words ); #endif -#ifdef __FIT_NOVELL_THREADS - SaveThreadDataAreaPtr( user_words ); -#endif } else { #ifdef __FIT_UITHREADS thr_getspecific( _mt_key, &(static_cast<void *>(user_words)) ); @@ -313,9 +294,6 @@ #ifdef __FIT_WIN32THREADS user_words = static_cast<_uw_alloc_type *>(TlsGetValue( _mt_key )); #endif -#ifdef __FIT_NOVELL_THREADS - user_words = *static_cast<_uw_alloc_type **>(GetThreadDataAreaPtr()); -#endif if ( (__idx + 1) * sizeof( _uw_alloc_type ) > uw_alloc_size ) { size_t tmp = sizeof( _uw_alloc_type ) * (__idx + 1); #if !defined(_STLP_VERSION) && defined(_MSC_VER) @@ -337,9 +315,6 @@ #ifdef __FIT_WIN32THREADS TlsSetValue( _mt_key, user_words ); #endif -#ifdef __FIT_NOVELL_THREADS - *static_cast<_uw_alloc_type **>(GetThreadDataAreaPtr()) = user_words; -#endif } } @@ -403,8 +378,6 @@ return (_id != bad_thread_id) && (_id == pthread_self()); #elif defined(__FIT_UITHREADS) return (_id != bad_thread_id) && (_id == thr_self()); -#elif defined(__FIT_NOVELL_THREADS) - return (_id != bad_thread_id) && (_id == GetThreadID()); #elif defined(__FIT_WIN32THREADS) return (_id != bad_thread_id) && (_id == GetCurrentThread()); #else @@ -452,15 +425,6 @@ } #endif // __FIT_UITHREADS || PTHREADS -#ifdef __FIT_NOVELL_THREADS - rt.iword = 0; - if ( !_not_run() ) { - _thr_join.wait(); - // Locker lk( _llock ); - _rip_id = bad_thread_id; - } -#endif // __FIT_NOVELL_THREADS - return rt; } @@ -487,9 +451,6 @@ #ifdef __FIT_UITHREADS return thr_suspend( _id ); #endif -#ifdef __FIT_NOVELL_THREADS - return SuspendThread( _id ); -#endif } return -1; @@ -518,9 +479,6 @@ #ifdef __FIT_UITHREADS return thr_continue( _id ); #endif -#ifdef __FIT_NOVELL_THREADS - return ResumeThread( _id ); -#endif } return -1; @@ -563,9 +521,6 @@ #ifdef __FIT_WIN32THREADS ExitThread( code ); #endif -#ifdef __FIT_NOVELL_THREADS - ExitThread( EXIT_THREAD, code ); -#endif } #ifdef __FIT_UITHREADS @@ -786,17 +741,6 @@ _rip_id = _id = CreateThread( 0, 0, _xcall, this, (_flags & suspended), &_thr_id ); err = GetLastError(); #endif -#ifdef __FIT_NOVELL_THREADS - _id = BeginThread( _xcall, 0, 65536, this ); - if ( _id == bad_thread_id ) { - err = errno; // not ::errno, due to #define errno *__get_errno_ptr() - if ( (_flags & detached) == 0 ) { - _thr_join.signal(); - } - } else { - _rip_id = _id; - } -#endif if ( err != 0 ) { if ( psz > sizeof(void *) ) { // clear allocated here @@ -957,11 +901,7 @@ #if defined( __SUNPRO_CC ) && defined( __i386 ) Thread::_exit( ret.iword ); #endif -#ifdef __FIT_NOVELL_THREADS - if ( (me->_flags & detached) == 0 ) { - me->_thr_join.signal(); - } -#endif // __FIT_NOVELL_THREADS || __FIT_WIN32THREADS + return ret.pword; } #ifdef _WIN32 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |