Changeset 22f7769 in mainline for arch/amd64/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/amd64/include/asm.h

    r75eacab r22f7769  
    8383}
    8484
    85 /** Set priority level low
     85/** Enable interrupts.
    8686 *
    8787 * Enable interrupts and return previous
    8888 * value of EFLAGS.
    89  */
    90 static inline pri_t cpu_priority_low(void) {
    91         pri_t v;
     89 *
     90 * @return Old interrupt priority level.
     91 */
     92static inline ipl_t interrupts_enable(void) {
     93        ipl_t v;
    9294        __asm__ volatile (
    9395                "pushfq\n"
     
    99101}
    100102
    101 /** Set priority level high
     103/** Disable interrupts.
    102104 *
    103105 * Disable interrupts and return previous
    104106 * value of EFLAGS.
    105  */
    106 static inline pri_t cpu_priority_high(void) {
    107         pri_t v;
     107 *
     108 * @return Old interrupt priority level.
     109 */
     110static inline ipl_t interrupts_disable(void) {
     111        ipl_t v;
    108112        __asm__ volatile (
    109113                "pushfq\n"
     
    115119}
    116120
    117 /** Restore priority level
     121/** Restore interrupt priority level.
    118122 *
    119123 * Restore EFLAGS.
    120  */
    121 static inline void cpu_priority_restore(pri_t pri) {
     124 *
     125 * @param ipl Saved interrupt priority level.
     126 */
     127static inline void interrupts_restore(ipl_t ipl) {
    122128        __asm__ volatile (
    123129                "pushq %0\n"
    124130                "popfq\n"
    125                 : : "r" (pri)
    126                 );
    127 }
    128 
    129 /** Return raw priority level
     131                : : "r" (ipl)
     132                );
     133}
     134
     135/** Return interrupt priority level.
    130136 *
    131137 * Return EFLAFS.
    132  */
    133 static inline pri_t cpu_priority_read(void) {
    134         pri_t v;
     138 *
     139 * @return Current interrupt priority level.
     140 */
     141static inline ipl_t interrupts_read(void) {
     142        ipl_t v;
    135143        __asm__ volatile (
    136144                "pushfq\n"
Note: See TracChangeset for help on using the changeset viewer.