Rev 1987 | Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1987 | Rev 2049 | ||
---|---|---|---|
Line 52... | Line 52... | ||
52 | if (t->arch.uspace_window_buffer) { |
52 | if (t->arch.uspace_window_buffer) { |
53 | /* |
53 | /* |
54 | * Mind the possible alignment of the userspace window buffer |
54 | * Mind the possible alignment of the userspace window buffer |
55 | * belonging to a killed thread. |
55 | * belonging to a killed thread. |
56 | */ |
56 | */ |
- | 57 | frame_free(KA2PA(ALIGN_DOWN((uintptr_t) |
|
57 | frame_free(KA2PA(ALIGN_DOWN((uintptr_t) t->arch.uspace_window_buffer, PAGE_SIZE))); |
58 | t->arch.uspace_window_buffer, PAGE_SIZE))); |
58 | } |
59 | } |
59 | } |
60 | } |
60 | 61 | ||
61 | void thread_create_arch(thread_t *t) |
62 | void thread_create_arch(thread_t *t) |
62 | { |
63 | { |
63 | if ((t->flags & THREAD_FLAG_USPACE) && (!t->arch.uspace_window_buffer)) { |
64 | if ((t->flags & THREAD_FLAG_USPACE) && (!t->arch.uspace_window_buffer)) |
- | 65 | { |
|
64 | /* |
66 | /* |
65 | * The thread needs userspace window buffer and the object |
67 | * The thread needs userspace window buffer and the object |
66 | * returned from the slab allocator doesn't have any. |
68 | * returned from the slab allocator doesn't have any. |
67 | */ |
69 | */ |
68 | t->arch.uspace_window_buffer = frame_alloc(ONE_FRAME, FRAME_KA); |
70 | t->arch.uspace_window_buffer = frame_alloc(ONE_FRAME, FRAME_KA); |
Line 71... | Line 73... | ||
71 | 73 | ||
72 | /* |
74 | /* |
73 | * Mind the possible alignment of the userspace window buffer |
75 | * Mind the possible alignment of the userspace window buffer |
74 | * belonging to a killed thread. |
76 | * belonging to a killed thread. |
75 | */ |
77 | */ |
76 | t->arch.uspace_window_buffer = (uint8_t *) ALIGN_DOWN(uw_buf, PAGE_SIZE); |
78 | t->arch.uspace_window_buffer = (uint8_t *) ALIGN_DOWN(uw_buf, |
- | 79 | PAGE_SIZE); |
|
77 | } |
80 | } |
78 | } |
81 | } |
79 | 82 | ||
80 | /** @} |
83 | /** @} |
81 | */ |
84 | */ |