Changeset 5b61171 in mainline for uspace/lib/c
- Timestamp:
- 2018-03-13T21:08:52Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 948222e4
- Parents:
- b127e4af
- Location:
- uspace/lib/c/arch/riscv64
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/riscv64/include/libarch/fibril.h
rb127e4af r5b61171 37 37 38 38 #include <stdint.h> 39 #include <libarch/fibril_context.h> 39 40 40 41 #define SP_DELTA 0 … … 44 45 (ctx)->pc = (uintptr_t) (_pc); \ 45 46 (ctx)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA; \ 46 (ctx)->fp = 0; \ 47 (ctx)->tls = ((uintptr_t) (ptls)) + sizeof(tcb_t); \ 47 (ctx)->x4 = ((uintptr_t) (ptls)) + sizeof(tcb_t); \ 48 48 } while (0) 49 50 /*51 * This stores the registers which need to be52 * preserved across function calls.53 */54 typedef struct {55 uintptr_t sp;56 uintptr_t fp;57 uintptr_t pc;58 uintptr_t tls;59 } context_t;60 49 61 50 static inline uintptr_t _context_get_fp(context_t *ctx) 62 51 { 63 / * This function returns the frame pointer. */64 return ctx->fp;52 // FIXME: No frame pointer in the standard ABI. 53 return 0; 65 54 } 66 55 -
uspace/lib/c/arch/riscv64/src/fibril.c
rb127e4af r5b61171 30 30 */ 31 31 32 #include < fibril.h>32 #include <setjmp.h> 33 33 #include <stdbool.h> 34 34
Note:
See TracChangeset
for help on using the changeset viewer.