Subversion Repositories HelenOS-historic

Rev

Rev 938 | Rev 1078 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 938 Rev 1066
Line 28... Line 28...
28
 
28
 
29
#include <main/uinit.h>
29
#include <main/uinit.h>
30
#include <arch/types.h>
30
#include <arch/types.h>
31
#include <proc/thread.h>
31
#include <proc/thread.h>
32
#include <userspace.h>
32
#include <userspace.h>
-
 
33
#include <mm/slab.h>
33
#include <print.h>
34
#include <print.h>
34
 
35
 
-
 
36
/** Thread used to bring up userspace thread.
-
 
37
 *
-
 
38
 * @param arg Pointer to structure containing userspace entry and stack addresses.
-
 
39
 */
35
void uinit(void *arg)
40
void uinit(void *arg)
36
{
41
{
-
 
42
    uspace_arg_t uarg;
-
 
43
   
-
 
44
    uarg.uspace_entry = ((uspace_arg_t *) arg)->uspace_entry;
37
    printf("USER task, uinit thread: kernel mode\n");
45
    uarg.uspace_stack = ((uspace_arg_t *) arg)->uspace_stack;
-
 
46
 
-
 
47
    free((uspace_arg_t *) arg);
-
 
48
   
38
    userspace((__address)(arg));
49
    userspace(&uarg);
39
}
50
}