Re: Why weak referencing pthread_equal() in k5-thread.h?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Why weak referencing pthread_equal() in k5-thread.h?

Kenneth G Raeburn
>> If you're using netbsd-current and they've added a stub for

>> pthread_once to libc, I think that would explain the problem, and I'd
>> need to know the name of a function in libpthread that they didn't add
>> a stub for.  I could use pthread_equal, or pthread_join, or ....
>
> On NetBSD 2.0, there is no pthread_*() stubs in libc.  If we want to
> write a library which can be linked without libpthread, we need to
> include <threadlib.h> and use thr_once(), mutex_lock(), etc.
> (or use some magic like weak reference by the library itself).
>
> Recent NetBSD-current (and not-yet-released 3.0) have pthread stubs
> and don't have <threadlib.h> any more.
Hi.  Could you please try out the attached patch and let me know if it
fixes the problem?  (The patch is relative to the 1.4 branch, I can
send a patch based on the trunk if you prefer.)

It's probably overkill -- if a pthread_mutex_lock stub exists and does
nothing, it's probably fine to use it, but this patch will avoid it --
but I'd rather get something right now and optimized later...

Ken





_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev
Reply | Threaded
Open this post in threaded view
|

Re: Why weak referencing pthread_equal() in k5-thread.h?

KAMADA Ken'ichi
At Tue, 31 May 2005 23:13:24 -0400,
Ken Raeburn <[hidden email]> wrote:
>
> Hi.  Could you please try out the attached patch and let me know if it
> fixes the problem?  (The patch is relative to the 1.4 branch, I can
> send a patch based on the trunk if you prefer.)

This patch (with krb5-1.4.1) works fine on both NetBSD-current (3.99.5)
and 2.0 when linked without libpthread.
Tested with kinit(1) on both platforms.
# and kinkd(8) on 3.99.5  :-)

Thanks very much.
--
KAMADA Ken'ichi <[hidden email]>
_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev