svn commit: r230194 - head/sys/kern

2012-01-15 Thread David Xu
Author: davidxu Date: Mon Jan 16 04:39:10 2012 New Revision: 230194 URL: http://svn.freebsd.org/changeset/base/230194 Log: Eliminate branch and insert an explicit reader memory barrier to ensure that waiter bit is set before reading semaphore count. Modified: head/sys/kern/kern_umtx.c Modi

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

2012-01-15 Thread David Xu
Author: davidxu Date: Mon Jan 16 06:15:14 2012 New Revision: 230201 URL: http://svn.freebsd.org/changeset/base/230201 Log: Insert read memory barriers. Modified: head/lib/libc/gen/sem.c head/lib/libc/gen/sem_new.c Modified: head/lib/libc/gen/sem.c ==

Re: svn commit: r230201 - head/lib/libc/gen

2012-01-15 Thread David Xu
On 2012/1/16 15:39, Lawrence Stewart wrote: On 01/16/12 17:15, David Xu wrote: Author: davidxu Date: Mon Jan 16 06:15:14 2012 New Revision: 230201 URL: http://svn.freebsd.org/changeset/base/230201 Log: Insert read memory barriers. Modified: head/lib/libc/gen/sem.c head/lib/libc/gen

Re: svn commit: r230201 - head/lib/libc/gen

2012-01-17 Thread David Xu
On 2012/1/17 22:57, John Baldwin wrote: On Monday, January 16, 2012 1:15:14 am David Xu wrote: Author: davidxu Date: Mon Jan 16 06:15:14 2012 New Revision: 230201 URL: http://svn.freebsd.org/changeset/base/230201 Log: Insert read memory barriers. I think using atomic_load_acq() on sem

Re: svn commit: r230201 - head/lib/libc/gen

2012-01-18 Thread David Xu
On 2012/1/18 23:09, John Baldwin wrote: On Tuesday, January 17, 2012 9:09:25 pm David Xu wrote: On 2012/1/17 22:57, John Baldwin wrote: On Monday, January 16, 2012 1:15:14 am David Xu wrote: Author: davidxu Date: Mon Jan 16 06:15:14 2012 New Revision: 230201 URL: http://svn.freebsd.org

Re: svn commit: r230201 - head/lib/libc/gen

2012-01-18 Thread David Xu
On 2012/1/19 11:24, David Xu wrote: On 2012/1/18 23:09, John Baldwin wrote: On Tuesday, January 17, 2012 9:09:25 pm David Xu wrote: On 2012/1/17 22:57, John Baldwin wrote: On Monday, January 16, 2012 1:15:14 am David Xu wrote: Author: davidxu Date: Mon Jan 16 06:15:14 2012 New Revision

Re: svn commit: r230201 - head/lib/libc/gen

2012-01-19 Thread David Xu
On 2012/1/19 23:23, John Baldwin wrote: On Thursday, January 19, 2012 12:57:50 am David Xu wrote: rdtsc() may not work on SMP, so I have updated it to use clock_gettime to get total time. http://people.freebsd.org/~davidxu/bench/semaphore2/ <http://people.freebsd.org/%7Edavidxu/bench/semapho

Re: svn commit: r230201 - head/lib/libc/gen

2012-01-19 Thread David Xu
On 2012/1/20 0:55, Bruce Evans wrote: On Thu, 19 Jan 2012, John Baldwin wrote: On Thursday, January 19, 2012 12:57:50 am David Xu wrote: rdtsc() may not work on SMP, so I have updated it to use clock_gettime to get total time. http://people.freebsd.org/~davidxu/bench/semaphore2/ <h

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: 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: r210274 - head/sys/kern

2010-07-19 Thread David Xu
Author: davidxu Date: Tue Jul 20 02:23:12 2010 New Revision: 210274 URL: http://svn.freebsd.org/changeset/base/210274 Log: Fix function name in error messages. Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ==

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

2010-08-16 Thread David Xu
Author: davidxu Date: Tue Aug 17 02:50:12 2010 New Revision: 211409 URL: http://svn.freebsd.org/changeset/base/211409 Log: Tweak code a bit to be POSIX compatible, when a cancellation request is acted upon, or when a thread calls pthread_exit(), the thread first disables cancellation by sett

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

2010-08-19 Thread David Xu
Author: davidxu Date: Fri Aug 20 04:15:05 2010 New Revision: 211522 URL: http://svn.freebsd.org/changeset/base/211522 Log: According to specification, function fcntl() is a cancellation point only when cmd argument is F_SETLKW. Modified: head/lib/libthr/thread/thr_syscalls.c Modified: head

svn commit: r211523 - head/sys/kern

2010-08-19 Thread David Xu
Author: davidxu Date: Fri Aug 20 04:28:30 2010 New Revision: 211523 URL: http://svn.freebsd.org/changeset/base/211523 Log: If thread set a TDP_WAKEUP for itself, clears the flag and returns EINTR immediately, this is used for implementing reliable pthread cancellation. Modified: head/sys/ke

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

2010-08-19 Thread David Xu
Author: davidxu Date: Fri Aug 20 05:15:39 2010 New Revision: 211524 URL: http://svn.freebsd.org/changeset/base/211524 Log: In current implementation, thread cancellation is done in signal handler, which does not know what is the state of interrupted system call, for example, open() system

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

2010-08-20 Thread David Xu
Author: davidxu Date: Fri Aug 20 13:42:48 2010 New Revision: 211526 URL: http://svn.freebsd.org/changeset/base/211526 Log: Reduce redundant code. Submitted by: kib Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c =

svn commit: r211534 - head/sys/kern

2010-08-20 Thread David Xu
Author: davidxu Date: Fri Aug 20 23:51:34 2010 New Revision: 211534 URL: http://svn.freebsd.org/changeset/base/211534 Log: make sure thread lock is locked. Modified: head/sys/kern/subr_sleepqueue.c Modified: head/sys/kern/subr_sleepqueue.c

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

2010-08-24 Thread David Xu
Author: davidxu Date: Tue Aug 24 07:22:24 2010 New Revision: 211732 URL: http://svn.freebsd.org/changeset/base/211732 Log: - According to specification, SI_USER code should only be generated by standard kill(). On other systems, SI_LWP is generated by lwp_kill(). This will allow conformi

svn commit: r211733 - head/sys/kern

2010-08-24 Thread David Xu
Author: davidxu Date: Tue Aug 24 07:29:55 2010 New Revision: 211733 URL: http://svn.freebsd.org/changeset/base/211733 Log: Optimize thr_suspend, if timeout is zero, don't call msleep, just return immediately. Modified: head/sys/kern/kern_thr.c Modified: head/sys/kern/kern_thr.c ===

svn commit: r211735 - head/sys/sys

2010-08-24 Thread David Xu
Author: davidxu Date: Tue Aug 24 08:09:30 2010 New Revision: 211735 URL: http://svn.freebsd.org/changeset/base/211735 Log: Bump __FreeBSD_version for revision 211732. Noticed by: thompa Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ===

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

2010-08-24 Thread David Xu
Author: davidxu Date: Tue Aug 24 09:57:06 2010 New Revision: 211737 URL: http://svn.freebsd.org/changeset/base/211737 Log: Add wrapper for setcontext() and swapcontext(), the wrappers unblock SIGCANCEL which is needed by thread cancellation. Modified: head/lib/libthr/pthread.map head/lib/

svn commit: r211794 - head/sys/kern

2010-08-24 Thread David Xu
Author: davidxu Date: Wed Aug 25 03:14:32 2010 New Revision: 211794 URL: http://svn.freebsd.org/changeset/base/211794 Log: If a thread is removed from umtxq while sleeping, reset error code to zero, this gives userland a better indication that a thread needn't to be cancelled. Modified: h

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

2010-08-26 Thread David Xu
Author: davidxu Date: Thu Aug 26 07:09:48 2010 New Revision: 211833 URL: http://svn.freebsd.org/changeset/base/211833 Log: Decrease rdlock count only when thread unlocked a reader lock. MFC after:3 days Modified: head/lib/libthr/thread/thr_rtld.c Modified: head/lib/libthr/thread/thr

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

2010-08-26 Thread David Xu
Author: davidxu Date: Thu Aug 26 09:04:27 2010 New Revision: 211836 URL: http://svn.freebsd.org/changeset/base/211836 Log: eliminate unused code. 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: r211859 - head/lib/libthr/thread

2010-08-26 Thread David Xu
Author: davidxu Date: Fri Aug 27 03:23:07 2010 New Revision: 211859 URL: http://svn.freebsd.org/changeset/base/211859 Log: clear lock to zero state if it is destroyed. Modified: head/lib/libthr/thread/thr_rtld.c Modified: head/lib/libthr/thread/thr_rtld.c

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

2010-08-26 Thread David Xu
Author: davidxu Date: Fri Aug 27 05:20:22 2010 New Revision: 211860 URL: http://svn.freebsd.org/changeset/base/211860 Log: Unregister thread specific data destructor when a corresponding dso is unloaded. Modified: head/lib/libthr/thread/thr_fork.c head/lib/libthr/thread/thr_private.h he

Re: svn commit: r211982 - head/sbin/hastd

2010-08-30 Thread David Xu
condition. I have not read the code, maybe this is not a problem. Regards, David Xu ___ 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"

svn commit: r212047 - head/sys/kern

2010-08-31 Thread David Xu
Author: davidxu Date: Tue Aug 31 07:15:50 2010 New Revision: 212047 URL: http://svn.freebsd.org/changeset/base/212047 Log: If a process is being debugged, skips job control caused by SIGSTOP/SIGCONT signals, because it is managed by debugger, however a normal signal sent to a interruptibly s

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

2010-08-31 Thread David Xu
Jilles Tjoelker wrote: On Tue, Aug 31, 2010 at 07:15:50AM +, David Xu wrote: Author: davidxu Date: Tue Aug 31 07:15:50 2010 New Revision: 212047 URL: http://svn.freebsd.org/changeset/base/212047 Log: If a process is being debugged, skips job control caused by SIGSTOP/SIGCONT signals

svn commit: r212075 - head/sys/kern

2010-08-31 Thread David Xu
Author: davidxu Date: Wed Sep 1 01:26:07 2010 New Revision: 212075 URL: http://svn.freebsd.org/changeset/base/212075 Log: rescure comments from RELENG_4. Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ===

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

2010-08-31 Thread David Xu
Author: davidxu Date: Wed Sep 1 02:18:33 2010 New Revision: 212076 URL: http://svn.freebsd.org/changeset/base/212076 Log: Add signal handler wrapper, the reason to add it becauses there are some cases we want to improve: 1) if a thread signal got a signal while in cancellation point,

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

2010-08-31 Thread David Xu
Author: davidxu Date: Wed Sep 1 03:11:21 2010 New Revision: 212077 URL: http://svn.freebsd.org/changeset/base/212077 Log: Change atfork lock from mutex to rwlock, also make mutexes used by malloc() module private type, when private type mutex is locked/unlocked, thread critical region is en

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

2010-08-31 Thread David Xu
Author: davidxu Date: Wed Sep 1 03:55:10 2010 New Revision: 212078 URL: http://svn.freebsd.org/changeset/base/212078 Log: pthread_atfork should acquire writer lock and protect the code with critical region. Modified: head/lib/libthr/thread/thr_fork.c Modified: head/lib/libthr/thread/thr_f

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

2010-09-01 Thread David Xu
Author: davidxu Date: Wed Sep 1 07:09:46 2010 New Revision: 212083 URL: http://svn.freebsd.org/changeset/base/212083 Log: In function __pthread_cxa_finalize(), also make code for removing atfork handler be async-signal safe. Modified: head/lib/libthr/thread/thr_fork.c Modified: head/lib/l

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

2010-09-01 Thread David Xu
Author: davidxu Date: Wed Sep 1 13:22:55 2010 New Revision: 212095 URL: http://svn.freebsd.org/changeset/base/212095 Log: Remove incorrect comments, also make sure signal is disabled when unregistering sigaction. Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/

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

2010-09-02 Thread David Xu
Kostik Belousov wrote: On Wed, Sep 01, 2010 at 02:18:33AM +, David Xu wrote: Author: davidxu Date: Wed Sep 1 02:18:33 2010 New Revision: 212076 URL: http://svn.freebsd.org/changeset/base/212076 Log: Add signal handler wrapper, the reason to add it becauses there are some cases we want

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

2010-09-02 Thread David Xu
Kostik Belousov wrote: the tf_err may not be equal to ksi_addr! This may need to be fixed. The change was introduced by r151316 | davidxu | 2005-10-14 /* Old FreeBSD-style arguments. */ - sf.sf_siginfo = code; - sf.sf_addr = regs->tf_err; + sf.sf_siginfo = ksi->ksi_code; +

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

2010-09-02 Thread David Xu
Kostik Belousov wrote: On Thu, Sep 02, 2010 at 04:34:58PM +, David Xu wrote: Kostik Belousov wrote: On Wed, Sep 01, 2010 at 02:18:33AM +, David Xu wrote: Author: davidxu Date: Wed Sep 1 02:18:33 2010 New Revision: 212076 URL: http://svn.freebsd.org/changeset/base/212076 Log: Add

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

2010-09-02 Thread David Xu
John Baldwin wrote: On Thursday, September 02, 2010 6:22:18 am Kostik Belousov wrote: On Thu, Sep 02, 2010 at 05:35:39PM +, David Xu wrote: Kostik Belousov wrote: the tf_err may not be equal to ksi_addr! This may need to be fixed. The change was introduced by

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

2010-09-02 Thread David Xu
John Baldwin wrote: On Thursday, September 02, 2010 7:36:08 am David Xu wrote: John Baldwin wrote: On Thursday, September 02, 2010 6:22:18 am Kostik Belousov wrote: On Thu, Sep 02, 2010 at 05:35:39PM +, David Xu wrote: Kostik Belousov wrote

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

2010-09-05 Thread David Xu
Author: davidxu Date: Mon Sep 6 03:00:54 2010 New Revision: 212245 URL: http://svn.freebsd.org/changeset/base/212245 Log: Fix off-by-one error in function _thr_sigact_unload, also disable the function, it seems some gnome application tends to crash if we unregister sigaction automatically.

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

2010-09-07 Thread David Xu
Author: davidxu Date: Wed Sep 8 02:18:20 2010 New Revision: 212312 URL: http://svn.freebsd.org/changeset/base/212312 Log: To avoid possible race condition, SIGCANCEL is always sent except the thread is dead. Modified: head/lib/libthr/thread/thr_cancel.c Modified: head/lib/libthr/thread/th

svn commit: r212405 - in head/lib: libc/stdlib libc/sys libthr/thread

2010-09-09 Thread David Xu
Author: davidxu Date: Fri Sep 10 01:47:37 2010 New Revision: 212405 URL: http://svn.freebsd.org/changeset/base/212405 Log: Because POSIX does not allow EINTR to be returned from sigwait(), add a wrapper for it in libc and rework the code in libthr, the system call still can return EINTR, we

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

2010-09-11 Thread David Xu
Author: davidxu Date: Sat Sep 11 08:15:18 2010 New Revision: 212458 URL: http://svn.freebsd.org/changeset/base/212458 Log: kill() does queue signal now. Modified: head/share/man/man3/siginfo.3 Modified: head/share/man/man3/siginfo.3 ===

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

2010-09-11 Thread David Xu
Author: davidxu Date: Sat Sep 11 09:26:36 2010 New Revision: 212459 URL: http://svn.freebsd.org/changeset/base/212459 Log: Make a link for pthread_timedjoin_np. Modified: head/share/man/man3/Makefile Modified: head/share/man/man3/Makefile =

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

2010-09-13 Thread David Xu
Author: davidxu Date: Mon Sep 13 07:03:01 2010 New Revision: 212536 URL: http://svn.freebsd.org/changeset/base/212536 Log: Convert thread list lock from mutex to rwlock. Modified: head/lib/libthr/thread/thr_affinity.c head/lib/libthr/thread/thr_attr.c head/lib/libthr/thread/thr_cancel.c

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: 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/

  1   2   3   >