Changeset f4f866c in mainline for kernel/generic/include/proc


Ignore:
Timestamp:
2010-04-23T21:42:26Z (16 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6c39a907
Parents:
38aaacc2 (diff), 80badbe (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

Location:
kernel/generic/include/proc
Files:
2 edited

Legend:

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

    r38aaacc2 rf4f866c  
    5656#include <ipc/kbox.h>
    5757#include <mm/as.h>
    58 
    59 #define TASK_NAME_BUFLEN        20
     58#include <sysinfo/abi.h>
    6059
    6160struct thread;
     
    8180        task_id_t taskid;
    8281        /** Task security context. */
    83         context_id_t context;   
     82        context_id_t context;
    8483
    8584        /** Number of references (i.e. threads). */
     
    8988
    9089        /** Task capabilities. */
    91         cap_t capabilities;     
     90        cap_t capabilities;
    9291
    9392        /* IPC stuff */
    9493        answerbox_t answerbox;  /**< Communication endpoint */
    9594        phone_t phones[IPC_MAX_PHONES];
     95        stats_ipc_t ipc_info;   /**< IPC statistics */
    9696        /**
    9797         * Active asynchronous messages. It is used for limiting uspace to
     
    119119        mutex_t futexes_lock;
    120120        /** B+tree of futexes referenced by this task. */
    121         btree_t futexes;       
     121        btree_t futexes;
    122122       
    123123        /** Accumulated accounting. */
    124         uint64_t cycles;
     124        uint64_t ucycles;
     125        uint64_t kcycles;
    125126} task_t;
    126127
     
    134135extern task_t *task_find_by_id(task_id_t id);
    135136extern int task_kill(task_id_t id);
    136 extern uint64_t task_get_accounting(task_t *t);
     137extern void task_get_accounting(task_t *t, uint64_t *ucycles, uint64_t *kcycles);
    137138extern void task_print_list(void);
    138139
  • kernel/generic/include/proc/thread.h

    r38aaacc2 rf4f866c  
    4848#include <proc/uarg.h>
    4949#include <udebug/udebug.h>
     50#include <sysinfo/abi.h>
    5051
    5152#define THREAD_STACK_SIZE       STACK_SIZE
     
    6970#define THREAD_FLAG_NOATTACH    (1 << 3)
    7071
    71 /** Thread states. */
    72 typedef enum {
    73         /** It is an error, if thread is found in this state. */
    74         Invalid,
    75         /** State of a thread that is currently executing on some CPU. */
    76         Running,
    77         /** Thread in this state is waiting for an event. */
    78         Sleeping,
    79         /** State of threads in a run queue. */
    80         Ready,
    81         /** Threads are in this state before they are first readied. */
    82         Entering,
    83         /** After a thread calls thread_exit(), it is put into Exiting state. */
    84         Exiting,
    85         /** Threads that were not detached but exited are Lingering. */
    86         Lingering
    87 } state_t;
    88 
    8972/** Thread structure. There is one per thread. */
    9073typedef struct thread {
     
    189172       
    190173        /** Thread accounting. */
    191         uint64_t cycles;
     174        uint64_t ucycles;
     175        uint64_t kcycles;
    192176        /** Last sampled cycle. */
    193177        uint64_t last_cycle;
     
    252236extern void thread_print_list(void);
    253237extern void thread_destroy(thread_t *);
    254 extern void thread_update_accounting(void);
     238extern thread_t *thread_find_by_id(thread_id_t);
     239extern void thread_update_accounting(bool);
    255240extern bool thread_exists(thread_t *);
    256241
Note: See TracChangeset for help on using the changeset viewer.