From owner-p4-projects@FreeBSD.ORG Tue Aug 15 15:06:30 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0720316A4E0; Tue, 15 Aug 2006 15:06:30 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D922A16A4DF for ; Tue, 15 Aug 2006 15:06:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBC5643D7C for ; Tue, 15 Aug 2006 15:05:52 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k7FF5iog000476 for ; Tue, 15 Aug 2006 15:05:44 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7FF5iUx000456 for perforce@freebsd.org; Tue, 15 Aug 2006 15:05:44 GMT (envelope-from jhb@freebsd.org) Date: Tue, 15 Aug 2006 15:05:44 GMT Message-Id: <200608151505.k7FF5iUx000456@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 104040 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 15:06:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=104040 Change 104040 by jhb@jhb_mutex on 2006/08/15 15:04:53 IFC @104038. Affected files ... .. //depot/projects/smpng/sys/amd64/linux32/linux32_sysvec.c#19 integrate Differences ... ==== //depot/projects/smpng/sys/amd64/linux32/linux32_sysvec.c#19 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.20 2006/08/15 12:54:29 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.21 2006/08/15 14:58:15 netchild Exp $"); #include "opt_compat.h" #ifndef COMPAT_IA32 @@ -58,6 +58,7 @@ #include #include #include +#include #include #include @@ -74,6 +75,7 @@ #include #include +#include #include #include #include @@ -119,6 +121,15 @@ u_long stack, u_long ps_strings); static void linux32_fixlimits(struct proc *p); +extern LIST_HEAD(futex_list, futex) futex_list; +extern struct mtx futex_mtx; +extern struct sx emul_shared_lock; +extern struct sx emul_lock; + +static eventhandler_tag linux_exit_tag; +static eventhandler_tag linux_schedtail_tag; +static eventhandler_tag linux_exec_tag; + /* * Linux syscalls return negative errno's, we do positive and map them * Reference: @@ -1066,6 +1077,15 @@ linux_ioctl_register_handler(*lihp); SET_FOREACH(ldhp, linux_device_handler_set) linux_device_register_handler(*ldhp); + sx_init(&emul_shared_lock, "emuldata->shared lock"); + LIST_INIT(&futex_list); + mtx_init(&futex_mtx, "futex protection lock", NULL, MTX_DEF); + linux_exit_tag = EVENTHANDLER_REGISTER(process_exit, linux_proc_exit, + NULL, 1000); + linux_schedtail_tag = EVENTHANDLER_REGISTER(schedtail, linux_schedtail, + NULL, 1000); + linux_exec_tag = EVENTHANDLER_REGISTER(process_exec, linux_proc_exec, + NULL, 1000); if (bootverbose) printf("Linux ELF exec handler installed\n"); } else @@ -1087,6 +1107,12 @@ linux_ioctl_unregister_handler(*lihp); SET_FOREACH(ldhp, linux_device_handler_set) linux_device_unregister_handler(*ldhp); + sx_destroy(&emul_lock); + sx_destroy(&emul_shared_lock); + mtx_destroy(&futex_mtx); + EVENTHANDLER_DEREGISTER(process_exit, linux_exit_tag); + EVENTHANDLER_DEREGISTER(schedtail, linux_schedtail_tag); + EVENTHANDLER_DEREGISTER(process_exec, linux_exec_tag); if (bootverbose) printf("Linux ELF exec handler removed\n"); } else