'libc_r: enter/leave_cancellation_point()

Alfred Perlstein alfred at freebsd.org
Tue Oct 21 21:04:45 UTC 2008


Hey Norbert, this is probably a bug, but might not be addressed
because libc_r is not really supported any longer.

Someone may pick it up, but I'm uncertain of that.

* Norbert Koch <nkoch at demig.de> [081021 01:32] wrote:
> Hello,
> 
> I was just inspecting libc_r for trying to understand
> some things and found this:
> 
> <-------------------------
> 
> --- src/lib/libc_r/uthread/uthread_cond.c	2002/05/24 04:32:28	1.33
> +++ src/lib/libc_r/uthread/uthread_cond.c	2002/11/13 18:13:26	1.34
> 
> ...
> 
>  int
> -_pthread_cond_signal(pthread_cond_t * cond)
> +__pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
> +		       const struct timespec *abstime)
> +{
> +	int ret;
> +
> +	_thread_enter_cancellation_point();
> +	ret = _pthread_cond_timedwait(cond, mutex, abstime);
> +	_thread_enter_cancellation_point();
> +	return (ret);
> +}
> 
> 
> ---------------------------->
> 
> Shouldn't that be _thread_leave_cancellation_point() after
> calling _pthread_cond_timedwait() ?
> What effect should I see if this is wrong?
> 
> Best regards,
> 
> Norbert Koch
> 
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
> _______________________________________________
> freebsd-threads at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-threads
> To unsubscribe, send any mail to "freebsd-threads-unsubscribe at freebsd.org"

-- 
- Alfred Perlstein


More information about the freebsd-threads mailing list