Subversion Repositories HelenOS

Rev

Rev 1816 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1816 Rev 1817
Line 152... Line 152...
152
 *
152
 *
153
 * @return Old interrupt priority level.
153
 * @return Old interrupt priority level.
154
 */
154
 */
155
static inline ipl_t interrupts_enable(void)
155
static inline ipl_t interrupts_enable(void)
156
{
156
{
157
    ipl_t v;
157
    ipl_t v = 0;
158
    __asm__ volatile (
158
/*  __asm__ volatile (
159
        "pushf\n\t"
159
        "pushf\n\t"
160
        "popl %0\n\t"
160
        "popl %0\n\t"
161
        "sti\n"
161
        "sti\n"
162
        : "=r" (v)
162
        : "=r" (v)
163
    );
163
    );*/
164
    return v;
164
    return v;
165
}
165
}
166
 
166
 
167
/** Disable interrupts.
167
/** Disable interrupts.
168
 *
168
 *
Line 171... Line 171...
171
 *
171
 *
172
 * @return Old interrupt priority level.
172
 * @return Old interrupt priority level.
173
 */
173
 */
174
static inline ipl_t interrupts_disable(void)
174
static inline ipl_t interrupts_disable(void)
175
{
175
{
176
    ipl_t v;
176
    ipl_t v = 0;
177
    __asm__ volatile (
177
/*  __asm__ volatile (
178
        "pushf\n\t"
178
        "pushf\n\t"
179
        "popl %0\n\t"
179
        "popl %0\n\t"
180
        "cli\n"
180
        "cli\n"
181
        : "=r" (v)
181
        : "=r" (v)
182
    );
182
    );*/
183
    return v;
183
    return v;
184
}
184
}
185
 
185
 
186
/** Restore interrupt priority level.
186
/** Restore interrupt priority level.
187
 *
187
 *
Line 189... Line 189...
189
 *
189
 *
190
 * @param ipl Saved interrupt priority level.
190
 * @param ipl Saved interrupt priority level.
191
 */
191
 */
192
static inline void interrupts_restore(ipl_t ipl)
192
static inline void interrupts_restore(ipl_t ipl)
193
{
193
{
194
    __asm__ volatile (
194
/*  __asm__ volatile (
195
        "pushl %0\n\t"
195
        "pushl %0\n\t"
196
        "popf\n"
196
        "popf\n"
197
        : : "r" (ipl)
197
        : : "r" (ipl)
198
    );
198
    );*/
199
}
199
}
200
 
200
 
201
/** Return interrupt priority level.
201
/** Return interrupt priority level.
202
 *
202
 *
203
 * @return EFLAFS.
203
 * @return EFLAFS.
204
 */
204
 */
205
static inline ipl_t interrupts_read(void)
205
static inline ipl_t interrupts_read(void)
206
{
206
{
207
    ipl_t v;
207
    ipl_t v = 0;
208
    __asm__ volatile (
208
/*  __asm__ volatile (
209
        "pushf\n\t"
209
        "pushf\n\t"
210
        "popl %0\n"
210
        "popl %0\n"
211
        : "=r" (v)
211
        : "=r" (v)
212
    );
212
    );*/
213
    return v;
213
    return v;
214
}
214
}
215
 
215
 
216
/** Return base address of current stack
216
/** Return base address of current stack
217
 *
217
 *