Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2453 → Rev 2452

/trunk/kernel/Makefile
38,11 → 38,7
 
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__ -features=extensions \
#-erroff=E_ZERO_SIZED_STRUCT_UNION
 
#SUNCC_CFLAGS = -xO3 -Igeneric/include/ -xnolib -xc99=all -D__FUNCTION__=__func__
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,14 → 73,8
* @param port Port to read from
* @return Value read
*/
static inline uint8_t inb(uint16_t port)
{
uint8_t val;
static inline uint8_t inb(uint16_t port) { uint8_t val; __asm__ volatile ("inb %w1, %b0 \n" : "=a" (val) : "d" (port) ); return val; }
 
asm volatile ("inb %w1, %b0 \n" : "=a" (val) : "d" (port));
return val;
}
 
/** Byte to port
*
* Output byte to port
88,16 → 82,10
* @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.
*