Changeset 361635c in mainline for arch/mips/include/asm.h


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/mips/include/asm.h

    rcfd6efd2 r361635c  
    3030#define __MIPS_ASM_H__
    3131
     32#include <arch/types.h>
     33#include <config.h>
     34
    3235#define cpu_sleep()     ;
    3336
     37/** Return base address of current stack
     38 *
     39 * Return the base address of the current stack.
     40 * The stack is assumed to be STACK_SIZE bytes long.
     41 */
     42static inline __address get_stack_base(void)
     43{
     44        __address v;
     45       
     46        __asm__ volatile ("and %0, $29, %1\n" : "=r" (v) : "r" (~(STACK_SIZE-1)));
     47       
     48        return v;
     49}
     50
    3451#endif
Note: See TracChangeset for help on using the changeset viewer.