Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/proc/task.h

    r5a5269d rf35749e  
    11/*
     2 * Copyright (c) 2025 Jiri Svoboda
    23 * Copyright (c) 2010 Jakub Jermar
    34 * All rights reserved.
     
    3637#define KERN_TASK_H_
    3738
    38 #include <cpu.h>
    39 #include <ipc/ipc.h>
    40 #include <ipc/event.h>
    41 #include <ipc/kbox.h>
    42 #include <synch/spinlock.h>
    43 #include <synch/mutex.h>
     39#include <abi/proc/task.h>
     40#include <abi/sysinfo.h>
    4441#include <adt/list.h>
    4542#include <adt/odict.h>
    46 #include <security/perm.h>
     43#include <arch/context.h>
     44#include <arch/cpu.h>
     45#include <arch/fpu_context.h>
    4746#include <arch/proc/task.h>
    4847#include <arch/proc/thread.h>
    49 #include <arch/context.h>
    50 #include <arch/fpu_context.h>
    51 #include <arch/cpu.h>
     48#include <arch.h>
     49#include <cap/cap.h>
     50#include <cpu.h>
     51#include <debug/sections.h>
     52#include <ipc/event.h>
     53#include <ipc/ipc.h>
     54#include <ipc/kbox.h>
     55#include <mm/as.h>
    5256#include <mm/tlb.h>
    5357#include <proc/scheduler.h>
     58#include <security/perm.h>
     59#include <synch/mutex.h>
     60#include <synch/spinlock.h>
    5461#include <udebug/udebug.h>
    55 #include <mm/as.h>
    56 #include <abi/proc/task.h>
    57 #include <abi/sysinfo.h>
    58 #include <arch.h>
    59 #include <cap/cap.h>
    6062
    6163#define TASK                 CURRENT->task
     
    8789
    8890        /** Number of references (i.e. threads). */
    89         atomic_t refcount;
     91        atomic_refcount_t refcount;
    9092        /** Number of threads that haven't exited yet. */
    91         atomic_t lifecount;
     93        // TODO: remove
     94        atomic_size_t lifecount;
    9295
    9396        /** Task permissions. */
     
    130133        uint64_t ucycles;
    131134        uint64_t kcycles;
     135
     136        debug_sections_t *debug_sections;
    132137} task_t;
    133138
     
    138143
    139144extern void task_init(void);
    140 extern void task_done(void);
     145extern void task_done(task_t *);
    141146extern task_t *task_create(as_t *, const char *);
    142 extern void task_destroy(task_t *);
    143147extern void task_hold(task_t *);
    144148extern void task_release(task_t *);
Note: See TracChangeset for help on using the changeset viewer.