summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog16
-rw-r--r--ChangeLogs/ChangeLog-02a16
-rw-r--r--ChangeLogs/ChangeLog-03a16
-rw-r--r--ace/OS.h17
-rw-r--r--ace/OS.i41
5 files changed, 92 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index ee23719f072..830ecf75180 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+Wed Sep 13 15:05:42 2000 Luther J Baker <luther@cs.wustl.edu>
+
+ * ace/OS.h:
+
+ ACE_HAS_PACE type redefinitions. L:3180.., L:2250
+
+ * ace/OS.i:
+
+ ACE over NT implements two different kinds of mutex's.
+ One is a lighter CRITICAL SECTION which has a distinct
+ set of associated functions. In ACE_HAS_PACE code, these
+ functions are calling each other (on POSIX compliant
+ platforms, these are defined to be the same types) but
+ NT needs to distinguish the two. This usually means
+ rearranging the preprocessor code. This is just the beginning.
+
Wed Sep 13 14:33:25 2000 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* ace/Service_Config.h (ACE_Service_Config): Made parse_args()
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index ee23719f072..830ecf75180 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,19 @@
+Wed Sep 13 15:05:42 2000 Luther J Baker <luther@cs.wustl.edu>
+
+ * ace/OS.h:
+
+ ACE_HAS_PACE type redefinitions. L:3180.., L:2250
+
+ * ace/OS.i:
+
+ ACE over NT implements two different kinds of mutex's.
+ One is a lighter CRITICAL SECTION which has a distinct
+ set of associated functions. In ACE_HAS_PACE code, these
+ functions are calling each other (on POSIX compliant
+ platforms, these are defined to be the same types) but
+ NT needs to distinguish the two. This usually means
+ rearranging the preprocessor code. This is just the beginning.
+
Wed Sep 13 14:33:25 2000 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* ace/Service_Config.h (ACE_Service_Config): Made parse_args()
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index ee23719f072..830ecf75180 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,19 @@
+Wed Sep 13 15:05:42 2000 Luther J Baker <luther@cs.wustl.edu>
+
+ * ace/OS.h:
+
+ ACE_HAS_PACE type redefinitions. L:3180.., L:2250
+
+ * ace/OS.i:
+
+ ACE over NT implements two different kinds of mutex's.
+ One is a lighter CRITICAL SECTION which has a distinct
+ set of associated functions. In ACE_HAS_PACE code, these
+ functions are calling each other (on POSIX compliant
+ platforms, these are defined to be the same types) but
+ NT needs to distinguish the two. This usually means
+ rearranging the preprocessor code. This is just the beginning.
+
Wed Sep 13 14:33:25 2000 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* ace/Service_Config.h (ACE_Service_Config): Made parse_args()
diff --git a/ace/OS.h b/ace/OS.h
index dadec4c9f16..45b8519b1de 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -2246,6 +2246,10 @@ typedef u_int ACE_thread_key_t;
# elif defined (ACE_HAS_WTHREADS)
typedef CRITICAL_SECTION ACE_thread_mutex_t;
+
+# if defined (ACE_HAS_PACE)
+typedef pace_pthread_mutex_t ACE_mutex_t;
+# else
typedef struct
{
int type_; // Either USYNC_THREAD or USYNC_PROCESS
@@ -2255,6 +2259,7 @@ typedef struct
CRITICAL_SECTION thr_mutex_;
};
} ACE_mutex_t;
+# endif /* ACE_HAS_PACE */
// Wrapper for NT Events.
typedef HANDLE ACE_event_t;
@@ -2356,10 +2361,15 @@ struct ACE_Export ACE_condattr_t
{
int type;
};
+
+# if defined (ACE_HAS_PACE)
+typedef pace_pthread_mutexattr_t ACE_mutexattr_t;
+# else
struct ACE_Export ACE_mutexattr_t
{
int type;
};
+# endif /* ACE_HAS_PACE */
# endif /* ACE_LACKS_COND_T */
# if defined (ACE_LACKS_RWLOCK_T) && !defined (ACE_HAS_PTHREADS_UNIX98_EXT)
@@ -3167,10 +3177,17 @@ inline DWORD ACE_HIGH_DWORD (ACE_QWORD q) { return (DWORD) (q >> 32); }
// Win32 dummies to help compilation.
# if !defined (__BORLANDC__)
+# if defined (ACE_HAS_PACE)
+typedef pace_nlink_t nlink_t;
+typedef pace_mode_t mode_t;
+typedef pace_uid_t uid_t;
+typedef pace_gid_t gid_t;
+# else /* !ACE_HAS_PACE */
typedef DWORD nlink_t;
typedef int mode_t;
typedef int uid_t;
typedef int gid_t;
+# endif /* ACE_HAS_PACE */
# endif /* __BORLANDC__ */
typedef char *caddr_t;
diff --git a/ace/OS.i b/ace/OS.i
index 0d66f05c0f1..67fe60f5368 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -1678,8 +1678,9 @@ ACE_OS::mutex_destroy (ACE_mutex_t *m)
{
ACE_OS_TRACE ("ACE_OS::mutex_destroy");
#if defined (ACE_HAS_PACE)
+ int dummy_retval = 0;
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pace_pthread_mutex_destroy (m),
- ace_result_), int, -1);
+ dummy_retval), int, -1);
#elif defined (ACE_HAS_THREADS)
# if defined (ACE_HAS_PTHREADS)
# if (defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6))
@@ -1726,8 +1727,9 @@ ACE_OS::mutex_lock (ACE_mutex_t *m)
{
// ACE_OS_TRACE ("ACE_OS::mutex_lock");
#if defined (ACE_HAS_PACE)
+ int dummy_retval = 0;
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pace_pthread_mutex_lock (m),
- ace_result_), int, -1);;
+ dummy_retval), int, -1);;
#elif defined (ACE_HAS_THREADS)
# if defined (ACE_HAS_PTHREADS)
// Note, don't use "::" here since the following call is often a macro.
@@ -1826,8 +1828,9 @@ ACE_OS::mutex_trylock (ACE_mutex_t *m)
{
ACE_OS_TRACE ("ACE_OS::mutex_trylock");
#if defined (ACE_HAS_PACE)
+ int dummy_retval = 0;
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pace_pthread_mutex_trylock (m),
- ace_result_), int, -1);
+ dummy_retval), int, -1);
#elif defined (ACE_HAS_THREADS)
# if defined (ACE_HAS_PTHREADS)
// Note, don't use "::" here since the following call is often a macro.
@@ -1958,8 +1961,9 @@ ACE_OS::mutex_unlock (ACE_mutex_t *m)
{
ACE_OS_TRACE ("ACE_OS::mutex_unlock");
#if defined (ACE_HAS_PACE)
+ int dummy_retval = 0;
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pace_pthread_mutex_unlock (m),
- ace_result_), int, -1);
+ dummy_retval), int, -1);
#elif defined (ACE_HAS_THREADS)
# if defined (ACE_HAS_PTHREADS)
// Note, don't use "::" here since the following call is often a macro.
@@ -2010,26 +2014,30 @@ ACE_OS::thread_mutex_init (ACE_thread_mutex_t *m,
{
// ACE_OS_TRACE ("ACE_OS::thread_mutex_init");
#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS) || defined (ACE_HAS_PTHREADS) || defined (ACE_HAS_PACE)
- ACE_UNUSED_ARG (type);
- // Force the use of USYNC_THREAD!
- return ACE_OS::mutex_init (m, USYNC_THREAD, name, arg);
-# elif defined (ACE_HAS_WTHREADS)
+# if defined (ACE_HAS_WTHREADS)
ACE_UNUSED_ARG (type);
ACE_UNUSED_ARG (name);
ACE_UNUSED_ARG (arg);
-
::InitializeCriticalSection (m);
return 0;
+
+# elif defined (ACE_HAS_STHREADS) || defined (ACE_HAS_PTHREADS) || defined (ACE_HAS_PACE)
+ ACE_UNUSED_ARG (type);
+ // Force the use of USYNC_THREAD!
+ return ACE_OS::mutex_init (m, USYNC_THREAD, name, arg);
+
# elif defined (VXWORKS) || defined (ACE_PSOS)
return mutex_init (m, type, name, arg);
-# endif /* Threads variety case */
+
+# endif /* ACE_HAS_STHREADS || ACE_HAS_PTHREADS */
+
#else
ACE_UNUSED_ARG (m);
ACE_UNUSED_ARG (type);
ACE_UNUSED_ARG (name);
ACE_UNUSED_ARG (arg);
ACE_NOTSUP_RETURN (-1);
+
#endif /* ACE_HAS_THREADS */
}
@@ -2038,17 +2046,22 @@ ACE_OS::thread_mutex_destroy (ACE_thread_mutex_t *m)
{
ACE_OS_TRACE ("ACE_OS::thread_mutex_destroy");
#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS) || defined (ACE_HAS_PTHREADS) || defined (ACE_HAS_PACE)
- return ACE_OS::mutex_destroy (m);
-# elif defined (ACE_HAS_WTHREADS)
+# if defined (ACE_HAS_WTHREADS)
::DeleteCriticalSection (m);
return 0;
+
+# elif defined (ACE_HAS_STHREADS) || defined (ACE_HAS_PTHREADS) || defined (ACE_HAS_PACE)
+ return ACE_OS::mutex_destroy (m);
+
# elif defined (VXWORKS) || defined (ACE_PSOS)
return mutex_destroy (m);
+
# endif /* ACE_HAS_STHREADS || ACE_HAS_PTHREADS */
+
#else
ACE_UNUSED_ARG (m);
ACE_NOTSUP_RETURN (-1);
+
#endif /* ACE_HAS_THREADS */
}