-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
On 5/21/15 09:58, Mateusz Guzik wrote: > In other words, I would argue modifying native privmitives to > accomodate for zfs use may not be the best course of action. Well, POSIX says this about pthread_cond_destroy(), quote: "A condition variable can be destroyed immediately after all the threads that are blocked on it are awakened." This is also supported by our userland thread library (libthr), by the way, and I don't see this as an unreasonable expectation, as there is no programmer accessible API to drain a conditional variable. BTW. what ZFS code does is that it released the mutex (z_range_lock in the zfs_rlock.c case), then did a broadcast, at which point the code shall reasonably expect that all threads that are blocked on it are awaken, and destroying the condition variable *must* be safe at the time . Cheers, -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJVXtC8AAoJEJW2GBstM+nsvBwP/3lx99PDC+LDYXnZ4wE3bOxh h7I/Sn7fSMO8UzsY6H9Wgaw9SvPzLbeCtAuild8prcmtkIBfX2AJ2Z3MhrmaZjR3 zaZJhOL3gHOip9YWy6nSUaKeFjKgpoA4VrvyOhVczBZ45FYElEseYbnnr+QYA4AZ U9PsSDf23z72/iCebbxwCNZt07sAPj3UtmWQAP0iGPIlUkW8kyJMzHn9jwLfENnH GgBb8C9o9ayBODNh/JfeMnyFylRLnK2GllP5p4zi2boKprKBrFgEVUVo72bhXjD0 zhk3+shXi3U99SuudR7+tRSHHJNeaAOnfPOyNF3EvRFPsIsU/sxZL+FHy4AePURp 7qFJeozEX4mphj5m4WOlX8NMZoEm3SwInVjmlnb0yaOVuLtFM+IUkguYHO2Ckb4X byljvYGXHXKoFZQx4LN+YOdTAOF2xvNhmwB9scfBYI+tEAzIoakcPE1eeciLHmR5 jjLjW4MX8fgMtvBlVlh9XOre9J81Cgj5mxmBK3Z4KnuZD26yrjpn4ZauCI6/7vRN c16mgsdC5lzmgheWhDAethg5oXO0r5xmapLOMMW3ZE4LZ7+L6bCvMsmAjcmVwOzQ ftyO20wx5JTicaK0oPz9i31Szdm8c4z6B/GZdHbZJT+tdypo2WcO9/OLeqDjo3Jj 6prgPNxd72hHS4okdTSA =KCdi -----END PGP SIGNATURE----- _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"