Rev 4267 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4267 | Rev 4448 | ||
|---|---|---|---|
| Line 52... | Line 52... | ||
| 52 | #include <print.h> |
52 | #include <print.h> |
| 53 | #include <errno.h> |
53 | #include <errno.h> |
| 54 | #include <func.h> |
54 | #include <func.h> |
| 55 | #include <string.h> |
55 | #include <string.h> |
| 56 | #include <syscall/copy.h> |
56 | #include <syscall/copy.h> |
| - | 57 | #include <macros.h> |
|
| - | 58 | #include <ipc/event.h> |
|
| 57 | 59 | ||
| 58 | /** Spinlock protecting the tasks_tree AVL tree. */ |
60 | /** Spinlock protecting the tasks_tree AVL tree. */ |
| 59 | SPINLOCK_INITIALIZE(tasks_lock); |
61 | SPINLOCK_INITIALIZE(tasks_lock); |
| 60 | 62 | ||
| 61 | /** AVL tree of active tasks. |
63 | /** AVL tree of active tasks. |
| Line 227... | Line 229... | ||
| 227 | * Drop our reference to the address space. |
229 | * Drop our reference to the address space. |
| 228 | */ |
230 | */ |
| 229 | if (atomic_predec(&t->as->refcount) == 0) |
231 | if (atomic_predec(&t->as->refcount) == 0) |
| 230 | as_destroy(t->as); |
232 | as_destroy(t->as); |
| 231 | 233 | ||
| - | 234 | /* |
|
| - | 235 | * Notify about task destruction. |
|
| - | 236 | */ |
|
| - | 237 | if (event_is_subscribed(EVENT_WAIT)) |
|
| - | 238 | event_notify_2(EVENT_WAIT, LOWER32(t->taskid), UPPER32(t->taskid)); |
|
| - | 239 | ||
| 232 | free(t); |
240 | free(t); |
| 233 | TASK = NULL; |
241 | TASK = NULL; |
| 234 | } |
242 | } |
| 235 | 243 | ||
| 236 | /** Syscall for reading task ID from userspace. |
244 | /** Syscall for reading task ID from userspace. |