summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-05-15 00:24:28 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-05-15 00:24:28 +0000
commit0e52f31cc875752df3b5e93c7db9e0b06f6245cc (patch)
tree3e778c06d7c68b5491da40547c16e29fac6648b2 /ace
parent50de6bc5c37e629c8951f367754579fc4b16630e (diff)
downloadATCD-0e52f31cc875752df3b5e93c7db9e0b06f6245cc.tar.gz
*** empty log message ***
Diffstat (limited to 'ace')
-rw-r--r--ace/OS.h2
-rw-r--r--ace/OS.i25
-rw-r--r--ace/Task.cpp49
3 files changed, 50 insertions, 26 deletions
diff --git a/ace/OS.h b/ace/OS.h
index ea3e3902a39..97b6d49bc60 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -4741,6 +4741,8 @@ public:
const char *s2);
static const char *strpbrk (const char *s1,
const char *s2);
+ static size_t strcspn (const char *s,
+ const char *reject);
static size_t strspn(const char *s1,
const char *s2);
static char *strstr (char *s,
diff --git a/ace/OS.i b/ace/OS.i
index c85c65364e6..29338cf4f65 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -1116,6 +1116,31 @@ ACE_OS::strcat (char *s, const char *t)
}
ACE_INLINE size_t
+ACE_OS::strcspn (const char *s, const char *reject)
+{
+#if !defined (ACE_HAS_WINCE)
+ // ACE_TRACE ("ACE_OS::strstr");
+ return ::strcspn (s, reject);
+#else
+ const char *scan;
+ const char *rej_scan;
+ int count = 0;
+
+ for (scan = s; *scan; scan++)
+ {
+
+ for (rej_scan = reject; *rej_scan; rej_scan++)
+ if (*scan == *rej_scan)
+ return count;
+
+ count++;
+ }
+
+ return count;
+#endif /* ACE_HAS_WINCE */
+}
+
+ACE_INLINE size_t
ACE_OS::strspn (const char *s, const char *t)
{
#if !defined (ACE_HAS_WINCE)
diff --git a/ace/Task.cpp b/ace/Task.cpp
index 9ef0bfed31c..90bc07423ce 100644
--- a/ace/Task.cpp
+++ b/ace/Task.cpp
@@ -95,32 +95,30 @@ ACE_Task_Base::activate (long flags,
if (thread_names == 0)
// thread names were not specified
- this->grp_id_ = this->thr_mgr_->spawn_n (
- n_threads,
- ACE_THR_FUNC (&ACE_Task_Base::svc_run),
- (void *) this,
- flags,
- priority,
- grp_id,
- task,
- thread_handles,
- stack,
- stack_size);
+ this->grp_id_ =
+ this->thr_mgr_->spawn_n (n_threads,
+ ACE_THR_FUNC (&ACE_Task_Base::svc_run),
+ (void *) this,
+ flags,
+ priority,
+ grp_id,
+ task,
+ thread_handles,
+ stack,
+ stack_size);
else
// thread names were specified
- this->grp_id_ = this->thr_mgr_->spawn_n (
- thread_names,
- n_threads,
- ACE_THR_FUNC (&ACE_Task_Base::svc_run),
- (void *) this,
- flags,
- priority,
- grp_id,
- stack,
- stack_size,
- thread_handles);
-
-
+ this->grp_id_ =
+ this->thr_mgr_->spawn_n (thread_names,
+ n_threads,
+ ACE_THR_FUNC (&ACE_Task_Base::svc_run),
+ (void *) this,
+ flags,
+ priority,
+ grp_id,
+ stack,
+ stack_size,
+ thread_handles);
if (this->grp_id_ == -1)
return -1;
else
@@ -138,8 +136,7 @@ ACE_Task_Base::activate (long flags,
ACE_UNUSED_ARG (stack);
ACE_UNUSED_ARG (stack_size);
ACE_UNUSED_ARG (thread_names);
- errno = EINVAL;
- return -1;
+ ACE_NOTSUP_RETURN (-1);
}
#endif /* ACE_MT_SAFE */
}