Changeset 22f7769 in mainline for arch/ia32/include/asm.h


Ignore:
Timestamp:
2005-10-17T23:31:41Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4b2c872d
Parents:
75eacab
Message:

Rename cpu_priority_{high|low|restore|read} functions to interrupts_{disable|enable|restore|read}.
Rename pri_t to ipl_t (Interrupt Priority Level).
Rename thread_t::pri to thread_t::priority.

File:
1 edited

Legend:

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

    r75eacab r22f7769  
    132132static inline __u32 inl(__u16 port) { __u32 val; __asm__ volatile ("inl %w1, %l0 \n" : "=a" (val) : "d" (port) ); return val; }
    133133
    134 /** Set priority level low
     134/** Enable interrupts.
    135135 *
    136136 * Enable interrupts and return previous
    137137 * value of EFLAGS.
    138  */
    139 static inline pri_t cpu_priority_low(void) {
    140         pri_t v;
     138 *
     139 * @return Old interrupt priority level.
     140 */
     141static inline ipl_t interrupts_enable(void) {
     142        ipl_t v;
    141143        __asm__ volatile (
    142144                "pushf\n\t"
     
    148150}
    149151
    150 /** Set priority level high
     152/** Disable interrupts.
    151153 *
    152154 * Disable interrupts and return previous
    153155 * value of EFLAGS.
    154  */
    155 static inline pri_t cpu_priority_high(void) {
    156         pri_t v;
     156 *
     157 * @return Old interrupt priority level.
     158 */
     159static inline ipl_t interrupts_disable(void) {
     160        ipl_t v;
    157161        __asm__ volatile (
    158162                "pushf\n\t"
     
    164168}
    165169
    166 /** Restore priority level
     170/** Restore interrupt priority level.
    167171 *
    168172 * Restore EFLAGS.
    169  */
    170 static inline void cpu_priority_restore(pri_t pri) {
     173 *
     174 * @param ipl Saved interrupt priority level.
     175 */
     176static inline void interrupts_restore(ipl_t ipl) {
    171177        __asm__ volatile (
    172178                "pushl %0\n\t"
    173179                "popf\n"
    174                 : : "r" (pri)
    175         );
    176 }
    177 
    178 /** Return raw priority level
    179  *
    180  * Return EFLAFS.
    181  */
    182 static inline pri_t cpu_priority_read(void) {
    183         pri_t v;
     180                : : "r" (ipl)
     181        );
     182}
     183
     184/** Return interrupt priority level.
     185 *
     186 * @return EFLAFS.
     187 */
     188static inline ipl_t interrupts_read(void) {
     189        ipl_t v;
    184190        __asm__ volatile (
    185191                "pushf\n\t"
Note: See TracChangeset for help on using the changeset viewer.