Ignore:
Timestamp:
2006-09-03T23:37:14Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fd85ae5
Parents:
002e613
Message:

sparc64 update.

  • Prototype userspace layer implementation that at least relates to sparc64 and compiles cleanly.
  • Fixes for kernel's preemptible_handler and code related to running userspace.
  • Enable userspace. Several dozen instructions are now run in userspace! We are pretty near the userspace milestone for sparc64.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/libc/arch/sparc64/src/thread.c

    r002e613 rcfa70add  
    2727 */
    2828
    29 /** @addtogroup libcsparc64     
     29/** @addtogroup libcsparc64 sparc64
     30 * @ingroup lc
    3031 * @{
    3132 */
    3233/** @file
     34 *
    3335 */
    3436
     
    4042 * @param data Start of data section
    4143 * @return pointer to tcb_t structure
    42  *
    4344 */
    4445tcb_t * __alloc_tls(void **data, size_t size)
    4546{
    46         tcb_t *result;
     47        tcb_t *tcb;
     48       
     49        *data = malloc(sizeof(tcb_t) + size);
    4750
    48         result = malloc(sizeof(tcb_t) + size);
    49         *data = ((void *)result) + sizeof(tcb_t);
    50         return result;
     51        tcb = (tcb_t *) (*data + size);
     52        tcb->self = tcb;
     53
     54        return tcb;
    5155}
    5256
    5357void __free_tls_arch(tcb_t *tcb, size_t size)
    5458{
    55         free(tcb);
     59        void *start = ((void *)tcb) - size;
     60        free(start);
    5661}
    5762
Note: See TracChangeset for help on using the changeset viewer.