diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-12-13 22:30:13 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-12-13 22:30:13 +0000 |
commit | c175ee2f2a33d511c55c00e8459690cfcf87b764 (patch) | |
tree | 429032cb2cd4bbebb73c11cd970274579ee1397c /ace | |
parent | 6884d0dc992c4bde5b048b8b9478736769fd77eb (diff) | |
download | ATCD-c175ee2f2a33d511c55c00e8459690cfcf87b764.tar.gz |
foo
Diffstat (limited to 'ace')
-rw-r--r-- | ace/ACE.cpp | 2 | ||||
-rw-r--r-- | ace/CORBA_Ref.cpp | 2 | ||||
-rw-r--r-- | ace/Local_Name_Space_T.cpp | 8 | ||||
-rw-r--r-- | ace/OS.cpp | 16 | ||||
-rw-r--r-- | ace/OS.h | 92 | ||||
-rw-r--r-- | ace/OS.i | 34 | ||||
-rw-r--r-- | ace/Reactor.cpp | 2 | ||||
-rw-r--r-- | ace/SString.cpp | 4 | ||||
-rw-r--r-- | ace/SV_Semaphore_Simple.i | 2 | ||||
-rw-r--r-- | ace/Signal.i | 6 | ||||
-rw-r--r-- | ace/Synch.cpp | 4 | ||||
-rw-r--r-- | ace/Synch.h | 2 | ||||
-rw-r--r-- | ace/Synch_T.h | 5 | ||||
-rw-r--r-- | ace/Thread.h | 6 | ||||
-rw-r--r-- | ace/Thread.i | 14 | ||||
-rw-r--r-- | ace/config-hpux-10.x.h | 6 | ||||
-rw-r--r-- | ace/config-m88k.h | 20 | ||||
-rw-r--r-- | ace/config-mvs.h | 8 | ||||
-rw-r--r-- | ace/config-win32-msvc2.0.h | 2 | ||||
-rw-r--r-- | ace/config-win32-msvc4.0.h | 18 |
20 files changed, 135 insertions, 118 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp index 577024c58d8..ed045a78707 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -564,7 +564,7 @@ ACE::timestamp (char date_and_time[], int date_and_timelen) (int) local.wMinute, (int) local.wSecond, (int) local.wMilliseconds * 1000); -#else // UNIX +#else /* UNIX */ char timebuf[26]; // This magic number is based on the ctime(3c) man page. ACE_Time_Value cur_time = ACE_OS::gettimeofday (); time_t secs = cur_time.sec (); diff --git a/ace/CORBA_Ref.cpp b/ace/CORBA_Ref.cpp index 5bfec4317ae..91c7231c971 100644 --- a/ace/CORBA_Ref.cpp +++ b/ace/CORBA_Ref.cpp @@ -83,4 +83,4 @@ ACE_CORBA_Ref<CORBA_REF>::~ACE_CORBA_Ref () ref_->_release (); } -#endif // ACE_CORBA_REF_C +#endif /* ACE_CORBA_REF_C */ diff --git a/ace/Local_Name_Space_T.cpp b/ace/Local_Name_Space_T.cpp index 4b59366d28b..d89cf054b81 100644 --- a/ace/Local_Name_Space_T.cpp +++ b/ace/Local_Name_Space_T.cpp @@ -526,7 +526,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::list_types (ACE_PWSTRING_SET &set, // Compile the regular expression (the 0's cause ACE_OS::compile to allocate space). #if defined (ACE_HAS_REGEX) compiled_regexp = ACE_OS::compile (pattern_rep, 0, 0); -#else // If we don't have regular expressions just use the pattern directly. +#else /* If we don't have regular expressions just use the pattern directly. */ compiled_regexp = pattern_rep; #endif /* ACE_HAS_REGEX */ @@ -542,7 +542,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::list_types (ACE_PWSTRING_SET &set, if (ACE_OS::strcmp ("", pattern_rep) == 0 // Everything matches the wildcard. #if defined (ACE_HAS_REGEX) || ACE_OS::step (type, compiled_regexp) != 0) -#else // If we don't have regular expressions just use strstr() for substring matching. +#else /* If we don't have regular expressions just use strstr() for substring matching. */ || ACE_OS::strstr (type, compiled_regexp) != 0) #endif /* ACE_HAS_REGEX */ @@ -642,7 +642,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::list_type_entries (ACE_BINDING_SET & // Compile the regular expression (the 0's cause ACE_OS::compile to allocate space). #if defined (ACE_HAS_REGEX) compiled_regexp = ACE_OS::compile (pattern_rep, 0, 0); -#else // If we don't have regular expressions just the pattern directly. +#else /* If we don't have regular expressions just the pattern directly. */ compiled_regexp = pattern_rep; #endif /* ACE_HAS_REGEX */ @@ -656,7 +656,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::list_type_entries (ACE_BINDING_SET & if (ACE_OS::strcmp ("", pattern_rep) == 0 // Everything matches the wildcard. #if defined (ACE_HAS_REGEX) || ACE_OS::step (type, compiled_regexp) != 0) -#else // If we don't have regular expressions just use strstr() for substring matching. +#else /* If we don't have regular expressions just use strstr() for substring matching. */ || ACE_OS::strstr (type, compiled_regexp) != 0) #endif /* ACE_HAS_REGEX */ { diff --git a/ace/OS.cpp b/ace/OS.cpp index 040e39dc5f9..6559f6209aa 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -539,7 +539,7 @@ ACE_TSS_Cleanup::dump (void) key_info->dump (); } -#endif // WIN32 +#endif /* WIN32 */ class ACE_Thread_Adapter // = TITLE @@ -651,7 +651,7 @@ ACE_OS::thr_create (ACE_THR_FUNC func, sparam.sched_priority = priority > PRIORITY_MAX ? PRIORITY_MAX : priority; #elif defined(ACE_HAS_IRIX62_THREADS) sparam.sched_priority = priority > PTHREAD_MAX_PRIORITY ? PTHREAD_MAX_PRIORITY : priority; -#elif defined (PTHREAD_MAX_PRIORITY) // For MIT pthreads... +#elif defined (PTHREAD_MAX_PRIORITY) /* For MIT pthreads... */ sparam.prio = priority > PTHREAD_MAX_PRIORITY ? PTHREAD_MAX_PRIORITY : priority; #endif /* ACE_HAS_DCETHREADS */ @@ -800,7 +800,7 @@ ACE_OS::thr_create (ACE_THR_FUNC func, #endif /* ACE_HAS_SETKIND_NP */ return -1; } -#endif // ACE_HAS_FSU_PTHREADS +#endif /* ACE_HAS_FSU_PTHREADS */ } if (ACE_BIT_ENABLED (flags, THR_INHERIT_SCHED) @@ -879,8 +879,7 @@ ACE_OS::thr_create (ACE_THR_FUNC func, // This is the Solaris implementation of pthreads, where // ACE_thread_t and ACE_hthread_t are the same. if (result != -1) - { - *thr_handle = *thr_id; + *thr_handle = *thr_id; #else *thr_handle = ACE_OS::NULL_hthread; #endif /* ACE_HAS_STHREADS */ @@ -910,13 +909,12 @@ ACE_OS::thr_create (ACE_THR_FUNC func, if (start_suspended == 0) ACE_OS::thr_continue (*thr_handle); } - + } return result; #elif defined (ACE_HAS_WTHREADS) ACE_UNUSED_ARG (stack); ACE_Thread_Adapter *thread_args; ACE_NEW_RETURN (thread_args, ACE_Thread_Adapter (func, args), -1); - #if defined (ACE_HAS_MFC) if (ACE_BIT_ENABLED (flags, THR_USE_AFX)) { @@ -1072,7 +1070,7 @@ ACE_OS::thr_setspecific (ACE_thread_key_t key, void *data) // more than once, so another call to pthread_init will not adversely // affect existing threads. pthread_init (); -#endif // ACE_HAS_FSU_PTHREADS +#endif /* ACE_HAS_FSU_PTHREADS */ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setspecific (key, data), ace_result_), int, -1); #elif defined (ACE_HAS_STHREADS) @@ -1392,7 +1390,7 @@ ACE_OS::socket_fini (void) #if defined (VXWORKS) int sys_nerr = ERRMAX + 1; -#include /**/ <usrLib.h> // for ::sp() +#include /**/ <usrLib.h> /* for ::sp() */ // This global function can be used from the VxWorks shell to // pass arguments to a C main () function. @@ -165,7 +165,7 @@ void *CLASS::operator new (size_t bytes) { return ::new char[bytes]; } \ void CLASS::operator delete (void *ptr) { delete (ptr); } #else -#define ACE_ALLOC_HOOK_DECLARE struct __Ace {} // Just need a dummy... +#define ACE_ALLOC_HOOK_DECLARE struct __Ace {} /* Just need a dummy... */ #define ACE_ALLOC_HOOK_DEFINE(CLASS) #endif /* ACE_HAS_ALLOC_HOOKS */ @@ -339,18 +339,18 @@ static ACE_Static_Svc_##X ace_static_svc_##X; // the following macros are for POSIX conformance. -#define S_IRWXU 00700 // read, write, execute: owner. -#define S_IRUSR 00400 // read permission: owner. -#define S_IWUSR 00200 // write permission: owner. -#define S_IXUSR 00100 // execute permission: owner. -#define S_IRWXG 00070 // read, write, execute: group. -#define S_IRGRP 00040 // read permission: group. -#define S_IWGRP 00020 // write permission: group. -#define S_IXGRP 00010 // execute permission: group. -#define S_IRWXO 00007 // read, write, execute: other. -#define S_IROTH 00004 // read permission: other. -#define S_IWOTH 00002 // write permission: other. -#define S_IXOTH 00001 // execute permission: other. +#define S_IRWXU 00700 /* read, write, execute: owner. */ +#define S_IRUSR 00400 /* read permission: owner. */ +#define S_IWUSR 00200 /* write permission: owner. */ +#define S_IXUSR 00100 /* execute permission: owner. */ +#define S_IRWXG 00070 /* read, write, execute: group. */ +#define S_IRGRP 00040 /* read permission: group. */ +#define S_IWGRP 00020 /* write permission: group. */ +#define S_IXGRP 00010 /* execute permission: group. */ +#define S_IRWXO 00007 /* read, write, execute: other. */ +#define S_IROTH 00004 /* read permission: other. */ +#define S_IWOTH 00002 /* write permission: other. */ +#define S_IXOTH 00001 /* execute permission: other. */ #endif /* ACE_LACKS_MODE_MASKS */ @@ -731,7 +731,7 @@ typedef ACE_mutex_t ACE_thread_mutex_t; #define THR_SCHED_RR 0 #define THR_SCHED_DEFAULT 0 #define USYNC_THREAD 0 -#define USYNC_PROCESS 1 // it's all global on VxWorks (without MMU +#define USYNC_PROCESS 1 /* it's all global on VxWorks (without MMU */ // option) typedef SEM_ID ACE_mutex_t; @@ -851,9 +851,9 @@ struct ACE_rwlock_t #define THR_CANCEL_ENABLE 0 #define THR_CANCEL_DEFERRED 0 #define THR_CANCEL_ASYNCHRONOUS 0 -#define THR_DETACHED 0 // ?? ignore in most places -#define THR_BOUND 0 // ?? ignore in most places -#define THR_NEW_LWP 0 // ?? ignore in most places +#define THR_DETACHED 0 /* ?? ignore in most places */ +#define THR_BOUND 0 /* ?? ignore in most places */ +#define THR_NEW_LWP 0 /* ?? ignore in most places */ #define THR_SUSPENDED CREATE_SUSPENDED #endif /* ACE_HAS_DCETHREADS || ACE_HAS_PTHREADS */ #else /* !ACE_HAS_THREADS, i.e., the OS/platform doesn't support threading. */ @@ -862,10 +862,10 @@ struct ACE_rwlock_t #define THR_CANCEL_ENABLE 0 #define THR_CANCEL_DEFERRED 0 #define THR_CANCEL_ASYNCHRONOUS 0 -#define THR_DETACHED 0 // ?? ignore in most places -#define THR_BOUND 0 // ?? ignore in most places -#define THR_NEW_LWP 0 // ?? ignore in most places -#define THR_SUSPENDED 0 // ?? ignore in most places +#define THR_DETACHED 0 /* ?? ignore in most places */ +#define THR_BOUND 0 /* ?? ignore in most places */ +#define THR_NEW_LWP 0 /* ?? ignore in most places */ +#define THR_SUSPENDED 0 /* ?? ignore in most places */ #define USYNC_THREAD 0 #define USYNC_PROCESS 0 // These are dummies needed for class OS.h @@ -972,11 +972,11 @@ typedef void (*ACE_SignalHandlerV)(...); #elif defined (ACE_HAS_SVR4_SIGNAL_T) // SVR4 Signals are inconsistent (e.g., see struct sigaction).. typedef void (*ACE_SignalHandler)(int); -#if !defined (m88k) // with SVR4_SIGNAL_T +#if !defined (m88k) /* with SVR4_SIGNAL_T */ typedef void (*ACE_SignalHandlerV)(void); #else typedef void (*ACE_SignalHandlerV)(int); -#endif // m88k // with SVR4_SIGNAL_T +#endif // m88k /* with SVR4_SIGNAL_T */ #elif defined (ACE_WIN32) typedef void (__cdecl *ACE_SignalHandler)(int); typedef void (__cdecl *ACE_SignalHandlerV)(int); @@ -994,22 +994,22 @@ typedef void (*ACE_SignalHandlerV)(...); // which should be placed after these defines #ifndef ALL_WARNINGS // #pragma warning(disable: 4101) // unreferenced local variable -#pragma warning(disable: 4127) // constant expression for TRACE/ASSERT -#pragma warning(disable: 4134) // message map member fxn casts -#pragma warning(disable: 4511) // private copy constructors are good to have -#pragma warning(disable: 4512) // private operator= are good to have -#pragma warning(disable: 4514) // unreferenced inlines are common -#pragma warning(disable: 4710) // private constructors are disallowed -#pragma warning(disable: 4705) // statement has no effect in optimized code +#pragma warning(disable: 4127) /* constant expression for TRACE/ASSERT */ +#pragma warning(disable: 4134) /* message map member fxn casts */ +#pragma warning(disable: 4511) /* private copy constructors are good to have */ +#pragma warning(disable: 4512) /* private operator= are good to have */ +#pragma warning(disable: 4514) /* unreferenced inlines are common */ +#pragma warning(disable: 4710) /* private constructors are disallowed */ +#pragma warning(disable: 4705) /* statement has no effect in optimized code */ // #pragma warning(disable: 4701) // local variable *may* be used without init // #pragma warning(disable: 4702) // unreachable code caused by optimizations -#pragma warning(disable: 4791) // loss of debugging info in retail version +#pragma warning(disable: 4791) /* loss of debugging info in retail version */ // #pragma warning(disable: 4204) // non-constant aggregate initializer -#pragma warning(disable: 4275) // deriving exported class from non-exported -#pragma warning(disable: 4251) // using non-exported as public in exported -#pragma warning(disable: 4786) // identifier was truncated to '255' characters in the browser information -#pragma warning(disable: 4097) // typedef-name used as synonym for class-name -#endif //!ALL_WARNINGS +#pragma warning(disable: 4275) /* deriving exported class from non-exported */ +#pragma warning(disable: 4251) /* using non-exported as public in exported */ +#pragma warning(disable: 4786) /* identifier was truncated to '255' characters in the browser information */ +#pragma warning(disable: 4097) /* typedef-name used as synonym for class-name */ +#endif /*!ALL_WARNINGS */ // We're on WinNT or Win95 #define ACE_PLATFORM "Win32" #define ACE_PLATFORM_EXE_SUFFIX ".exe" @@ -1020,7 +1020,7 @@ typedef void (*ACE_SignalHandlerV)(...); // mistakenly passing an HPEN to a routine expecting an HBITMAP. // Note that we only use this if we #if defined (ACE_HAS_STRICT) -#if !defined (STRICT) // may already be defined +#if !defined (STRICT) /* may already be defined */ #define STRICT #endif /* !STRICT */ #endif /* ACE_HAS_STRICT */ @@ -1071,7 +1071,7 @@ typedef void (*ACE_SignalHandlerV)(...); #define ACE_DLL_PREFIX "" // This will help until we figure out everything: -#define NFDBITS 32 // only used in unused functions... +#define NFDBITS 32 /* only used in unused functions... */ // These two may be used for internal flags soon: #define MAP_PRIVATE 1 #define MAP_SHARED 2 @@ -1258,7 +1258,7 @@ typedef char TCHAR; #if defined (m88k) #define RUSAGE_SELF 1 -#endif // m88k +#endif /* m88k */ // Default semaphore key #define ACE_DEFAULT_SEM_KEY 1234 @@ -1671,19 +1671,19 @@ typedef fd_set ACE_FD_SET_TYPE; #endif /* NSIG */ #if !defined (R_OK) -#define R_OK 04 // Test for Read permission. +#define R_OK 04 /* Test for Read permission. */ #endif /* R_OK */ #if !defined (W_OK) -#define W_OK 02 // Test for Write permission. +#define W_OK 02 /* Test for Write permission. */ #endif /* W_OK */ #if !defined (X_OK) -#define X_OK 01 // Test for eXecute permission. +#define X_OK 01 /* Test for eXecute permission. */ #endif /* X_OK */ #if !defined (F_OK) -#define F_OK 0 // Test for existence of File. +#define F_OK 0 /* Test for existence of File. */ #endif /* F_OK */ #if !defined (EIDRM) @@ -1691,11 +1691,11 @@ typedef fd_set ACE_FD_SET_TYPE; #endif /* !EIDRM */ #if !defined (ENOTSUP) -#define ENOTSUP ENOSYS // Operation not supported . +#define ENOTSUP ENOSYS /* Operation not supported . */ #endif /* !ENOTSUP */ #if !defined (EDEADLK) -#define EDEADLK 1000 // Some large number.... +#define EDEADLK 1000 /* Some large number.... */ #endif /* !ENOTSUP */ #if !defined (MS_SYNC) @@ -1861,7 +1861,7 @@ typedef void (*ACE_Sig_Handler_Ex) (int, siginfo_t *siginfo, ucontext_t *ucontex #if defined (ACE_REDEFINES_XTI_FUNCTIONS) #include /**/ <xti.h> -#ifdef UNIXWARE // They apparantly forgot one... +#ifdef UNIXWARE /* They apparantly forgot one... */ extern "C" int _xti_error(char *); #endif /* UNIXWARE */ #endif /* ACE_REDEFINES_XTI_FUNCTIONS */ @@ -73,7 +73,7 @@ typedef char *ACE_MMAP_TYPE; extern "C" int gettimeofday (struct timeval *tp, void * = 0); #else extern "C" int gettimeofday (struct timeval *tp); -#endif // m88k +#endif /* m88k */ #elif defined (ACE_HAS_OSF1_GETTIMEOFDAY) extern "C" int gettimeofday (struct timeval *tp, struct timezone * = 0); #elif defined (ACE_HAS_SUNOS4_GETTIMEOFDAY) @@ -154,7 +154,7 @@ extern "C" void ace_mutex_lock_cleanup_adapter (void *args); #include /**/ <sys/syscall.h> #endif /* ACE_HAS_SYSCALL_H */ -#if defined (UNIXWARE) // See strcasecmp, below +#if defined (UNIXWARE) /* See strcasecmp, below */ #include /**/ <ctype.h> #endif /* UNIXWARE */ @@ -416,7 +416,7 @@ ACE_OS::umask (mode_t cmask) #endif /* VXWORKS */ } -#else // ACE_WIN32 +#else /* ACE_WIN32 */ // This is for Win32 exclusively! @@ -1423,7 +1423,7 @@ ACE_OS::rw_rdlock (ACE_rwlock_t *rw) #if defined (ACE_HAS_THREADS) #if defined (ACE_HAS_STHREADS) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_rdlock (rw), ace_result_), int, -1); -#else // NT, POSIX, and VxWorks don't support this natively. +#else /* NT, POSIX, and VxWorks don't support this natively. */ #if defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS) ACE_PTHREAD_CLEANUP_PUSH (&rw->lock_); #endif /* ACE_HAS_DCETHREADS */ @@ -1465,7 +1465,7 @@ ACE_OS::rw_tryrdlock (ACE_rwlock_t *rw) #if defined (ACE_HAS_THREADS) #if defined (ACE_HAS_STHREADS) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_tryrdlock (rw), ace_result_), int, -1); -#else // NT, POSIX, and VxWorks don't support this natively. +#else /* NT, POSIX, and VxWorks don't support this natively. */ int result = -1; if (ACE_OS::mutex_lock (&rw->lock_) != -1) @@ -1500,7 +1500,7 @@ ACE_OS::rw_trywrlock (ACE_rwlock_t *rw) #if defined (ACE_HAS_THREADS) #if defined (ACE_HAS_STHREADS) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_trywrlock (rw), ace_result_), int, -1); -#else // NT, POSIX, and VxWorks don't support this natively. +#else /* NT, POSIX, and VxWorks don't support this natively. */ int result = -1; if (ACE_OS::mutex_lock (&rw->lock_) != -1) @@ -1535,7 +1535,7 @@ ACE_OS::rw_unlock (ACE_rwlock_t *rw) #if defined (ACE_HAS_THREADS) #if defined (ACE_HAS_STHREADS) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_unlock (rw), ace_result_), int, -1); -#else // NT, POSIX, and VxWorks don't support this natively. +#else /* NT, POSIX, and VxWorks don't support this natively. */ if (ACE_OS::mutex_lock (&rw->lock_) == -1) return -1; @@ -1579,7 +1579,7 @@ ACE_OS::rw_wrlock (ACE_rwlock_t *rw) #if defined (ACE_HAS_THREADS) #if defined (ACE_HAS_STHREADS) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_wrlock (rw), ace_result_), int, -1); -#else // NT, POSIX, and VxWorks don't support this natively. +#else /* NT, POSIX, and VxWorks don't support this natively. */ #if defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS) ACE_PTHREAD_CLEANUP_PUSH (&rw->lock_); #endif /* defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS) */ @@ -1627,7 +1627,7 @@ ACE_OS::rwlock_init (ACE_rwlock_t *rw, #if defined (ACE_HAS_THREADS) #if defined (ACE_HAS_STHREADS) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rwlock_init (rw, type, arg), ace_result_), int, -1); -#else // NT, POSIX, and VxWorks don't support this natively. +#else /* NT, POSIX, and VxWorks don't support this natively. */ int result = -1; if (ACE_OS::mutex_init (&rw->lock_, type, name, arg) == 0 @@ -1664,7 +1664,7 @@ ACE_OS::rwlock_destroy (ACE_rwlock_t *rw) #if defined (ACE_HAS_THREADS) #if defined (ACE_HAS_STHREADS) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rwlock_destroy (rw), ace_result_), int, -1); -#else // NT, POSIX, and VxWorks don't support this natively. +#else /* NT, POSIX, and VxWorks don't support this natively. */ ACE_OS::mutex_destroy (&rw->lock_); ACE_OS::cond_destroy (&rw->waiting_readers_); return ACE_OS::cond_destroy (&rw->waiting_writers_); @@ -3027,7 +3027,7 @@ ACE_OS::thr_equal (ACE_thread_t t1, ACE_thread_t t2) #endif /* pthread_equal */ #elif defined (VXWORKS) return ! ACE_OS::strcmp (t1, t2); -#else // For both STHREADS and WTHREADS... +#else /* For both STHREADS and WTHREADS... */ // Hum, Do we need to treat WTHREAD differently? return t1 == t2; #endif /* ACE_HAS_DCETHREADS */ @@ -3045,7 +3045,7 @@ ACE_OS::thr_cmp (ACE_hthread_t t1, ACE_hthread_t t2) #else return ::pthread_equal (t1, t2); #endif /* pthread_equal */ -#else // For STHREADS, WTHREADS, and VXWORKS ... +#else /* For STHREADS, WTHREADS, and VXWORKS ... */ // Hum, Do we need to treat WTHREAD differently? return t1 == t2; #endif /* ACE_HAS_DCETHREADS */ @@ -3397,7 +3397,7 @@ ACE_OS::thr_sigsetmask (int how, } return 0; -#else // Should not happen. +#else /* Should not happen. */ ACE_NOTSUP_RETURN (-1); #endif /* ACE_HAS_STHREADS */ #else @@ -3437,7 +3437,7 @@ ACE_OS::thr_min_stack (void) status), STATUS, -1, status); return status == OK ? taskDesc.td_stackSize : 0; -#else // Should not happen... +#else /* Should not happen... */ ACE_NOTSUP_RETURN (0); #endif /* ACE_HAS_STHREADS */ #else @@ -3474,7 +3474,7 @@ ACE_OS::thr_kill (ACE_thread_t thr_id, int signum) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::kill (tid, signum), ace_result_), int, -1); -#else // This should not happen! +#else /* This should not happen! */ ACE_NOTSUP_RETURN (-1); #endif /* ACE_HAS_STHREADS */ #else @@ -3605,7 +3605,7 @@ ACE_OS::thr_yield (void) ::pthread_yield (NULL); #else ::pthread_yield (); -#endif // ACE_HAS_IRIX62_THREADS */ +#endif /* ACE_HAS_IRIX62_THREADS */ */ #elif defined (ACE_HAS_WTHREADS) ::Sleep (0); #elif defined (VXWORKS) @@ -4904,7 +4904,7 @@ ACE_OS::ctime (const time_t *t) ACE_OSCALL_RETURN (::asctime (::localtime (t)), char *, 0); #else ACE_OSCALL_RETURN (::ctime (t), char *, 0); -#endif // ACE_HAS_BROKEN_CTIME) +#endif /* ACE_HAS_BROKEN_CTIME) */ } ACE_INLINE char * diff --git a/ace/Reactor.cpp b/ace/Reactor.cpp index affb3423b21..1a0a9d8377a 100644 --- a/ace/Reactor.cpp +++ b/ace/Reactor.cpp @@ -528,7 +528,7 @@ ACE_Reactor_Notify::open (ACE_Reactor *r) if (this->notification_pipe_.open () == -1) return -1; -#if !defined (ACE_WIN32) // There seems to be a Win32 bug with this... +#if !defined (ACE_WIN32) /* There seems to be a Win32 bug with this... */ // Set this into non-blocking mode. if (ACE::set_flags (this->notification_pipe_.read_handle (), ACE_NONBLOCK) == -1) diff --git a/ace/SString.cpp b/ace/SString.cpp index edca2053215..a8269f6362e 100644 --- a/ace/SString.cpp +++ b/ace/SString.cpp @@ -108,9 +108,9 @@ ACE_CString::ACE_CString (const ACE_USHORT16 *s, ACE_Allocator *alloc) // Copy the ACE_USHORT16 * string byte-by-byte into the char * // string. for (size_t i = 0; i < this->len_; i++) -#pragma warning(disable: 4244) // Possible loss of data +#pragma warning(disable: 4244) /* Possible loss of data */ this->rep_[i] = (ACE_USHORT16) s[i]; -#pragma warning(default: 4244) // Possible loss of data +#pragma warning(default: 4244) /* Possible loss of data */ this->rep_[this->len_] = '\0'; } diff --git a/ace/SV_Semaphore_Simple.i b/ace/SV_Semaphore_Simple.i index ae949204498..1e159f36604 100644 --- a/ace/SV_Semaphore_Simple.i +++ b/ace/SV_Semaphore_Simple.i @@ -7,7 +7,7 @@ #include "ace/Trace.h" #undef LUSED -#define LUSED 4 // # of chars used from name +#define LUSED 4 /* # of chars used from name */ inline int ACE_SV_Semaphore_Simple::control (int cmd, diff --git a/ace/Signal.i b/ace/Signal.i index e90f1431b38..ea289db6a43 100644 --- a/ace/Signal.i +++ b/ace/Signal.i @@ -174,7 +174,7 @@ ACE_Sig_Guard::ACE_Sig_Guard (ACE_Sig_Set *mask) { ACE_Sig_Set smask (1); -#if 0 // defined (ACE_MT_SAFE) +#if 0 /* defined (ACE_MT_SAFE) */ ACE_OS::thr_sigsetmask (SIG_BLOCK, (sigset_t *) smask, (sigset_t *) this->omask_); #else @@ -183,7 +183,7 @@ ACE_Sig_Guard::ACE_Sig_Guard (ACE_Sig_Set *mask) #endif /* ACE_MT_SAFE */ } else -#if 0 // defined (ACE_MT_SAFE) +#if 0 /* defined (ACE_MT_SAFE) */ ACE_OS::thr_sigsetmask (SIG_BLOCK, (sigset_t *) *mask, (sigset_t *) this->omask_); #else @@ -198,7 +198,7 @@ ACE_INLINE ACE_Sig_Guard::~ACE_Sig_Guard (void) { ACE_TRACE ("ACE_Sig_Guard::~ACE_Sig_Guard"); -#if 0 // defined (ACE_MT_SAFE) +#if 0 /* defined (ACE_MT_SAFE) */ ACE_OS::thr_sigsetmask (SIG_SETMASK, (sigset_t *) this->omask_, 0); #else ACE_OS::sigprocmask (SIG_SETMASK, (sigset_t *) this->omask_, 0); diff --git a/ace/Synch.cpp b/ace/Synch.cpp index 415e5ac8e1a..c8fb75545ab 100644 --- a/ace/Synch.cpp +++ b/ace/Synch.cpp @@ -469,7 +469,7 @@ ACE_Recursive_Thread_Mutex::ACE_Recursive_Thread_Mutex (LPCTSTR name, // If called more than once, pthread_init does nothing // and so does no harm. pthread_init (); -#endif // ACE_HAS_FSU_PTHREADS +#endif /* ACE_HAS_FSU_PTHREADS */ // ACE_TRACE ("ACE_Recursive_Thread_Mutex::ACE_Recursive_Thread_Mutex"); } @@ -613,7 +613,7 @@ ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex (const ACE_Thread_Mutex & // If called more than once, pthread_init does nothing // and so does no harm. pthread_init (); -#endif // ACE_HAS_FSU_PTHREADS +#endif /* ACE_HAS_FSU_PTHREADS */ // ACE_TRACE ("ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex"); if (ACE_OS::cond_init (&this->cond_, USYNC_THREAD, name, arg) != 0) diff --git a/ace/Synch.h b/ace/Synch.h index ccadc73a21e..0e2aba63078 100644 --- a/ace/Synch.h +++ b/ace/Synch.h @@ -490,7 +490,7 @@ protected: ACE_Null_Mutex_Guard (const ACE_Null_Mutex_Guard &) {} }; -#if defined (ACE_HAS_THREADS) // ACE platform supports some form of threading. +#if defined (ACE_HAS_THREADS) /* ACE platform supports some form of threading. */ class ACE_Export ACE_Event // = TITLE diff --git a/ace/Synch_T.h b/ace/Synch_T.h index bac1335fefb..9d5da5922b1 100644 --- a/ace/Synch_T.h +++ b/ace/Synch_T.h @@ -1,7 +1,6 @@ /* -*- C++ -*- */ // $Id$ - // ============================================================================ // // = LIBRARY @@ -369,7 +368,7 @@ public: #define ACE_TSS_Write_GUARD ACE_Write_Guard #define ACE_TSS_Read_GUARD ACE_Read_Guard -#else // ACE platform supports some form of threading and +#else /* ACE platform supports some form of threading and */ // thread-specific storage. template <class LOCK> @@ -488,7 +487,7 @@ public: }; #endif /* !(defined (ACE_HAS_THREADS) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)) */ -#if defined (ACE_HAS_THREADS) // ACE platform supports some form of threading. +#if defined (ACE_HAS_THREADS) /* ACE platform supports some form of threading. */ template <class MUTEX> class ACE_Condition diff --git a/ace/Thread.h b/ace/Thread.h index aab4b61f413..c1ad50af2d6 100644 --- a/ace/Thread.h +++ b/ace/Thread.h @@ -92,6 +92,12 @@ public: static int suspend (ACE_hthread_t); // Suspend the execution of a particular thread. + static int getprio (ACE_hthread_t, int *prio); + // Get the priority of a particular thread. + + static int setprio (ACE_hthread_t, int prio); + // Set the priority of a particular thread. + static int kill (ACE_thread_t, int signum); // Send a signal to the thread. diff --git a/ace/Thread.i b/ace/Thread.i index f22927e171c..6696a08e3f4 100644 --- a/ace/Thread.i +++ b/ace/Thread.i @@ -242,3 +242,17 @@ ACE_Thread::self (ACE_hthread_t &t_id) // ACE_TRACE ("ACE_Thread::self"); ACE_OS::thr_self (t_id); } + +ACE_INLINE int +ACE_Thread::getprio (ACE_hthread_t t_id, int *prio) +{ + ACE_TRACE ("ACE_Thread::getprio"); + return ACE_OS::thr_getprio (t_id, prio); +} + +ACE_INLINE int +ACE_Thread::setprio (ACE_hthread_t t_id, int prio) +{ + ACE_TRACE ("ACE_Thread::setprio"); + return ACE_OS::thr_setprio (t_id, prio); +} diff --git a/ace/config-hpux-10.x.h b/ace/config-hpux-10.x.h index 7f054b37275..83ff5c4eafb 100644 --- a/ace/config-hpux-10.x.h +++ b/ace/config-hpux-10.x.h @@ -15,7 +15,7 @@ #define _HPUX_SOURCE #include /**/ <sys/stdsyms.h> -#include /**/ <sched.h> // pthread.h doesn't include this +#include /**/ <sched.h> /* pthread.h doesn't include this */ #define ACE_HAS_BROKEN_CONVERSIONS @@ -64,8 +64,8 @@ #define ACE_HAS_SETKIND_NP #define ACE_LACKS_CONDATTR_PSHARED #define ACE_LACKS_SI_ADDR -#define ACE_LACKS_SETDETACH // new -#define ACE_LACKS_KEYDELETE // new +#define ACE_LACKS_SETDETACH /* new */ +#define ACE_LACKS_KEYDELETE /* new */ #define ACE_LACKS_THREAD_PROCESS_SCOPING #define ACE_LACKS_THREAD_STACK_ADDR diff --git a/ace/config-m88k.h b/ace/config-m88k.h index 59f540c939c..212a0869c53 100644 --- a/ace/config-m88k.h +++ b/ace/config-m88k.h @@ -17,11 +17,11 @@ extern "C" void pthread_init(); #if !defined (IP_ADD_MEMBERSHIP) #define IP_ADD_MEMBERSHIP 0x13 -#endif // m88k +#endif /* m88k */ #if !defined (IP_DROP_MEMBERSHIP) #define IP_DROP_MEMBERSHIP 0x14 -#endif // m88k +#endif /* m88k */ struct sched_param { @@ -48,7 +48,7 @@ struct ip_mreq #define ACE_TEMPLATES_REQUIRE_SOURCE #define ACE_TEMPLATES_REQUIRE_SPECIALIZATION #define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES -#endif // m88k +#endif /* m88k */ // Platform supports System V IPC (most versions of UNIX, but not Win32) #define ACE_HAS_SYSV_IPC @@ -74,7 +74,7 @@ struct ip_mreq #if !defined (ACE_HAS_FSU_PTHREADS) // Platform supports reentrant functions (i.e., all the POSIX *_r functions). #define ACE_HAS_REENTRANT_FUNCTIONS -#endif // ACE_HAS_FSU_PTHREADS +#endif /* ACE_HAS_FSU_PTHREADS */ // Platform has terminal ioctl flags like TCGETS and TCSETS. #define ACE_HAS_TERM_IOCTLS @@ -91,7 +91,7 @@ struct ip_mreq #if !defined (m88k) // Compiler/platform supports SunOS high resolution timers. #define ACE_HAS_HI_RES_TIMER -#endif // m88k +#endif /* m88k */ // Platform supports IP multicast #define ACE_HAS_IP_MULTICAST @@ -105,7 +105,7 @@ struct ip_mreq #if !defined (m88k) // Compiler/platform has <alloca.h> #define ACE_HAS_ALLOCA_H -#endif // m88k +#endif /* m88k */ // Sockets may be called in multi-threaded programs. #define ACE_HAS_MT_SAFE_SOCKETS @@ -123,7 +123,7 @@ struct ip_mreq #if !defined (m88k) // Platform supports the prusage_t struct. #define ACE_HAS_PRUSAGE_T -#endif // m88k +#endif /* m88k */ // Explicit dynamic linking permits "lazy" symbol resolution. #define ACE_HAS_RTLD_LAZY_V @@ -171,7 +171,7 @@ struct ip_mreq #if !defined (m88k) // Compiler/platform supports sys_siglist array. #define ACE_HAS_SYS_SIGLIST -#endif // m88k +#endif /* m88k */ /* Turn off the following five defines if you want to disable threading. */ // Compile using multi-thread libraries. @@ -182,14 +182,14 @@ struct ip_mreq #define ACE_HAS_STHREADS #else #define ACE_HAS_PTHREADS -#endif // m88k +#endif /* m88k */ // Platform supports threads. #define ACE_HAS_THREADS #if defined (ACE_HAS_FSU_PTHREADS) #define ACE_LACKS_THREAD_STACK_ADDR -#endif // ACE_HAS_FSU_PTHREADS +#endif /* ACE_HAS_FSU_PTHREADS */ // Compiler/platform has thread-specific storage #define ACE_HAS_THREAD_SPECIFIC_STORAGE diff --git a/ace/config-mvs.h b/ace/config-mvs.h index ed12fa4f6c2..7ead2fc5488 100644 --- a/ace/config-mvs.h +++ b/ace/config-mvs.h @@ -6,10 +6,10 @@ // The following #defines are hacks to get around things // that seem to be missing or different in MVS land -#define MAXPATHLEN 1024 // sys/param.h not on MVS -#define NSIG 44 // missing from Signal.h -#define MAXHOSTNAMELEN 256 // missing form netdb.h -#define howmany __howmany // MVS uses different names than most others +#define MAXPATHLEN 1024 /* sys/param.h not on MVS */ +#define NSIG 44 /* missing from Signal.h */ +#define MAXHOSTNAMELEN 256 /* missing form netdb.h */ +#define howmany __howmany /* MVS uses different names than most others */ #define fd_mask __fd_mask #define MAXNAMLEN __DIR_NAME_MAX diff --git a/ace/config-win32-msvc2.0.h b/ace/config-win32-msvc2.0.h index 65f599df148..357201c7caa 100644 --- a/ace/config-win32-msvc2.0.h +++ b/ace/config-win32-msvc2.0.h @@ -50,7 +50,7 @@ // #define _INC_WINDOWS // Prevent winsock.h from including windows.h #endif -#if !defined (_INC_WINDOWS) // Already include windows.h ? +#if !defined (_INC_WINDOWS) /* Already include windows.h ? */ // Must define strict before including windows.h ! #if (defined ACE_HAS_STRICT) #define STRICT 1 diff --git a/ace/config-win32-msvc4.0.h b/ace/config-win32-msvc4.0.h index 38bbb5eeb2d..62d41a93a30 100644 --- a/ace/config-win32-msvc4.0.h +++ b/ace/config-win32-msvc4.0.h @@ -15,10 +15,10 @@ #if defined (_MSC_VER) // "C4355: 'this' : used in base member initializer list" -#pragma warning(disable:4355) // disable C4514 warning +#pragma warning(disable:4355) /* disable C4514 warning */ // #pragma warning(default:4355) // use this to reenable, if desired -#pragma warning(disable:4201) // winnt.h uses nameless structs +#pragma warning(disable:4201) /* winnt.h uses nameless structs */ #endif /* _MSC_VER */ // While digging the MSVC 4.0 include files, I found how to disable @@ -45,12 +45,12 @@ // This is necessary since MFC users apparently can't #include // <windows.h> directly. #if defined (_AFXDLL) || defined (_WINDLL) -#include /**/ <afxwin.h> // He is doing MFC +#include /**/ <afxwin.h> /* He is doing MFC */ // Windows.h will be included via afxwin.h->afx.h->afx_ver_.h->afxv_w32.h // #define _INC_WINDOWS // Prevent winsock.h from including windows.h #endif -#if !defined (_INC_WINDOWS) // Already include windows.h ? +#if !defined (_INC_WINDOWS) /* Already include windows.h ? */ // Must define strict before including windows.h ! #if defined (ACE_HAS_STRICT) #define STRICT 1 @@ -62,13 +62,13 @@ #if defined (_UNICODE) #if !defined (UNICODE) -#define UNICODE // UNICODE is used by Windows headers +#define UNICODE /* UNICODE is used by Windows headers */ #endif /* UNICODE */ #endif /* _UNICODE */ #if defined (UNICODE) #if !defined (_UNICODE) -#define _UNICODE // _UNICODE is used by C-runtime/MFC headers +#define _UNICODE /* _UNICODE is used by C-runtime/MFC headers */ #endif /* _UNICODE */ #endif /* UNICODE */ #endif /* !defined (_INC_INWDOWS) */ @@ -78,7 +78,7 @@ #if defined (ACE_HAS_WINSOCK2) #if !defined (_WINSOCK2API_) -#include /**/ <winsock2.h> // will also include windows.h, if not present +#include /**/ <winsock2.h> /* will also include windows.h, if not present */ #if defined (_MSC_VER) #pragma comment(lib, "ws2_32.lib") #endif /* _MSC_VER */ @@ -87,7 +87,7 @@ #define ACE_WSOCK_VERSION 2, 0 #else #if !defined (_WINSOCKAPI_) -#include /**/ <winsock.h> // will also include windows.h, if not present +#include /**/ <winsock.h> /* will also include windows.h, if not present */ #if defined (_MSC_VER) #pragma comment(lib, "wsock32.lib") @@ -99,7 +99,7 @@ #endif /* ACE_HAS_WINSOCK2 */ #if defined (_MSC_VER) -#pragma warning(default: 4201) // winnt.h uses nameless structs +#pragma warning(default: 4201) /* winnt.h uses nameless structs */ #endif /* _MSC_VER */ #define ACE_HAS_UNICODE |