Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2452 → Rev 2453

/trunk/kernel/Makefile
38,7 → 38,11
 
DEFS = -D$(ARCH) -DARCH=\"$(ARCH)\" -DRELEASE=\"$(RELEASE)\" "-DNAME=\"$(NAME)\"" -DKERNEL
CFLAGS = -fno-builtin -fomit-frame-pointer -Wall -Wmissing-prototypes -Werror -O3 -nostdlib -nostdinc -Igeneric/include/
#SUNCC_CFLAGS = -xO3 -Igeneric/include/ -xnolib -xc99=all -D__FUNCTION__=__func__
 
#SUNCC_CFLAGS = -xO3 -Igeneric/include/ -xnolib -xc99=all \
#-D__FUNCTION__=__func__ -features=extensions \
#-erroff=E_ZERO_SIZED_STRUCT_UNION
 
LFLAGS = -M
AFLAGS =
 
/trunk/kernel/arch/amd64/include/asm.h
58,12 → 58,12
static inline void cpu_sleep(void)
{
asm volatile ("hlt\n");
};
}
 
static inline void cpu_halt(void)
{
asm volatile ("hlt\n");
};
}
 
 
/** Byte from port
73,8 → 73,14
* @param port Port to read from
* @return Value read
*/
static inline uint8_t inb(uint16_t port) { uint8_t val; __asm__ volatile ("inb %w1, %b0 \n" : "=a" (val) : "d" (port) ); return val; }
static inline uint8_t inb(uint16_t port)
{
uint8_t val;
 
asm volatile ("inb %w1, %b0 \n" : "=a" (val) : "d" (port));
return val;
}
 
/** Byte to port
*
* Output byte to port
82,10 → 88,16
* @param port Port to write to
* @param val Value to write
*/
static inline void outb(uint16_t port, uint8_t val) { __asm__ volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port) ); }
static inline void outb(uint16_t port, uint8_t val)
{
asm volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port));
}
 
/** Swap Hidden part of GS register with visible one */
static inline void swapgs(void) { __asm__ volatile("swapgs"); }
static inline void swapgs(void)
{
asm volatile("swapgs");
}
 
/** Enable interrupts.
*