diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-05-15 00:24:28 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-05-15 00:24:28 +0000 |
commit | 0e52f31cc875752df3b5e93c7db9e0b06f6245cc (patch) | |
tree | 3e778c06d7c68b5491da40547c16e29fac6648b2 /ace | |
parent | 50de6bc5c37e629c8951f367754579fc4b16630e (diff) | |
download | ATCD-0e52f31cc875752df3b5e93c7db9e0b06f6245cc.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace')
-rw-r--r-- | ace/OS.h | 2 | ||||
-rw-r--r-- | ace/OS.i | 25 | ||||
-rw-r--r-- | ace/Task.cpp | 49 |
3 files changed, 50 insertions, 26 deletions
@@ -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, @@ -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 */ } |