Ignore:
Timestamp:
2012-04-08T17:53:15Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c5bff3c
Parents:
1b90e90 (diff), f3378ba (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/mips32/include/fibril.h

    r1b90e90 r81716eb  
    3838
    3939#include <sys/types.h>
     40#include <libarch/stack.h>
     41#include <align.h>
    4042
    41 /* We define our own context_set, because we need to set
    42  * the TLS pointer to the tcb+0x7000
     43#define SP_DELTA  (ABI_STACK_FRAME + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
     44
     45/*
     46 * We define our own context_set, because we need to set
     47 * the TLS pointer to the tcb + 0x7000
    4348 *
    4449 * See tls_set in thread.h
    4550 */
    46 #define context_set(c, _pc, stack, size, ptls)                  \
    47         (c)->pc = (sysarg_t) (_pc);                             \
    48         (c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA;     \
    49         (c)->tls = ((sysarg_t)(ptls)) + 0x7000 + sizeof(tcb_t);
    50 
    51 
    52 /* +16 is just for sure that the called function
    53  * have space to store it's arguments
    54  */
    55 #define SP_DELTA        (8+16)
     51#define context_set(c, _pc, stack, size, ptls) \
     52        do { \
     53                (c)->pc = (sysarg_t) (_pc); \
     54                (c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \
     55                (c)->tls = ((sysarg_t)(ptls)) + 0x7000 + sizeof(tcb_t); \
     56        } while (0)
    5657
    5758typedef struct  {
Note: See TracChangeset for help on using the changeset viewer.