utopia.c (147526) | utopia.c (172836) |
---|---|
1/*- 2 * Copyright (c) 2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Author: Hartmut Brandt <harti@freebsd.org> 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Author: Hartmut Brandt <harti@freebsd.org> 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/dev/utopia/utopia.c 147526 2005-06-22 06:51:52Z harti $"); | 31__FBSDID("$FreeBSD: head/sys/dev/utopia/utopia.c 172836 2007-10-20 23:23:23Z julian $"); |
32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/unistd.h> 36#include <sys/kernel.h> 37#include <sys/kthread.h> 38#include <sys/proc.h> 39#include <sys/bus.h> --- 578 unchanged lines hidden (view full) --- 618 utp = next; 619 } 620 621 UTP_RLOCK_LIST(); 622 msleep(&utopia_list, &utopia_list_mtx, PZERO, "*idle*", hz); 623 } 624 wakeup_one(&utopia_list); 625 UTP_RUNLOCK_LIST(); | 32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/unistd.h> 36#include <sys/kernel.h> 37#include <sys/kthread.h> 38#include <sys/proc.h> 39#include <sys/bus.h> --- 578 unchanged lines hidden (view full) --- 618 utp = next; 619 } 620 621 UTP_RLOCK_LIST(); 622 msleep(&utopia_list, &utopia_list_mtx, PZERO, "*idle*", hz); 623 } 624 wakeup_one(&utopia_list); 625 UTP_RUNLOCK_LIST(); |
626 kthread_exit(0); | 626 kproc_exit(0); |
627} 628 629/* 630 * Module initialisation 631 */ 632static int 633utopia_mod_init(module_t mod, int what, void *arg) 634{ 635 int err; 636 struct proc *kp; 637 638 switch (what) { 639 640 case MOD_LOAD: 641 mtx_init(&utopia_list_mtx, "utopia list mutex", NULL, MTX_DEF); | 627} 628 629/* 630 * Module initialisation 631 */ 632static int 633utopia_mod_init(module_t mod, int what, void *arg) 634{ 635 int err; 636 struct proc *kp; 637 638 switch (what) { 639 640 case MOD_LOAD: 641 mtx_init(&utopia_list_mtx, "utopia list mutex", NULL, MTX_DEF); |
642 err = kthread_create(utopia_daemon, NULL, &utopia_kproc, | 642 err = kproc_create(utopia_daemon, NULL, &utopia_kproc, |
643 RFHIGHPID, 0, "utopia"); 644 if (err != 0) { 645 printf("cannot created utopia thread %d\n", err); 646 return (err); 647 } 648 break; 649 650 case MOD_UNLOAD: --- 26 unchanged lines hidden --- | 643 RFHIGHPID, 0, "utopia"); 644 if (err != 0) { 645 printf("cannot created utopia thread %d\n", err); 646 return (err); 647 } 648 break; 649 650 case MOD_UNLOAD: --- 26 unchanged lines hidden --- |