pcpu.h (167429) | pcpu.h (170291) |
---|---|
1/*- 2 * Copyright (c) 1999 Luoqi Chen <luoqi@freebsd.org> 3 * Copyright (c) Peter Wemm <peter@netplex.com.au> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 1/*- 2 * Copyright (c) 1999 Luoqi Chen <luoqi@freebsd.org> 3 * Copyright (c) Peter Wemm <peter@netplex.com.au> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/sys/powerpc/include/pcpu.h 167429 2007-03-11 05:54:29Z alc $ | 27 * $FreeBSD: head/sys/powerpc/include/pcpu.h 170291 2007-06-04 21:38:48Z attilio $ |
28 */ 29 30#ifndef _MACHINE_PCPU_H_ 31#define _MACHINE_PCPU_H_ 32 33#ifdef _KERNEL 34#include <machine/cpufunc.h> 35 --- 21 unchanged lines hidden (view full) --- 57#define PCPUP ((struct pcpu *) powerpc_get_pcpup()) 58 59#define PCPU_GET(member) (PCPUP->pc_ ## member) 60 61/* 62 * XXX The implementation of this operation should be made atomic 63 * with respect to preemption. 64 */ | 28 */ 29 30#ifndef _MACHINE_PCPU_H_ 31#define _MACHINE_PCPU_H_ 32 33#ifdef _KERNEL 34#include <machine/cpufunc.h> 35 --- 21 unchanged lines hidden (view full) --- 57#define PCPUP ((struct pcpu *) powerpc_get_pcpup()) 58 59#define PCPU_GET(member) (PCPUP->pc_ ## member) 60 61/* 62 * XXX The implementation of this operation should be made atomic 63 * with respect to preemption. 64 */ |
65#define PCPU_LAZY_INC(member) (++PCPUP->pc_ ## member) | 65#define PCPU_ADD(member, value) (PCPUP->pc_ ## member += (value)) 66#define PCPU_INC(member) PCPU_ADD(member, 1) |
66#define PCPU_PTR(member) (&PCPUP->pc_ ## member) 67#define PCPU_SET(member,value) (PCPUP->pc_ ## member = (value)) 68 69#endif /* _KERNEL */ 70 71#endif /* !_MACHINE_PCPU_H_ */ | 67#define PCPU_PTR(member) (&PCPUP->pc_ ## member) 68#define PCPU_SET(member,value) (PCPUP->pc_ ## member = (value)) 69 70#endif /* _KERNEL */ 71 72#endif /* !_MACHINE_PCPU_H_ */ |