Changeset ea7890e7 in mainline for kernel/generic/include/adt/list.h


Ignore:
Timestamp:
2007-06-01T15:47:46Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
07be3c4
Parents:
ff3a34b
Message:

More efficient and simpler task termination.

Based on the assumption, that after its creation, only the task itself can create more threads for itself,
the last thread with userspace context to execute thread_exit() will perform futex and IPC cleanup. When
the task has no threads, it is destroyed. Both the cleanup and destruction is controlled by reference
counting.

As for userspace threads, even though there could be a global garbage collector for joining threads, it is
much simpler if the uinit thread detaches itself before switching to userspace.

task_kill() is now an idempotent operation. It just instructs the threads within a task to exit.

Change in the name of a thread state: Undead → JoinMe.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/adt/list.h

    rff3a34b rea7890e7  
    181181}
    182182
    183 #define list_get_instance(link,type,member) \
     183#define list_get_instance(link, type, member) \
    184184        ((type *)(((uint8_t *)(link)) - ((uint8_t *)&(((type *)NULL)->member))))
    185185
Note: See TracChangeset for help on using the changeset viewer.