Deleted Added
full compact
sys_process.c (163676) sys_process.c (163709)
1/*-
2 * Copyright (c) 1994, Sean Eric Fagan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 */
31
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1994, Sean Eric Fagan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/kern/sys_process.c 163676 2006-10-25 06:18:04Z davidxu $");
33__FBSDID("$FreeBSD: head/sys/kern/sys_process.c 163709 2006-10-26 21:42:22Z jb $");
34
35#include "opt_compat.h"
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/lock.h>
40#include <sys/mutex.h>
41#include <sys/syscallsubr.h>

--- 755 unchanged lines hidden (view full) ---

797 td3->td_flags &= ~TDF_DBSUSPEND;
798 }
799 /*
800 * unsuspend all threads, to not let a thread run,
801 * you should use PT_SUSPEND to suspend it before
802 * continuing process.
803 */
804 mtx_unlock_spin(&sched_lock);
34
35#include "opt_compat.h"
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/lock.h>
40#include <sys/mutex.h>
41#include <sys/syscallsubr.h>

--- 755 unchanged lines hidden (view full) ---

797 td3->td_flags &= ~TDF_DBSUSPEND;
798 }
799 /*
800 * unsuspend all threads, to not let a thread run,
801 * you should use PT_SUSPEND to suspend it before
802 * continuing process.
803 */
804 mtx_unlock_spin(&sched_lock);
805#ifdef KSE
805 thread_continued(p);
806 thread_continued(p);
807#endif
806 p->p_flag &= ~(P_STOPPED_TRACE|P_STOPPED_SIG|P_WAITED);
807 mtx_lock_spin(&sched_lock);
808 thread_unsuspend(p);
809 mtx_unlock_spin(&sched_lock);
810 }
811
812 if (data)
813 psignal(p, data);

--- 121 unchanged lines hidden (view full) ---

935 break;
936 }
937 pl = addr;
938 pl->pl_lwpid = td2->td_tid;
939 if (td2->td_flags & TDF_XSIG)
940 pl->pl_event = PL_EVENT_SIGNAL;
941 else
942 pl->pl_event = 0;
808 p->p_flag &= ~(P_STOPPED_TRACE|P_STOPPED_SIG|P_WAITED);
809 mtx_lock_spin(&sched_lock);
810 thread_unsuspend(p);
811 mtx_unlock_spin(&sched_lock);
812 }
813
814 if (data)
815 psignal(p, data);

--- 121 unchanged lines hidden (view full) ---

937 break;
938 }
939 pl = addr;
940 pl->pl_lwpid = td2->td_tid;
941 if (td2->td_flags & TDF_XSIG)
942 pl->pl_event = PL_EVENT_SIGNAL;
943 else
944 pl->pl_event = 0;
945#ifdef KSE
943 if (td2->td_pflags & TDP_SA) {
944 pl->pl_flags = PL_FLAG_SA;
945 if (td2->td_upcall && !TD_CAN_UNBIND(td2))
946 pl->pl_flags |= PL_FLAG_BOUND;
947 } else {
948 pl->pl_flags = 0;
949 }
946 if (td2->td_pflags & TDP_SA) {
947 pl->pl_flags = PL_FLAG_SA;
948 if (td2->td_upcall && !TD_CAN_UNBIND(td2))
949 pl->pl_flags |= PL_FLAG_BOUND;
950 } else {
951 pl->pl_flags = 0;
952 }
953#else
954 pl->pl_flags = 0;
955#endif
950 pl->pl_sigmask = td2->td_sigmask;
951 pl->pl_siglist = td2->td_siglist;
952 break;
953
954 case PT_GETNUMLWPS:
955 td->td_retval[0] = p->p_numthreads;
956 break;
957

--- 69 unchanged lines hidden ---
956 pl->pl_sigmask = td2->td_sigmask;
957 pl->pl_siglist = td2->td_siglist;
958 break;
959
960 case PT_GETNUMLWPS:
961 td->td_retval[0] = p->p_numthreads;
962 break;
963

--- 69 unchanged lines hidden ---