Changeset a5c78a18 in mainline for uspace/lib/c/arch/ia32/src/fibril.S


Ignore:
Timestamp:
2019-02-03T14:35:44Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b4f1171
Parents:
67ca359
Message:

Rename context_t to context_t

<libarch/fibril_context.h> is included from <setjmp.h> where it can interfere
with identifiers used in third-party code.
The simplest solution here is just to prefix the names with double underscore
which is reserved for use by the implementation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/ia32/src/fibril.S

    r67ca359 ra5c78a18  
    4242
    4343        # save registers to the context structure
    44         movl %esp, CONTEXT_OFFSET_SP(%edx)      # %esp -> ctx->sp
    45         movl %eax, CONTEXT_OFFSET_PC(%edx)      # %eip -> ctx->pc
    46         movl %ebx, CONTEXT_OFFSET_EBX(%edx)     # %ebx -> ctx->ebx
    47         movl %esi, CONTEXT_OFFSET_ESI(%edx)     # %esi -> ctx->esi
    48         movl %edi, CONTEXT_OFFSET_EDI(%edx)     # %edi -> ctx->edi
    49         movl %ebp, CONTEXT_OFFSET_EBP(%edx)     # %ebp -> ctx->ebp
     44        movl %esp, __CONTEXT_OFFSET_SP(%edx)    # %esp -> ctx->sp
     45        movl %eax, __CONTEXT_OFFSET_PC(%edx)    # %eip -> ctx->pc
     46        movl %ebx, __CONTEXT_OFFSET_EBX(%edx)   # %ebx -> ctx->ebx
     47        movl %esi, __CONTEXT_OFFSET_ESI(%edx)   # %esi -> ctx->esi
     48        movl %edi, __CONTEXT_OFFSET_EDI(%edx)   # %edi -> ctx->edi
     49        movl %ebp, __CONTEXT_OFFSET_EBP(%edx)   # %ebp -> ctx->ebp
    5050
    5151        # save TLS
    5252        movl %gs:0, %eax
    53         movl %eax, CONTEXT_OFFSET_TLS(%edx)     # tls -> ctx->tls
     53        movl %eax, __CONTEXT_OFFSET_TLS(%edx)   # tls -> ctx->tls
    5454
    5555        xorl %eax, %eax         # __setjmp returns 0
     
    6767
    6868        # restore registers from the context structure
    69         movl CONTEXT_OFFSET_SP(%eax),%esp       # ctx->sp -> %esp
    70         movl CONTEXT_OFFSET_PC(%eax),%edx       # ctx->pc -> \pc
    71         movl CONTEXT_OFFSET_EBX(%eax),%ebx      # ctx->ebx -> %ebx
    72         movl CONTEXT_OFFSET_ESI(%eax),%esi      # ctx->esi -> %esi
    73         movl CONTEXT_OFFSET_EDI(%eax),%edi      # ctx->edi -> %edi
    74         movl CONTEXT_OFFSET_EBP(%eax),%ebp      # ctx->ebp -> %ebp
     69        movl __CONTEXT_OFFSET_SP(%eax),%esp     # ctx->sp -> %esp
     70        movl __CONTEXT_OFFSET_PC(%eax),%edx     # ctx->pc -> \pc
     71        movl __CONTEXT_OFFSET_EBX(%eax),%ebx    # ctx->ebx -> %ebx
     72        movl __CONTEXT_OFFSET_ESI(%eax),%esi    # ctx->esi -> %esi
     73        movl __CONTEXT_OFFSET_EDI(%eax),%edi    # ctx->edi -> %edi
     74        movl __CONTEXT_OFFSET_EBP(%eax),%ebp    # ctx->ebp -> %ebp
    7575
    7676        movl %edx, 0(%esp)  # ctx->pc -> saver's return %eip
    7777
    7878        # set thread local storage
    79         movl CONTEXT_OFFSET_TLS(%eax), %edx     # Set arg1 to TLS addr
     79        movl __CONTEXT_OFFSET_TLS(%eax), %edx   # Set arg1 to TLS addr
    8080        movl %edx, %gs:0
    8181
Note: See TracChangeset for help on using the changeset viewer.