Deleted Added
full compact
cpufunc.h (92870) cpufunc.h (93264)
1/*-
2 * Copyright (c) 1998 Doug Rabson
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1998 Doug Rabson
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/ia64/include/cpufunc.h 92870 2002-03-21 09:50:11Z dfr $
26 * $FreeBSD: head/sys/ia64/include/cpufunc.h 93264 2002-03-27 05:39:23Z dillon $
27 */
28
29#ifndef _MACHINE_CPUFUNC_H_
30#define _MACHINE_CPUFUNC_H_
31
32#ifdef _KERNEL
33
34#include <sys/types.h>
35#include <machine/ia64_cpu.h>
36
27 */
28
29#ifndef _MACHINE_CPUFUNC_H_
30#define _MACHINE_CPUFUNC_H_
31
32#ifdef _KERNEL
33
34#include <sys/types.h>
35#include <machine/ia64_cpu.h>
36
37#define CRITICAL_FORK (ia64_get_psr() | IA64_PSR_I)
37struct thread;
38
39#ifdef __GNUC__
40
41static __inline void
42breakpoint(void)
43{
44 __asm __volatile("break 0x80100"); /* XXX use linux value */
45}

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

295}
296
297static __inline void
298intr_restore(critical_t psr)
299{
300 __asm __volatile ("mov psr.l=%0;; srlz.d" :: "r" (psr));
301}
302
38
39#ifdef __GNUC__
40
41static __inline void
42breakpoint(void)
43{
44 __asm __volatile("break 0x80100"); /* XXX use linux value */
45}

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

295}
296
297static __inline void
298intr_restore(critical_t psr)
299{
300 __asm __volatile ("mov psr.l=%0;; srlz.d" :: "r" (psr));
301}
302
303static __inline critical_t
304cpu_critical_enter(void)
305{
306 return (intr_disable());
307}
303void cpu_critical_enter(void);
304void cpu_critical_exit(void);
305void cpu_critical_fork_exit(void);
306void cpu_thread_link(struct thread *td);
308
307
309static __inline void
310cpu_critical_exit(critical_t psr)
311{
312 intr_restore(psr);
313}
314
315#endif /* _KERNEL */
316
317#endif /* !_MACHINE_CPUFUNC_H_ */
308#endif /* _KERNEL */
309
310#endif /* !_MACHINE_CPUFUNC_H_ */