Changeset 9f52563 in mainline for generic/src/main/uinit.c


Ignore:
Timestamp:
2006-03-17T01:34:36Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8a0b0669
Parents:
5fceec7
Message:

Support for user space threads.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/main/uinit.c

    r5fceec7 r9f52563  
    3131#include <proc/thread.h>
    3232#include <userspace.h>
     33#include <mm/slab.h>
    3334#include <print.h>
    3435
     36/** Thread used to bring up userspace thread.
     37 *
     38 * @param arg Pointer to structure containing userspace entry and stack addresses.
     39 */
    3540void uinit(void *arg)
    3641{
    37         printf("USER task, uinit thread: kernel mode\n");
    38         userspace((__address)(arg));
     42        uspace_arg_t uarg;
     43       
     44        uarg.uspace_entry = ((uspace_arg_t *) arg)->uspace_entry;
     45        uarg.uspace_stack = ((uspace_arg_t *) arg)->uspace_stack;
     46
     47        free((uspace_arg_t *) arg);
     48       
     49        userspace(&uarg);
    3950}
Note: See TracChangeset for help on using the changeset viewer.