Changeset 714675b in mainline for arch/ia32/include/asm.h


Ignore:
Timestamp:
2005-09-18T09:14:02Z (20 years ago)
Author:
Sergey Bondari <bondari@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7b43e11
Parents:
a5556b4
Message:

Outb, outw, outl are now inline functions

File:
1 edited

Legend:

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

    ra5556b4 r714675b  
    4242extern __u16 inw(int port);
    4343extern __u32 inl(int port);
    44 
    45 extern void outw(int port, __u16 w);
    46 extern void outl(int port, __u32 l);
    4744
    4845extern void enable_l_apic_in_msr(void);
     
    9390static inline void outb(__u16 port, __u8 val) { __asm__ volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port) ); }
    9491
     92/** Word to port
     93 *
     94 * Output word to port
     95 *
     96 * @param port Port to write to
     97 * @param val Value to write
     98 */
     99static inline void outw(__u16 port, __u16 val) { __asm__ volatile ("outw %w0, %w1\n" : : "a" (val), "d" (port) ); }
     100
     101
     102
     103/** Double word to port
     104 *
     105 * Output double word to port
     106 *
     107 * @param port Port to write to
     108 * @param val Value to write
     109 */
     110static inline void outl(__u16 port, __u32 val) { __asm__ volatile ("outl %l0, %w1\n" : : "a" (val), "d" (port) ); }
    95111
    96112/** Set priority level low
Note: See TracChangeset for help on using the changeset viewer.