30 lines
1014 B
C
30 lines
1014 B
C
//----------------------------------------------------------------------------//
|
|
// GNU GPL OS/K //
|
|
// //
|
|
// Authors: spectral` //
|
|
// NeoX //
|
|
// //
|
|
// Desc: Atomic stuff //
|
|
//----------------------------------------------------------------------------//
|
|
|
|
#ifndef _KALCOMM_ATOMIC_H
|
|
#define _KALCOMM_ATOMIC_H
|
|
|
|
#ifndef _KALCOMM_COMMON_H
|
|
#error "don't include common/types.h without common/common.h"
|
|
#endif
|
|
|
|
// atomic_t defined in common/types.h
|
|
|
|
#ifdef _KALEID_KERNEL
|
|
|
|
// only available in the kernel
|
|
#define cli() asm volatile ("cli")
|
|
#define sti() asm volatile ("sti")
|
|
#define hlt() asm volatile ("hlt")
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|