counter.h (485ac45a536e186a26411277af1fe98ef0d17c2b) | counter.h (181ca73b1a0e52d8bda05485ccd50bd20aa44d79) |
---|---|
1/*- 2 * Copyright (c) 2012, 2013 Konstantin Belousov <kib@FreeBSD.org> 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 --- 81 unchanged lines hidden (view full) --- 90 "1:\n\t" 91 "mfsprg %0, 0\n\t" 92 "ldarx %1, %0, %2\n\t" 93 "add %1, %1, %3\n\t" 94 "stdcx. %1, %0, %2\n\t" 95 "bne- 1b" 96 : "=&b" (ccpu), "=&r" (old) 97 : "r" ((char *)c - (char *)&__pcpu[0]), "r" (inc) | 1/*- 2 * Copyright (c) 2012, 2013 Konstantin Belousov <kib@FreeBSD.org> 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 --- 81 unchanged lines hidden (view full) --- 90 "1:\n\t" 91 "mfsprg %0, 0\n\t" 92 "ldarx %1, %0, %2\n\t" 93 "add %1, %1, %3\n\t" 94 "stdcx. %1, %0, %2\n\t" 95 "bne- 1b" 96 : "=&b" (ccpu), "=&r" (old) 97 : "r" ((char *)c - (char *)&__pcpu[0]), "r" (inc) |
98 : "cc", "memory"); | 98 : "cr0", "memory"); |
99} 100 101#else /* !64bit */ 102 103#define counter_enter() critical_enter() 104#define counter_exit() critical_exit() 105 106#ifdef IN_SUBR_COUNTER_C --- 56 unchanged lines hidden --- | 99} 100 101#else /* !64bit */ 102 103#define counter_enter() critical_enter() 104#define counter_exit() critical_exit() 105 106#ifdef IN_SUBR_COUNTER_C --- 56 unchanged lines hidden --- |