#ifndef __ARCH_OPS_H
#define __ARCH_OPS_H

#if defined(__cplusplus)
extern "C" {
#endif

void arch_enable_ints();
int arch_disable_ints();
int arch_restore_ints(int state);

int atomic_swap(volatile int *ptr, int val);
int atomic_add(volatile int *ptr, int val);
int atomic_and(volatile int *ptr, int val);
int atomic_or(volatile int *ptr, int val);

void arch_flush_i_cache();
void arch_flush_d_cache();

void arch_idle();

#if defined(__cplusplus)
}
#endif

#endif
