cpufunc.h (1de995bb1f2e662f557b0e8448ff7f1d19a48e51) cpufunc.h (20233f27f47bc6545222bc06ad89735924aadb8f)
1/*-
2 * Copyright (c) 1993 The Regents of the University of California.
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 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
1/*-
2 * Copyright (c) 1993 The Regents of the University of California.
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 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * $Id: cpufunc.h,v 1.2 1997/09/01 07:37:58 smp Exp smp $
33 * $Id: cpufunc.h,v 1.3 1997/09/05 20:20:31 smp Exp smp $
34 */
35
36/*
37 * Functions to provide access to special i386 instructions.
38 */
39
40#ifndef _MACHINE_CPUFUNC_H_
41#define _MACHINE_CPUFUNC_H_

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

53{
54 __asm __volatile("int $3");
55}
56
57static __inline void
58disable_intr(void)
59{
60 __asm __volatile("cli" : : : "memory");
34 */
35
36/*
37 * Functions to provide access to special i386 instructions.
38 */
39
40#ifndef _MACHINE_CPUFUNC_H_
41#define _MACHINE_CPUFUNC_H_

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

53{
54 __asm __volatile("int $3");
55}
56
57static __inline void
58disable_intr(void)
59{
60 __asm __volatile("cli" : : : "memory");
61#ifdef SMP
62 s_lock(&mpintr_lock);
63#endif
61 MPINTR_LOCK();
64}
65
66static __inline void
67enable_intr(void)
68{
62}
63
64static __inline void
65enable_intr(void)
66{
69#ifdef SMP
70 s_unlock(&mpintr_lock);
71#endif
67 MPINTR_UNLOCK();
72 __asm __volatile("sti");
73}
74
75#define HAVE_INLINE_FFS
76
77static __inline int
78ffs(int mask)
79{

--- 355 unchanged lines hidden ---
68 __asm __volatile("sti");
69}
70
71#define HAVE_INLINE_FFS
72
73static __inline int
74ffs(int mask)
75{

--- 355 unchanged lines hidden ---