counter.h (95ee2897e98f5d444f26ed2334cc7c439f9c16c6) | counter.h (d14c38ceb8aa10bd94913d0456ec0f726693379b) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2012, 2013 Konstantin Belousov <kib@FreeBSD.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 86 unchanged lines hidden (view full) --- 95 "bne- 1b" 96 : "=&b" (ccpu), "=&r" (old) 97 : "r" ((char *)c - (char *)&__pcpu[0]), "r" (inc) 98 : "cr0", "memory"); 99} 100 101#else /* !64bit */ 102 | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2012, 2013 Konstantin Belousov <kib@FreeBSD.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 86 unchanged lines hidden (view full) --- 95 "bne- 1b" 96 : "=&b" (ccpu), "=&r" (old) 97 : "r" ((char *)c - (char *)&__pcpu[0]), "r" (inc) 98 : "cr0", "memory"); 99} 100 101#else /* !64bit */ 102 |
103#include <sys/systm.h> 104 |
|
103#define counter_enter() critical_enter() 104#define counter_exit() critical_exit() 105 106#ifdef IN_SUBR_COUNTER_C 107/* XXXKIB non-atomic 64bit read */ 108static inline uint64_t 109counter_u64_read_one(uint64_t *p, int cpu) 110{ --- 52 unchanged lines hidden --- | 105#define counter_enter() critical_enter() 106#define counter_exit() critical_exit() 107 108#ifdef IN_SUBR_COUNTER_C 109/* XXXKIB non-atomic 64bit read */ 110static inline uint64_t 111counter_u64_read_one(uint64_t *p, int cpu) 112{ --- 52 unchanged lines hidden --- |