Changeset ef1eab7 in mainline for kernel/generic/include


Ignore:
Timestamp:
2018-11-03T21:36:39Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
aab5e46
Parents:
ad2cf04
Message:

Replace AVL trees in kernel with ordered dictionary.

Location:
kernel/generic/include
Files:
1 deleted
2 edited

Legend:

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

    rad2cf04 ref1eab7  
    4444#include <synch/futex.h>
    4545#include <synch/workqueue.h>
    46 #include <adt/avl.h>
    4746#include <adt/btree.h>
    4847#include <adt/cht.h>
    4948#include <adt/list.h>
     49#include <adt/odict.h>
    5050#include <security/perm.h>
    5151#include <arch/proc/task.h>
     
    7070/** Task structure. */
    7171typedef struct task {
    72         /** Task's linkage for the tasks_tree AVL tree. */
    73         avltree_node_t tasks_tree_node;
     72        /** Link to @c tasks ordered dictionary */
     73        odlink_t ltasks;
    7474
    7575        /** Task lock.
     
    146146} task_t;
    147147
     148/** Synchronize access to @c tasks */
    148149IRQ_SPINLOCK_EXTERN(tasks_lock);
    149 extern avltree_t tasks_tree;
     150/** Ordered dictionary of all tasks by ID (of task_t structures) */
     151extern odict_t tasks;
    150152
    151153extern void task_init(void);
  • kernel/generic/include/proc/thread.h

    rad2cf04 ref1eab7  
    4242#include <synch/spinlock.h>
    4343#include <synch/rcu_types.h>
    44 #include <adt/avl.h>
     44#include <adt/odict.h>
    4545#include <mm/slab.h>
    4646#include <arch/cpu.h>
     
    7575        link_t th_link;  /**< Links to threads within containing task. */
    7676
    77         /** Threads linkage to the threads_tree. */
    78         avltree_node_t threads_tree_node;
     77        /** Link to @c threads ordered dictionary. */
     78        odlink_t lthreads;
    7979
    8080        /** Lock protecting thread structure.
     
    224224} thread_t;
    225225
    226 /** Thread list lock.
    227  *
    228  * This lock protects the threads_tree.
    229  * Must be acquired before T.lock for each T of type thread_t.
    230  *
    231  */
    232226IRQ_SPINLOCK_EXTERN(threads_lock);
    233 
    234 /** AVL tree containing all threads. */
    235 extern avltree_t threads_tree;
     227extern odict_t threads;
    236228
    237229extern void thread_init(void);
Note: See TracChangeset for help on using the changeset viewer.