Changeset f2ffad4 in mainline for src/proc/scheduler.c


Ignore:
Timestamp:
2005-05-12T20:37:03Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
da79d0fd
Parents:
ea3fb2e
Message:

For each architecture, add function/macro FADDR that calculates absolute address of a function referenced by void (* f)(void).
IA-32 and MIPS gcc's use direct addressing (f == FADDR(f)) while IA-64 gcc uses indirect addressing (f != FADDR(f)).

Tweaks in IA-64 Makefile.inc to declare constant gp and main Makefile to consider ASFLAGS when compiling .s targets.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/proc/scheduler.c

    rea3fb2e rf2ffad4  
    4242#include <mm/page.h>
    4343#include <synch/spinlock.h>
     44#include <arch/faddr.h>
    4445
    4546#ifdef __SMP__
     
    233234        context_save(&CPU->saved_context);
    234235        CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-8];
    235         CPU->saved_context.pc = (__address) scheduler_separated_stack;
     236        CPU->saved_context.pc = FADDR(scheduler_separated_stack);
    236237        context_restore(&CPU->saved_context);
    237238        /* not reached */
Note: See TracChangeset for help on using the changeset viewer.