Пример #1
0
Файл: cpu.c Проект: argp/xnu
void
machine_track_platform_idle(boolean_t entry)
{
	if (entry)
		(void)__c11_atomic_fetch_add(&cpu_idle_count, 1, __ATOMIC_RELAXED);
	else
		(void)__c11_atomic_fetch_sub(&cpu_idle_count, 1, __ATOMIC_RELAXED);
}
Пример #2
0
uint32_t
hw_atomic_sub(volatile uint32_t *dest, uint32_t delt)
{
	ALIGN_TEST(dest,uint32_t);
	return __c11_atomic_fetch_sub(ATOMIC_CAST(uint32_t,dest), delt, memory_order_relaxed) - delt;
}