svn commit: r212539 - head/lib/libthr/thread

2010-09-13 Thread David Xu
Author: davidxu Date: Mon Sep 13 07:18:00 2010 New Revision: 212539 URL: http://svn.freebsd.org/changeset/base/212539 Log: PS_DEAD state needs not be checked because _thr_find_thread() has already checked it. Modified: head/lib/libthr/thread/thr_affinity.c Modified: head/lib/libthr/thread/

svn commit: r212548 - head/lib/libthr

2010-09-13 Thread David Xu
Author: davidxu Date: Mon Sep 13 09:23:38 2010 New Revision: 212548 URL: http://svn.freebsd.org/changeset/base/212548 Log: Update symbol. Modified: head/lib/libthr/pthread.map Modified: head/lib/libthr/pthread.map ==

svn commit: r212551 - head/lib/libthr/thread

2010-09-13 Thread David Xu
Author: davidxu Date: Mon Sep 13 11:57:46 2010 New Revision: 212551 URL: http://svn.freebsd.org/changeset/base/212551 Log: Fix copy&paste problem. Modified: head/lib/libthr/thread/thr_private.h Modified: head/lib/libthr/thread/thr_private.h ===

svn commit: r212552 - head/lib/libthr/thread

2010-09-13 Thread David Xu
Author: davidxu Date: Mon Sep 13 11:58:42 2010 New Revision: 212552 URL: http://svn.freebsd.org/changeset/base/212552 Log: Don't compare thread pointers again. Modified: head/lib/libthr/thread/thr_affinity.c Modified: head/lib/libthr/thread/thr_affinity.c

svn commit: r212629 - head/lib/libthr/thread

2010-09-14 Thread David Xu
Author: davidxu Date: Wed Sep 15 01:21:30 2010 New Revision: 212629 URL: http://svn.freebsd.org/changeset/base/212629 Log: Move back IN_GCLIST flag into field tlflags, since thread list and gc list still share same lock. Modified: head/lib/libthr/thread/thr_private.h Modified: head/lib/lib

svn commit: r212630 - in head/lib/libthr: . thread

2010-09-14 Thread David Xu
Author: davidxu Date: Wed Sep 15 02:56:32 2010 New Revision: 212630 URL: http://svn.freebsd.org/changeset/base/212630 Log: add code to support stack unwinding when thread exits. note that only defer-mode cancellation works, asynchrnous mode does not work because it lacks of libuwind's suppor

Re: svn commit: r212630 - in head/lib/libthr: . thread

2010-09-14 Thread David Xu
David Xu wrote: Author: davidxu Date: Wed Sep 15 02:56:32 2010 New Revision: 212630 URL: http://svn.freebsd.org/changeset/base/212630 Log: add code to support stack unwinding when thread exits. note that only defer-mode cancellation works, asynchrnous mode does not work because it lacks

Re: svn commit: r212630 - in head/lib/libthr: . thread

2010-09-14 Thread David Xu
Alexander Kabaev wrote: On Wed, 15 Sep 2010 02:56:33 + (UTC) David Xu wrote: Author: davidxu Date: Wed Sep 15 02:56:32 2010 New Revision: 212630 URL: http://svn.freebsd.org/changeset/base/212630 Log: add code to support stack unwinding when thread exits. note that only defer-mode

Re: svn commit: r212630 - in head/lib/libthr: . thread

2010-09-15 Thread David Xu
M. Warner Losh wrote: In message: <20100914231728.33ca7...@kan.dnsalias.net> Alexander Kabaev writes: : On Wed, 15 Sep 2010 02:56:33 + (UTC) : David Xu wrote: : : > Author: davidxu : > Date: Wed Sep 15 02:56:32 2010 : > New Revision: 212630 : > URL: http

svn commit: r212837 - head/lib/libthr/thread

2010-09-18 Thread David Xu
Author: davidxu Date: Sun Sep 19 05:19:47 2010 New Revision: 212837 URL: http://svn.freebsd.org/changeset/base/212837 Log: Fix a race condition when finding stack unwinding functions. Modified: head/lib/libthr/thread/thr_exit.c Modified: head/lib/libthr/thread/thr_exit.c

svn commit: r212838 - head/lib/libthr/thread

2010-09-18 Thread David Xu
Author: davidxu Date: Sun Sep 19 05:42:29 2010 New Revision: 212838 URL: http://svn.freebsd.org/changeset/base/212838 Log: - _Unwind_Resume function is not used, remove it. - Use a store barrier to make sure uwl_forcedunwind is lastest thing other threads can see. - Add some comments. M

svn commit: r212840 - head/lib/libthr/thread

2010-09-19 Thread David Xu
Author: davidxu Date: Sun Sep 19 08:55:36 2010 New Revision: 212840 URL: http://svn.freebsd.org/changeset/base/212840 Log: Fix typo. Modified: head/lib/libthr/thread/thr_join.c Modified: head/lib/libthr/thread/thr_join.c ===

svn commit: r212841 - head/lib/libthr/thread

2010-09-19 Thread David Xu
Author: davidxu Date: Sun Sep 19 09:03:11 2010 New Revision: 212841 URL: http://svn.freebsd.org/changeset/base/212841 Log: Because atfork lock is held while forking, a thread cancellation triggered by atfork handler is unsafe, use intenal flag no_cancel to disable it. Modified: head/lib/lib

svn commit: r212952 - head/lib/libthr/thread

2010-09-20 Thread David Xu
Author: davidxu Date: Tue Sep 21 06:47:04 2010 New Revision: 212952 URL: http://svn.freebsd.org/changeset/base/212952 Log: If we are at cancellation point, always work as deferred mode despite whether asynchronous mode is turned on or not, this always gives us a chance to decide whether thre

svn commit: r213096 - head/lib/libthr/thread

2010-09-24 Thread David Xu
Author: davidxu Date: Fri Sep 24 07:52:07 2010 New Revision: 213096 URL: http://svn.freebsd.org/changeset/base/213096 Log: In most cases, cancel_point and cancel_async needn't be checked again, because cancellation is almostly checked at cancellation points. Modified: head/lib/libthr/thread

svn commit: r213098 - in head/sys: amd64/conf i386/conf pc98/conf powerpc/conf sparc64/conf

2010-09-24 Thread David Xu
Author: davidxu Date: Fri Sep 24 09:04:16 2010 New Revision: 213098 URL: http://svn.freebsd.org/changeset/base/213098 Log: Now userland POSIX semaphore is based on umtx. The kernel module is only used to support binary compatible, if want to run old binary, you need to kldload the module. M

svn commit: r213100 - head/lib/libthr/thread

2010-09-24 Thread David Xu
Author: davidxu Date: Fri Sep 24 13:01:01 2010 New Revision: 213100 URL: http://svn.freebsd.org/changeset/base/213100 Log: inline testcancel() into thr_cancel_leave(), because cancel_pending is almost false, this makes a slight better branch predicting. Modified: head/lib/libthr/thread/thr_

svn commit: r213153 - in head/lib: libc libc/gen libc/include librt libthr libthr/thread

2010-09-24 Thread David Xu
Author: davidxu Date: Sat Sep 25 01:57:47 2010 New Revision: 213153 URL: http://svn.freebsd.org/changeset/base/213153 Log: To support stack unwinding for cancellation points, add -fexceptions flag for them, two functions _pthread_cancel_enter and _pthread_cancel_leave are added to let thread

svn commit: r213154 - head/lib/libthr/thread

2010-09-24 Thread David Xu
Author: davidxu Date: Sat Sep 25 04:21:31 2010 New Revision: 213154 URL: http://svn.freebsd.org/changeset/base/213154 Log: Simplify code, and in while loop, fix operator to match the unwinding direction. Modified: head/lib/libthr/thread/thr_exit.c Modified: head/lib/libthr/thread/thr_exit.

svn commit: r213155 - head/tools/regression/pthread/unwind

2010-09-24 Thread David Xu
Author: davidxu Date: Sat Sep 25 04:26:40 2010 New Revision: 213155 URL: http://svn.freebsd.org/changeset/base/213155 Log: Add test cases for stack unwinding. Added: head/tools/regression/pthread/unwind/ head/tools/regression/pthread/unwind/Makefile (contents, props changed) head/tools/

svn commit: r213159 - head/lib/libthr/thread

2010-09-24 Thread David Xu
Author: davidxu Date: Sat Sep 25 06:27:09 2010 New Revision: 213159 URL: http://svn.freebsd.org/changeset/base/213159 Log: Because old _pthread_cleanup_push/pop do not have frame address, it is incompatible with stack unwinding code, if they are invoked, disable stack unwinding for current t

svn commit: r213161 - head/lib/libthr/thread

2010-09-25 Thread David Xu
Author: davidxu Date: Sat Sep 25 08:36:46 2010 New Revision: 213161 URL: http://svn.freebsd.org/changeset/base/213161 Log: Add missing field. Modified: head/lib/libthr/thread/thr_private.h Modified: head/lib/libthr/thread/thr_private.h

svn commit: r213163 - head/lib/libthr/thread

2010-09-25 Thread David Xu
Author: davidxu Date: Sat Sep 25 09:43:24 2010 New Revision: 213163 URL: http://svn.freebsd.org/changeset/base/213163 Log: Only access unwind_disabled when _PTHREAD_FORCED_UNWIND is defined. Modified: head/lib/libthr/thread/thr_clean.c Modified: head/lib/libthr/thread/thr_clean.c ===

Re: svn commit: r213098 - in head/sys: amd64/conf i386/conf pc98/conf powerpc/conf sparc64/conf

2010-09-25 Thread David Xu
Andreas Tobler wrote: Hi! On 24.09.10 11:04, David Xu wrote: Author: davidxu Date: Fri Sep 24 09:04:16 2010 New Revision: 213098 URL: http://svn.freebsd.org/changeset/base/213098 Log: Now userland POSIX semaphore is based on umtx. The kernel module is only used to support binary

svn commit: r213180 - in head/sys: powerpc/conf sun4v/conf

2010-09-25 Thread David Xu
Author: davidxu Date: Sun Sep 26 01:41:53 2010 New Revision: 213180 URL: http://svn.freebsd.org/changeset/base/213180 Log: Follow r213098, kernel POSIX semaphore module is no longer needed. Modified: head/sys/powerpc/conf/GENERIC64 head/sys/sun4v/conf/GENERIC Modified: head/sys/powerpc/c

svn commit: r213182 - head/lib/libthr/thread

2010-09-25 Thread David Xu
Author: davidxu Date: Sun Sep 26 06:45:24 2010 New Revision: 213182 URL: http://svn.freebsd.org/changeset/base/213182 Log: Report death event to debugger before moving to gc list, otherwise debugger may can not find it on thread list. Modified: head/lib/libthr/thread/thr_exit.c Modified: h

svn commit: r213241 - in head: include lib/libthr/thread

2010-09-27 Thread David Xu
Author: davidxu Date: Tue Sep 28 04:57:56 2010 New Revision: 213241 URL: http://svn.freebsd.org/changeset/base/213241 Log: In current code, statically initialized and destroyed object have same null value, the code can not distinguish between them, to fix the problem, now a destroyed object

svn commit: r213256 - head/sys/i386/i386

2010-09-28 Thread David Xu
Author: davidxu Date: Wed Sep 29 02:36:58 2010 New Revision: 213256 URL: http://svn.freebsd.org/changeset/base/213256 Log: Remove a redundant instruction for casuword. Modified: head/sys/i386/i386/support.s Modified: head/sys/i386/i386/support.s ==

Re: svn commit: r213241 - in head: include lib/libthr/thread

2010-09-28 Thread David Xu
Jung-uk Kim wrote: On Tuesday 28 September 2010 12:20 pm, Jung-uk Kim wrote: On Tuesday 28 September 2010 12:02 pm, Jung-uk Kim wrote: On Tuesday 28 September 2010 09:31 am, John Baldwin wrote: On Tuesday, September 28, 2010 12:57:56 am David Xu wrote: Author: davidxu Date: Tue Sep 28 04:57

svn commit: r213257 - head/lib/libthr/thread

2010-09-28 Thread David Xu
Author: davidxu Date: Wed Sep 29 06:06:58 2010 New Revision: 213257 URL: http://svn.freebsd.org/changeset/base/213257 Log: Check invalid mutex in _mutex_cv_unlock. Modified: head/lib/libthr/thread/thr_mutex.c Modified: head/lib/libthr/thread/thr_mutex.c ==

svn commit: r213258 - head/sys/kern

2010-09-29 Thread David Xu
Author: davidxu Date: Wed Sep 29 07:31:05 2010 New Revision: 213258 URL: http://svn.freebsd.org/changeset/base/213258 Log: - kern_sched_rr_get_interval should return interval for thread 1 in target process. - eliminate a goto. MFC after: 1 week Modified: head/sys/kern/p1003_1b.c M

svn commit: r213288 - head/include

2010-09-29 Thread David Xu
Author: davidxu Date: Thu Sep 30 01:25:54 2010 New Revision: 213288 URL: http://svn.freebsd.org/changeset/base/213288 Log: Import unwind.h from libunwind-0.99. Approved by: core (kib, rwatson, imp, brooks) Added: head/include/unwind.h (contents, props changed) Added: head/include/unw

svn commit: r213289 - head/include

2010-09-29 Thread David Xu
Author: davidxu Date: Thu Sep 30 03:09:35 2010 New Revision: 213289 URL: http://svn.freebsd.org/changeset/base/213289 Log: - Sizeof exception class type should always be 64-bit. - Make some functions be visible to BSD source code. Modified: head/include/unwind.h Modified: head/include/unwi

svn commit: r213290 - head/include

2010-09-29 Thread David Xu
Author: davidxu Date: Thu Sep 30 03:16:35 2010 New Revision: 213290 URL: http://svn.freebsd.org/changeset/base/213290 Log: Also the stop function should accept 64-bit exception class. Modified: head/include/unwind.h Modified: head/include/unwind.h

svn commit: r213297 - head/lib/libthr/thread

2010-09-30 Thread David Xu
Author: davidxu Date: Thu Sep 30 12:59:56 2010 New Revision: 213297 URL: http://svn.freebsd.org/changeset/base/213297 Log: change code to use unwind.h. Modified: head/lib/libthr/thread/thr_exit.c head/lib/libthr/thread/thr_private.h Modified: head/lib/libthr/thread/thr_exit.c =

svn commit: r213511 - stable/8/sys/kern

2010-10-07 Thread David Xu
Author: davidxu Date: Thu Oct 7 12:20:50 2010 New Revision: 213511 URL: http://svn.freebsd.org/changeset/base/213511 Log: MFC r213258: - kern_sched_rr_get_interval should return interval for thread 1 in target process. - eliminate a goto. Modified: stable/8/sys/kern/p1003_1b.c Dire

svn commit: r213513 - stable/7/lib/libthr/thread

2010-10-07 Thread David Xu
Author: davidxu Date: Thu Oct 7 12:57:16 2010 New Revision: 213513 URL: http://svn.freebsd.org/changeset/base/213513 Log: MFC r211833: Decrease rdlock count only when thread unlocked a reader lock. Modified: stable/7/lib/libthr/thread/thr_rtld.c Directory Properties: stable/7/lib/libthr/

svn commit: r213515 - stable/7/sys/kern

2010-10-07 Thread David Xu
Author: davidxu Date: Thu Oct 7 13:13:02 2010 New Revision: 213515 URL: http://svn.freebsd.org/changeset/base/213515 Log: MFC r213258: - kern_sched_rr_get_interval should return interval for thread 1 in target process. - eliminate a goto. Modified: stable/7/sys/kern/p1003_1b.c Di

svn commit: r213539 - head/lib/libthr

2010-10-07 Thread David Xu
Author: davidxu Date: Fri Oct 8 01:47:14 2010 New Revision: 213539 URL: http://svn.freebsd.org/changeset/base/213539 Log: unwind.h was imported, gcc directory is no longer needed. Modified: head/lib/libthr/Makefile Modified: head/lib/libthr/Makefile =

svn commit: r213541 - head/lib/libthr

2010-10-07 Thread David Xu
Author: davidxu Date: Fri Oct 8 01:53:33 2010 New Revision: 213541 URL: http://svn.freebsd.org/changeset/base/213541 Log: Oops, don't remove -fexceptions flag. Modified: head/lib/libthr/Makefile Modified: head/lib/libthr/Makefile =

svn commit: r213642 - in head/sys: kern sys

2010-10-08 Thread David Xu
Author: davidxu Date: Sat Oct 9 02:50:23 2010 New Revision: 213642 URL: http://svn.freebsd.org/changeset/base/213642 Log: Create a global thread hash table to speed up thread lookup, use rwlock to protect the table. In old code, thread lookup is done with process lock held, to find a thread

Re: svn commit: r213642 - in head/sys: kern sys

2010-10-09 Thread David Xu
Robert Watson wrote: On Sat, 9 Oct 2010, David Xu wrote: Create a global thread hash table to speed up thread lookup, use rwlock to protect the table. In old code, thread lookup is done with process lock held, to find a thread, kernel has to iterate through process and thread list, this is

svn commit: r213714 - in head/sys: kern sys

2010-10-11 Thread David Xu
Author: davidxu Date: Tue Oct 12 00:36:56 2010 New Revision: 213714 URL: http://svn.freebsd.org/changeset/base/213714 Log: Add a flag TDF_TIDHASH to prevent a thread from being added to or removed from thread hash table multiple times. Modified: head/sys/kern/kern_thread.c head/sys/sys/pr

svn commit: r213761 - head/sys/kern

2010-10-12 Thread David Xu
Author: davidxu Date: Wed Oct 13 06:28:40 2010 New Revision: 213761 URL: http://svn.freebsd.org/changeset/base/213761 Log: sigqueue_collect_set() is no longer needed because other functions maintain pending set correctly. Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.

svn commit: r213829 - head/sys/kern

2010-10-14 Thread David Xu
Author: davidxu Date: Thu Oct 14 08:01:33 2010 New Revision: 213829 URL: http://svn.freebsd.org/changeset/base/213829 Log: In kern_sigtimedwait(), move initialization code out of process lock, instead of using SIGISMEMBER to test every interesting signal, just unmask the signal set and let c

Re: svn commit: r213714 - in head/sys: kern sys

2010-10-14 Thread David Xu
Peter Holm wrote: On Tue, Oct 12, 2010 at 12:36:56AM +, David Xu wrote: Author: davidxu Date: Tue Oct 12 00:36:56 2010 New Revision: 213714 URL: http://svn.freebsd.org/changeset/base/213714 Log: Add a flag TDF_TIDHASH to prevent a thread from being added to or removed from thread hash

svn commit: r213950 - in head/sys: kern sys

2010-10-17 Thread David Xu
Author: davidxu Date: Sun Oct 17 11:01:52 2010 New Revision: 213950 URL: http://svn.freebsd.org/changeset/base/213950 Log: - Insert thread0 into correct thread hash link list. - In thr_exit() and kthread_exit(), only remove thread from hash if it can directly exit, otherwise let exit1() do

svn commit: r214007 - in head: include lib/libthr lib/libthr/thread

2010-10-17 Thread David Xu
Author: davidxu Date: Mon Oct 18 05:09:22 2010 New Revision: 214007 URL: http://svn.freebsd.org/changeset/base/214007 Log: Add pthread_rwlockattr_setkind_np and pthread_rwlockattr_getkind_np, the functions set or get pthread_rwlock type, current supported types are: PTHREAD_RWLOCK_PREFER_

svn commit: r214008 - head/lib/libthr/thread

2010-10-17 Thread David Xu
Author: davidxu Date: Mon Oct 18 05:15:26 2010 New Revision: 214008 URL: http://svn.freebsd.org/changeset/base/214008 Log: s/||/&& Modified: head/lib/libthr/thread/thr_rwlockattr.c Modified: head/lib/libthr/thread/thr_rwlockattr.c =

svn commit: r214009 - head/lib/libthr

2010-10-17 Thread David Xu
Author: davidxu Date: Mon Oct 18 05:16:44 2010 New Revision: 214009 URL: http://svn.freebsd.org/changeset/base/214009 Log: sort function name. Modified: head/lib/libthr/pthread.map Modified: head/lib/libthr/pthread.map =

Re: svn commit: r214008 - head/lib/libthr/thread

2010-10-17 Thread David Xu
Doug Barton wrote: On Mon, 18 Oct 2010, David Xu wrote: Author: davidxu Date: Mon Oct 18 05:15:26 2010 New Revision: 214008 URL: http://svn.freebsd.org/changeset/base/214008 Log: s/||/&& Since this came up in another context this evening ... We can see the "what"

svn commit: r214015 - head/lib/libc/include

2010-10-18 Thread David Xu
Author: davidxu Date: Mon Oct 18 09:44:21 2010 New Revision: 214015 URL: http://svn.freebsd.org/changeset/base/214015 Log: Unbreak buildworld by including pthread_rwlockattr_setkind_np and pthread_rwlockattr_getkind_np. Modified: head/lib/libc/include/namespace.h head/lib/libc/include/un-

svn commit: r214046 - head/lib/libthr/thread

2010-10-18 Thread David Xu
Author: davidxu Date: Mon Oct 18 23:37:56 2010 New Revision: 214046 URL: http://svn.freebsd.org/changeset/base/214046 Log: Set default type to PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, this is the type we are using. Modified: head/lib/libthr/thread/thr_rwlockattr.c Modified: head/lib/l

svn commit: r214091 - head/sys/kern

2010-10-19 Thread David Xu
Author: davidxu Date: Wed Oct 20 00:41:38 2010 New Revision: 214091 URL: http://svn.freebsd.org/changeset/base/214091 Log: - Don't include sx.h, it is not needed. - Check NULL pointer, move timeout calculation code outside of process lock. Modified: head/sys/kern/kern_thr.c Modified: h

svn commit: r214093 - in head/lib: libc/include libthr libthr/thread

2010-10-19 Thread David Xu
Author: davidxu Date: Wed Oct 20 02:34:02 2010 New Revision: 214093 URL: http://svn.freebsd.org/changeset/base/214093 Log: Revert revision 214007, I realized that MySQL wants to resolve a silly rwlock deadlock problem, the deadlock is caused by writer waiters, if a thread has already locked

svn commit: r214238 - head/sys/kern

2010-10-23 Thread David Xu
Author: davidxu Date: Sat Oct 23 13:16:39 2010 New Revision: 214238 URL: http://svn.freebsd.org/changeset/base/214238 Log: In thr_exit() and kthread_exit(), only remove thread from hash if it can directly exit, otherwise let exit1() do it. The change should be in r213950, but for unknown rea

svn commit: r214334 - head/lib/libthr/thread

2010-10-25 Thread David Xu
Author: davidxu Date: Mon Oct 25 09:16:04 2010 New Revision: 214334 URL: http://svn.freebsd.org/changeset/base/214334 Log: Get cpuset in pthread_attr_get_np() and free it in pthread_attr_destroy(). MFC after:7 days Modified: head/lib/libthr/thread/thr_attr.c head/lib/libthr/thread/

svn commit: r214335 - head/lib/libthr/thread

2010-10-25 Thread David Xu
Author: davidxu Date: Mon Oct 25 11:16:50 2010 New Revision: 214335 URL: http://svn.freebsd.org/changeset/base/214335 Log: Fix typo. Modified: head/lib/libthr/thread/thr_attr.c Modified: head/lib/libthr/thread/thr_attr.c ===

svn commit: r214337 - head/sys/kern

2010-10-25 Thread David Xu
Author: davidxu Date: Mon Oct 25 13:13:16 2010 New Revision: 214337 URL: http://svn.freebsd.org/changeset/base/214337 Log: Use function tdfind() to find a thread. Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c =

svn commit: r214371 - in stable/8: include lib/libthr/thread

2010-10-26 Thread David Xu
Author: davidxu Date: Tue Oct 26 09:25:29 2010 New Revision: 214371 URL: http://svn.freebsd.org/changeset/base/214371 Log: MFC r213241, r213257: In current code, statically initialized and destroyed object have same null value, the code can not distinguish between them, to fix the problem,

svn commit: r214409 - head/sys/kern

2010-10-26 Thread David Xu
Author: davidxu Date: Wed Oct 27 02:32:54 2010 New Revision: 214409 URL: http://svn.freebsd.org/changeset/base/214409 Log: If input parameter cpusetsize is zero, give userland size of cpuset mask kernel is using. Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c =

Re: svn commit: r214409 - head/sys/kern

2010-10-26 Thread David Xu
Garrett Cooper wrote: On Tue, Oct 26, 2010 at 7:32 PM, David Xu wrote: Author: davidxu Date: Wed Oct 27 02:32:54 2010 New Revision: 214409 URL: http://svn.freebsd.org/changeset/base/214409 Log: If input parameter cpusetsize is zero, give userland size of cpuset mask kernel is using

Re: svn commit: r214409 - head/sys/kern

2010-10-26 Thread David Xu
Garrett Cooper wrote: On Wed, Oct 27, 2010 at 3:49 AM, David Xu wrote: Garrett Cooper wrote: On Tue, Oct 26, 2010 at 7:32 PM, David Xu wrote: Author: davidxu Date: Wed Oct 27 02:32:54 2010 New Revision: 214409 URL: http://svn.freebsd.org/changeset/base/214409 Log: If input parameter

svn commit: r214410 - head/lib/libthr/thread

2010-10-26 Thread David Xu
Author: davidxu Date: Wed Oct 27 04:19:07 2010 New Revision: 214410 URL: http://svn.freebsd.org/changeset/base/214410 Log: Remove locking and unlock in pthread_mutex_destroy, because it can not fix race condition in application code, as a result, the problem described in PR threads/151767 is

Re: svn commit: r214409 - head/sys/kern

2010-10-27 Thread David Xu
Pawel Jakub Dawidek wrote: On Wed, Oct 27, 2010 at 10:49:12AM +, David Xu wrote: I really hate to see such a problem that userland can not figure out what kernel is using, I try hardly to guess, but still can not find what it is using. yes, I think the doc may need to be fixed or another

svn commit: r214412 - in head: lib/libthr/thread sys/kern

2010-10-27 Thread David Xu
Author: davidxu Date: Wed Oct 27 09:29:03 2010 New Revision: 214412 URL: http://svn.freebsd.org/changeset/base/214412 Log: - Revert r214409. - Use long word to figure out sizeof kernel cpuset, hope it works. Modified: head/lib/libthr/thread/thr_attr.c head/sys/kern/kern_cpuset.c Modified

Re: svn commit: r214412 - in head: lib/libthr/thread sys/kern

2010-10-27 Thread David Xu
Garrett Cooper wrote: On Wed, Oct 27, 2010 at 2:29 AM, David Xu wrote: Author: davidxu Date: Wed Oct 27 09:29:03 2010 New Revision: 214412 URL: http://svn.freebsd.org/changeset/base/214412 Log: - Revert r214409. - Use long word to figure out sizeof kernel cpuset, hope it works. Modified

svn commit: r214413 - head/lib/libthr/thread

2010-10-27 Thread David Xu
Author: davidxu Date: Wed Oct 27 09:59:43 2010 New Revision: 214413 URL: http://svn.freebsd.org/changeset/base/214413 Log: Check small set and reject it, this is how kernel did. Always use the size kernel is using. Modified: head/lib/libthr/thread/thr_attr.c Modified: head/lib/libthr/threa

Re: svn commit: r214409 - head/sys/kern

2010-10-27 Thread David Xu
Robert Watson wrote: On Wed, 27 Oct 2010, David Xu wrote: I really hate to see such a problem that userland can not figure out what kernel is using, I try hardly to guess, but still can not find what it is using. yes, I think the doc may need to be fixed or another syscall is needed

Re: svn commit: r214409 - head/sys/kern

2010-10-27 Thread David Xu
Garrett Cooper wrote: On Wed, Oct 27, 2010 at 9:22 AM, Andriy Gapon wrote: [patch attachment was lost] Ugh... Mailman hates me I guess :(... on 27/10/2010 19:07 Garrett Cooper said the following: How about this patch? I implemented this as a readonly tunable and I don't think that it'

svn commit: r214443 - head/share/man/man3

2010-10-27 Thread David Xu
Author: davidxu Date: Thu Oct 28 02:59:25 2010 New Revision: 214443 URL: http://svn.freebsd.org/changeset/base/214443 Log: Follow the change made in libthr, add ERANGE error code and more EINVAL error cases. Modified: head/share/man/man3/pthread_attr_affinity_np.3 Modified: head/share/man/

Re: svn commit: r214409 - head/sys/kern

2010-10-28 Thread David Xu
Garrett Cooper wrote: On Thu, Oct 28, 2010 at 2:54 AM, David Xu wrote: Garrett Cooper wrote: On Wed, Oct 27, 2010 at 9:22 AM, Andriy Gapon wrote: [patch attachment was lost] Ugh... Mailman hates me I guess :(... on 27/10/2010 19:07 Garrett Cooper said the following: How about this

svn commit: r214500 - head/lib/libthr/thread

2010-10-29 Thread David Xu
Author: davidxu Date: Fri Oct 29 07:04:45 2010 New Revision: 214500 URL: http://svn.freebsd.org/changeset/base/214500 Log: Remove local variable 'first', instead check signal number in memory, because the variable can be in register, second checking the variable may still return true, howeve

svn commit: r214506 - head/lib/libthr/thread

2010-10-29 Thread David Xu
Author: davidxu Date: Fri Oct 29 09:35:36 2010 New Revision: 214506 URL: http://svn.freebsd.org/changeset/base/214506 Log: Return previous sigaction correctly. Submitted by: avg Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c ===

svn commit: r214510 - in head: include lib/libc/gen sys/kern

2010-10-29 Thread David Xu
Author: davidxu Date: Fri Oct 29 13:31:10 2010 New Revision: 214510 URL: http://svn.freebsd.org/changeset/base/214510 Log: Add sysctl kern.sched.cpusetsize to export the size of kernel cpuset, also add sysconf() key _SC_CPUSET_SIZE to get sysctl value. Submitted by: gcooper Modified: h

svn commit: r214611 - head/sys/kern

2010-10-31 Thread David Xu
Author: davidxu Date: Mon Nov 1 00:42:25 2010 New Revision: 214611 URL: http://svn.freebsd.org/changeset/base/214611 Log: Use integer for size of cpuset, as it won't be bigger than INT_MAX, This is requested by bge. Also move the sysctl into file kern_cpuset.c, because it should always be

svn commit: r214653 - head/lib/libthr/thread

2010-11-01 Thread David Xu
Author: davidxu Date: Tue Nov 2 02:13:13 2010 New Revision: 214653 URL: http://svn.freebsd.org/changeset/base/214653 Log: Use sysctl kern.sched.cpusetsize to retrieve size of kernel cpuset. Modified: head/lib/libthr/thread/thr_attr.c Modified: head/lib/libthr/thread/thr_attr.c =

svn commit: r227853 - stable/9/lib/libthr/thread

2011-11-22 Thread David Xu
Author: davidxu Date: Wed Nov 23 00:01:45 2011 New Revision: 227853 URL: http://svn.freebsd.org/changeset/base/227853 Log: MFC r227604: Pass CVWAIT flags to kernel, this should handle Timeout correctly for pthread_cond_timedwait when it uses kernel-based condition variable. Approved b

svn commit: r227877 - releng/9.0/lib/libthr/thread

2011-11-23 Thread David Xu
Author: davidxu Date: Wed Nov 23 11:59:01 2011 New Revision: 227877 URL: http://svn.freebsd.org/changeset/base/227877 Log: MFC r227604: Pass CVWAIT flags to kernel, this should handle Timeout correctly for pthread_cond_timedwait when it uses kernel-based condition variable. Approved b

svn commit: r215336 - head/sys/kern

2010-11-14 Thread David Xu
Author: davidxu Date: Mon Nov 15 07:33:54 2010 New Revision: 215336 URL: http://svn.freebsd.org/changeset/base/215336 Log: Only unlock process if a thread is found. Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ===

svn commit: r215652 - head/sys/kern

2010-11-21 Thread David Xu
Author: davidxu Date: Mon Nov 22 02:42:02 2010 New Revision: 215652 URL: http://svn.freebsd.org/changeset/base/215652 Log: Use atomic instruction to set _has_writer, otherwise there is a race causes userland to not wake up a thread sleeping in kernel. MFC after: 3 days Modified: head/s

svn commit: r216313 - in head/sys: kern sys

2010-12-08 Thread David Xu
Author: davidxu Date: Thu Dec 9 02:42:02 2010 New Revision: 216313 URL: http://svn.freebsd.org/changeset/base/216313 Log: MFp4: It is possible a lower priority thread lending priority to higher priority thread, in old code, it is ignored, however the lending should always be recorded, add

svn commit: r216314 - head/sys/kern

2010-12-08 Thread David Xu
Author: davidxu Date: Thu Dec 9 05:16:20 2010 New Revision: 216314 URL: http://svn.freebsd.org/changeset/base/216314 Log: MFp4: The unit number allocator reuses ID too fast, this may hide bugs in other code, add a ring buffer to delay freeing a thread ID. Modified: head/sys/kern/kern_thr

svn commit: r197476 - head/sys/kern

2009-09-24 Thread David Xu
Author: davidxu Date: Fri Sep 25 00:03:13 2009 New Revision: 197476 URL: http://svn.freebsd.org/changeset/base/197476 Log: In function do_rw_wrlock, when a writer got an error and before returning, check if there are readers blocked by us via URWLOCK_WRITE_WAITERS flag, and resume the reader

svn commit: r197477 - head/lib/libthr/thread

2009-09-24 Thread David Xu
Author: davidxu Date: Fri Sep 25 00:15:30 2009 New Revision: 197477 URL: http://svn.freebsd.org/changeset/base/197477 Log: don't report error if key was deleted. PR: threads/135462 Modified: head/lib/libthr/thread/thr_spec.c Modified: head/lib/libthr/thread/thr_spec.c

svn commit: r227604 - head/lib/libthr/thread

2011-11-16 Thread David Xu
Author: davidxu Date: Thu Nov 17 01:43:50 2011 New Revision: 227604 URL: http://svn.freebsd.org/changeset/base/227604 Log: Pass CVWAIT flags to kernel, this should handle timeout correctly for pthread_cond_timedwait when it uses kernel-based condition variable. PR: 162403 Submitted

svn commit: r216641 - in head: lib/libthr/thread sys/kern sys/sys

2010-12-21 Thread David Xu
Author: davidxu Date: Wed Dec 22 05:01:52 2010 New Revision: 216641 URL: http://svn.freebsd.org/changeset/base/216641 Log: MFp4: - Add flags CVWAIT_ABSTIME and CVWAIT_CLOCKID for umtx kernel based condition variable, this should eliminate an extra system call to get current time.

svn commit: r216642 - head/lib/libthr/thread

2010-12-21 Thread David Xu
== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libthr/thread/thr_sleepq.c Wed Dec 22 05:03:24 2010 (r216642) @@ -0,0 +1,175 @@ +/* + * Copyright (c) 2010 David Xu + * All rights reserved

svn commit: r216678 - head/sys/kern

2010-12-22 Thread David Xu
Author: davidxu Date: Thu Dec 23 03:12:03 2010 New Revision: 216678 URL: http://svn.freebsd.org/changeset/base/216678 Log: Enlarge hash table for new condition variable. Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ==

svn commit: r216687 - head/lib/libthr/thread

2010-12-23 Thread David Xu
Author: davidxu Date: Fri Dec 24 07:41:39 2010 New Revision: 216687 URL: http://svn.freebsd.org/changeset/base/216687 Log: Always clear flag PMUTEX_FLAG_DEFERED when unlocking, as it is only significant for lock owner. Modified: head/lib/libthr/thread/thr_mutex.c Modified: head/lib/libthr/

svn commit: r216791 - in head/sys: kern sys

2010-12-29 Thread David Xu
Author: davidxu Date: Wed Dec 29 09:26:46 2010 New Revision: 216791 URL: http://svn.freebsd.org/changeset/base/216791 Log: - Follow r216313, the sched_unlend_user_prio is no longer needed, always use sched_lend_user_prio to set lent priority. - Improve pthread priority-inherit mutex, when

svn commit: r216949 - head/lib/libthr/thread

2011-01-03 Thread David Xu
Author: davidxu Date: Tue Jan 4 05:35:19 2011 New Revision: 216949 URL: http://svn.freebsd.org/changeset/base/216949 Log: Because sleepqueue may still being used, we should always check wchan with queue locked. Modified: head/lib/libthr/thread/thr_cond.c Modified: head/lib/libthr/thread/t

svn commit: r217039 - head/include

2011-01-05 Thread David Xu
Author: davidxu Date: Thu Jan 6 03:30:16 2011 New Revision: 217039 URL: http://svn.freebsd.org/changeset/base/217039 Log: Remove leftover for r214093. Modified: head/include/pthread.h Modified: head/include/pthread.h ==

svn commit: r217047 - head/lib/libthr/thread

2011-01-06 Thread David Xu
Author: davidxu Date: Thu Jan 6 08:13:30 2011 New Revision: 217047 URL: http://svn.freebsd.org/changeset/base/217047 Log: Return 0 instead of garbage value. Found by: clang static analyzer Modified: head/lib/libthr/thread/thr_mutex.c Modified: head/lib/libthr/thread/thr_mutex.c ===

svn commit: r217253 - head/lib/libthr/thread

2011-01-10 Thread David Xu
Author: davidxu Date: Tue Jan 11 01:57:02 2011 New Revision: 217253 URL: http://svn.freebsd.org/changeset/base/217253 Log: Fix a typo. Submitted by: avg Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c

svn commit: r223037 - stable/8/sys/kern

2011-06-12 Thread David Xu
Author: davidxu Date: Mon Jun 13 06:32:56 2011 New Revision: 223037 URL: http://svn.freebsd.org/changeset/base/223037 Log: MFC r222802: Use p4prio_to_tsprio to calculate TS priority instead of using p4prio_to_rtpprio which is for RT priority. Modified: stable/8/sys/kern/ksched.c Directory

svn commit: r223136 - head/lib/libc/gen

2011-06-15 Thread David Xu
Author: davidxu Date: Thu Jun 16 02:22:24 2011 New Revision: 223136 URL: http://svn.freebsd.org/changeset/base/223136 Log: Use size of int to fetch sysctl kern.sched.cpusetsize because it had switched from long to int type in kernel. Fixed by: pluknet Modified: head/lib/libc/gen/syscon

svn commit: r222802 - head/sys/kern

2011-06-06 Thread David Xu
Author: davidxu Date: Tue Jun 7 02:50:14 2011 New Revision: 222802 URL: http://svn.freebsd.org/changeset/base/222802 Log: Use p4prio_to_tsprio to calculate TS priority instead of using p4prio_to_rtpprio which is for RT priority. PR: kern/157657 Submitted by: krivenok.dmitry at gmail

svn commit: r190585 - head/lib/libthr

2009-03-30 Thread David Xu
Author: davidxu Date: Tue Mar 31 02:50:18 2009 New Revision: 190585 URL: http://svn.freebsd.org/changeset/base/190585 Log: Turn on nodelete linker flag because libthr can not be unloaded safely, it does hook on to libc. Modified: head/lib/libthr/Makefile Modified: head/lib/libthr/Makefile

svn commit: r190987 - head/sys/kern

2009-04-12 Thread David Xu
Author: davidxu Date: Mon Apr 13 05:21:17 2009 New Revision: 190987 URL: http://svn.freebsd.org/changeset/base/190987 Log: Make UMTX_OP_WAIT_UINT actually wait for an unsigned integer on 64-bits machine. MFC after: 1 week Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/ker

  1   2   3   4   >