Changeset 361635c in mainline for arch/ia32


Ignore:
Timestamp:
2005-08-25T20:58:07Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fde6429
Parents:
cfd6efd2
Message:

Preparations for weaker preemption model.
Make all kernel stacks (i.e. startup, scheduler and thread) be STACK_SIZE bytes long.
Reincarnate "the" structure. This time, it is planned to be located at the base of each and every kernel stack.
On IA-32 and MIPS, implement get_stack_base() functions. On the rest of supported platforms, define it to be dummy.

File:
1 edited

Legend:

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

    rcfd6efd2 r361635c  
    3535#include <synch/spinlock.h>
    3636#include <arch/boot/memmap.h>
     37#include <config.h>
    3738
    3839extern __u32 interrupt_handler_size;
     
    157158}
    158159
     160/** Return base address of current stack
     161 *
     162 * Return the base address of the current stack.
     163 * The stack is assumed to be STACK_SIZE bytes long.
     164 */
     165static inline __address get_stack_base(void)
     166{
     167        __address v;
     168       
     169        __asm__ volatile ("andl %%esp, %0\n" : "=r" (v) : "0" (~(STACK_SIZE-1)));
     170       
     171        return v;
     172}
     173
    159174#endif
Note: See TracChangeset for help on using the changeset viewer.