]> granicus.if.org Git - zfs/commit
Provide correct kthread API semantics using pthreads.
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 14 Jul 2009 21:16:26 +0000 (14:16 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 14 Jul 2009 21:16:26 +0000 (14:16 -0700)
commit864e44e7e03e7ade1810617f55d5f2fb14fc1e94
treeaa15daa312bafa656563358336669fde198f4adb
parent57ae3b59e9c32f8dcfe1b9a790b8d06c099208c9
Provide correct kthread API semantics using pthreads.

The intent here is to fully remove the previous Solaris thread
implementation so we don't need to simulate both Solaris kernel
and user space thread APIs.  The few user space consumers of the
thread API have been updated to use the kthread API.  In order
to support this we needed to more fully support the kthread API
and that means not doing crazy things like casting a thread id
to a pointer and using that as was done before.  This first
implementation is not effecient but it does provide all the
corrent semantics.  If/when performance becomes and issue we
can and should just natively adopt pthreads which is portable.

Let me finish by saying I'm not proud of any of this and I would
love to see it improved.  However, this slow implementation does
at least provide all the correct kthread API semantics whereas
the previous method of casting the thread ID to a pointer was
dodgy at best.
cmd/ztest/ztest.c
lib/libzpool/include/sys/zfs_context.h
lib/libzpool/kernel.c
lib/libzpool/taskq.c
module/zfs/txg.c