Changeset f2ffad4 in mainline for src/proc/thread.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/thread.c

    rea3fb2e rf2ffad4  
    4949#include <arch/interrupt.h>
    5050#include <smp/ipi.h>
     51#include <arch/faddr.h>
    5152
    5253char *thread_states[] = {"Invalid", "Running", "Sleeping", "Ready", "Entering", "Exiting"};
     
    165166               
    166167                context_save(&t->saved_context);
    167                 t->saved_context.pc = (__address) cushion;
     168                t->saved_context.pc = FADDR(cushion);
    168169                t->saved_context.sp = (__address) &t->kstack[THREAD_STACK_SIZE-8];
    169170
Note: See TracChangeset for help on using the changeset viewer.