Changeset a5556b4 in mainline for arch/ia32/include/asm.h


Ignore:
Timestamp:
2005-09-17T21:24:40Z (19 years ago)
Author:
Sergey Bondari <bondari@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
714675b
Parents:
6799505
Message:

outb inline function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/include/asm.h

    r6799505 ra5556b4  
    4343extern __u32 inl(int port);
    4444
    45 extern void outb(int port, __u8 b);
    4645extern void outw(int port, __u16 w);
    4746extern void outl(int port, __u32 l);
     
    8483 */
    8584static inline __u32 read_cr3(void) { __u32 v; __asm__ volatile ("movl %%cr3,%0\n" : "=r" (v)); return v; }
     85
     86/** Byte to port
     87 *
     88 * Output byte to port
     89 *
     90 * @param port Port to write to
     91 * @param val Value to write
     92 */
     93static inline void outb(__u16 port, __u8 val) { __asm__ volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port) ); }
     94
    8695
    8796/** Set priority level low
     
    167176}
    168177
     178
    169179#endif
Note: See TracChangeset for help on using the changeset viewer.