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/sys/mplock2.h

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  * SYS/MPLOCK2.H
    3  *
    4  * Implement the MP lock.  Note that debug operations
    5  */
    6 #ifndef _SYS_MPLOCK2_H_
    7 #define _SYS_MPLOCK2_H_
    8 
    9 #include <machine/atomic.h>
   10 #ifndef _SYS_THREAD_H_
   11 #include <sys/thread.h>
   12 #endif
   13 #ifndef _SYS_GLOBALDATA_H_
   14 #include <sys/globaldata.h>
   15 #endif
   16 
   17 /*
   18  * NOTE: try_mplock()/lwkt_trytoken() return non-zero on success.
   19  */
   20 #define get_mplock()            lwkt_gettoken(&mp_token)
   21 #define try_mplock()            lwkt_trytoken(&mp_token)
   22 #define rel_mplock()            lwkt_reltoken(&mp_token)
   23 #define get_mplock_count(td)    lwkt_cnttoken(&mp_token, td)
   24 
   25 void cpu_get_initial_mplock(void);
   26 
   27 #define MP_LOCK_HELD()          LWKT_TOKEN_HELD_EXCL(&mp_token)
   28 #define ASSERT_MP_LOCK_HELD()   ASSERT_LWKT_TOKEN_HELD_EXCL(&mp_token)
   29 
   30 #endif

Cache object: 9e19cdd6997528f26bb731f45df2f183


[ 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.