Print this page
5042 stop using deprecated atomic functions
@@ -942,11 +942,11 @@
hat_kmap_init((uintptr_t)segmap_start, size);
}
/*
* On 32 bit PAE mode, PTE's are 64 bits, but ordinary atomic memory references
- * are 32 bit, so for safety we must use cas64() to install these.
+ * are 32 bit, so for safety we must use atomic_cas_64() to install these.
*/
#ifdef __i386
static void
reload_pae32(hat_t *hat, cpu_t *cpu)
{
@@ -965,11 +965,11 @@
for (i = 0; i < VLP_NUM_PTES; ++i) {
for (;;) {
pte = dest[i];
if (pte == src[i])
break;
- if (cas64(dest + i, pte, src[i]) != src[i])
+ if (atomic_cas_64(dest + i, pte, src[i]) != src[i])
break;
}
}
}
#endif
@@ -1986,19 +1986,19 @@
}
#define TLB_CPU_HALTED (01ul)
#define TLB_INVAL_ALL (02ul)
#define CAS_TLB_INFO(cpu, old, new) \
- caslong((ulong_t *)&(cpu)->cpu_m.mcpu_tlb_info, (old), (new))
+ atomic_cas_ulong((ulong_t *)&(cpu)->cpu_m.mcpu_tlb_info, (old), (new))
/*
* Record that a CPU is going idle
*/
void
tlb_going_idle(void)
{
- atomic_or_long((ulong_t *)&CPU->cpu_m.mcpu_tlb_info, TLB_CPU_HALTED);
+ atomic_or_ulong((ulong_t *)&CPU->cpu_m.mcpu_tlb_info, TLB_CPU_HALTED);
}
/*
* Service a delayed TLB flush if coming out of being idle.
* It will be called from cpu idle notification with interrupt disabled.