You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2001/07/27 19:37:39 UTC
Re: cvs commit: apr/memory/unix apr_sms_threads.c
We should really write a preface in the API docs ... when are apr_foo_t's
== not equal :)
----- Original Message -----
From: <tr...@apache.org>
To: <ap...@apache.org>
Sent: Friday, July 27, 2001 11:54 AM
Subject: cvs commit: apr/memory/unix apr_sms_threads.c
> trawick 01/07/27 09:54:44
>
> Modified: memory/unix apr_sms_threads.c
> Log:
> gotta use apr_os_thread_equal() instead of comparing apr_os_thread_t
> directly; the latter doesn't work on OS/390
>
> Revision Changes Path
> 1.3 +3 -3 apr/memory/unix/apr_sms_threads.c
>
> Index: apr_sms_threads.c
> ===================================================================
> RCS file: /home/cvs/apr/memory/unix/apr_sms_threads.c,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -u -r1.2 -r1.3
> --- apr_sms_threads.c 2001/07/18 18:41:37 1.2
> +++ apr_sms_threads.c 2001/07/27 16:54:44 1.3
> @@ -165,7 +165,7 @@
>
> /* If the thread wasn't registered before, we will segfault */
> thread_node = SMS_THREADS_T(sms)->hashtable[hash];
> - while (thread_node->thread != thread)
> + while (!apr_os_thread_equal(thread_node->thread, thread))
> thread_node = thread_node->next;
>
> node = thread_node->used_sentinel.prev;
> @@ -309,7 +309,7 @@
> hash = THREAD_HASH(thread);
>
> thread_node = SMS_THREADS_T(sms)->hashtable[hash];
> - while (thread_node->thread != thread)
> + while (!apr_os_thread_equal(thread_node->thread, thread))
> thread_node = thread_node->next;
>
> node->avail_size += node->first_avail -
> @@ -639,7 +639,7 @@
> apr_lock_acquire(SMS_THREADS_T(sms)->lock);
>
> thread_node = SMS_THREADS_T(sms)->hashtable[hash];
> - while (thread_node->thread != thread)
> + while (!apr_os_thread_equal(thread_node->thread, thread))
> thread_node = thread_node->next;
>
> if ((*thread_node->ref = thread_node->next) != NULL)
>
>
>
>
Re: cvs commit: apr/memory/unix apr_sms_threads.c
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
From: "Jeff Trawick" <tr...@attglobal.net>
Sent: Friday, July 27, 2001 12:59 PM
> "William A. Rowe, Jr." <wr...@rowe-clan.net> writes:
>
> > We should really write a preface in the API docs ... when are apr_foo_t's
> > == not equal :)
>
> I should have been more clear than "doesn't work".
>
> It isn't that "==" or "!=" gives the wrong result.
>
> "==" or "!=" simply won't compile.
That's goodness.
apr_uid_t a, b;
[...]
if (a == b)
does compile, but is the wrong answer :)
Re: cvs commit: apr/memory/unix apr_sms_threads.c
Posted by Jeff Trawick <tr...@attglobal.net>.
"William A. Rowe, Jr." <wr...@rowe-clan.net> writes:
> We should really write a preface in the API docs ... when are apr_foo_t's
> == not equal :)
I should have been more clear than "doesn't work".
It isn't that "==" or "!=" gives the wrong result.
"==" or "!=" simply won't compile.
> ----- Original Message -----
> From: <tr...@apache.org>
> To: <ap...@apache.org>
> Sent: Friday, July 27, 2001 11:54 AM
> Subject: cvs commit: apr/memory/unix apr_sms_threads.c
>
>
> > trawick 01/07/27 09:54:44
> >
> > Modified: memory/unix apr_sms_threads.c
> > Log:
> > gotta use apr_os_thread_equal() instead of comparing apr_os_thread_t
> > directly; the latter doesn't work on OS/390
--
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...