Print this page
5042 stop using deprecated atomic functions

*** 24,35 **** */ #ifndef _VM_HAT_PTE_H #define _VM_HAT_PTE_H - #pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif #include <sys/types.h> --- 24,33 ----
*** 233,243 **** /* * The concept of a VA hole exists in AMD64. This might need to be made * model specific eventually. * ! * In the 64 bit kernel PTE loads are atomic, but need cas64 on 32 bit kernel. */ #if defined(__amd64) #ifdef lint #define IN_VA_HOLE(va) (__lintzero) --- 231,242 ---- /* * The concept of a VA hole exists in AMD64. This might need to be made * model specific eventually. * ! * In the 64 bit kernel PTE loads are atomic, but need atomic_cas_64 on 32 ! * bit kernel. */ #if defined(__amd64) #ifdef lint #define IN_VA_HOLE(va) (__lintzero)
*** 246,256 **** #endif #define FMT_PTE "0x%lx" #define GET_PTE(ptr) (*(x86pte_t *)(ptr)) #define SET_PTE(ptr, pte) (*(x86pte_t *)(ptr) = pte) ! #define CAS_PTE(ptr, x, y) cas64(ptr, x, y) #elif defined(__i386) #define IN_VA_HOLE(va) (__lintzero) --- 245,255 ---- #endif #define FMT_PTE "0x%lx" #define GET_PTE(ptr) (*(x86pte_t *)(ptr)) #define SET_PTE(ptr, pte) (*(x86pte_t *)(ptr) = pte) ! #define CAS_PTE(ptr, x, y) atomic_cas_64(ptr, x, y) #elif defined(__i386) #define IN_VA_HOLE(va) (__lintzero)
*** 261,272 **** #define GET_PTE(ptr) (mmu.pae_hat ? get_pte64(ptr) : *(x86pte32_t *)(ptr)) #define SET_PTE(ptr, pte) \ ((mmu.pae_hat ? ((x86pte32_t *)(ptr))[1] = (pte >> 32) : 0), \ *(x86pte32_t *)(ptr) = pte) #define CAS_PTE(ptr, x, y) \ ! (mmu.pae_hat ? cas64(ptr, x, y) : \ ! cas32((uint32_t *)(ptr), (uint32_t)(x), (uint32_t)(y))) #endif /* __i386 */ /* * Return a pointer to the pte entry at the given index within a page table. --- 260,271 ---- #define GET_PTE(ptr) (mmu.pae_hat ? get_pte64(ptr) : *(x86pte32_t *)(ptr)) #define SET_PTE(ptr, pte) \ ((mmu.pae_hat ? ((x86pte32_t *)(ptr))[1] = (pte >> 32) : 0), \ *(x86pte32_t *)(ptr) = pte) #define CAS_PTE(ptr, x, y) \ ! (mmu.pae_hat ? atomic_cas_64(ptr, x, y) : \ ! atomic_cas_32((uint32_t *)(ptr), (uint32_t)(x), (uint32_t)(y))) #endif /* __i386 */ /* * Return a pointer to the pte entry at the given index within a page table.