The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/powerpc/powerpc/critical.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 2001 Matthew Dillon.  This code is distributed under
    3  * the BSD copyright, /usr/src/COPYRIGHT.
    4  *
    5  * $FreeBSD: releng/5.0/sys/powerpc/powerpc/critical.c 93607 2002-04-01 23:51:23Z dillon $
    6  */
    7 
    8 #include <sys/param.h>
    9 #include <sys/systm.h>
   10 #include <sys/pcpu.h>
   11 #include <sys/eventhandler.h>   /* XX */
   12 #include <sys/ktr.h>            /* XX */
   13 #include <sys/signalvar.h>
   14 #include <sys/sysproto.h>       /* XX */
   15 #include <sys/kernel.h>
   16 #include <sys/proc.h>
   17 #include <sys/lock.h>
   18 #include <sys/mutex.h>
   19 #include <sys/sysctl.h>
   20 #include <sys/ucontext.h>
   21 
   22 /*
   23  * cpu_critical_fork_exit() - cleanup after fork
   24  */
   25 void
   26 cpu_critical_fork_exit(void)
   27 {
   28         struct thread *td = curthread;
   29 
   30         td->td_critnest = 1;
   31         td->td_md.md_savecrit = (mfmsr() | PSL_EE | PSL_RI);
   32 }
   33 
   34 /*
   35  * cpu_thread_link() - thread linkup, initialize machine-dependant fields
   36  */
   37 void
   38 cpu_thread_link(struct thread *td)
   39 {
   40         td->td_md.md_savecrit = 0;
   41 }
   42 

Cache object: 9450e6ff54bd0d7ab511e0f9d0acf3a7


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.