Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2445 → Rev 2446

/trunk/kernel/generic/include/proc/task.h
64,8 → 64,6
SPINLOCK_DECLARE(lock);
char *name;
/** Pointer to the main thread. */
struct thread *main_thread;
/** List of threads contained in this task. */
link_t th_head;
/** Address space. */
75,10 → 73,10
/** Task security context. */
context_id_t context;
 
/** If this is true, new threads can become part of the task. */
bool accept_new_threads;
/** Number of references (i.e. threads). */
count_t refcount;
atomic_t refcount;
/** Number of threads that haven't exited yet. */
atomic_t lifecount;
 
/** Task capabilities. */
cap_t capabilities;
122,7 → 120,6
extern void cap_set(task_t *t, cap_t caps);
extern cap_t cap_get(task_t *t);
 
 
#ifndef task_create_arch
extern void task_create_arch(task_t *t);
#endif
/trunk/kernel/generic/include/proc/thread.h
1,5 → 1,5
/*
* Copyright (c) 2001-2004 Jakub Jermar
* Copyright (c) 2001-2007 Jakub Jermar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
40,6 → 40,7
#include <time/timeout.h>
#include <cpu.h>
#include <synch/rwlock.h>
#include <synch/spinlock.h>
#include <adt/btree.h>
#include <mm/slab.h>
#include <arch/cpu.h>
80,17 → 81,10
Entering,
/** After a thread calls thread_exit(), it is put into Exiting state. */
Exiting,
/** Threads that were not detached but exited are in the Undead state. */
Undead
/** Threads that were not detached but exited are in the JoinMe state. */
JoinMe
} state_t;
 
/** Join types. */
typedef enum {
None,
TaskClnp, /**< The thread will be joined by ktaskclnp thread. */
TaskGC /**< The thread will be joined by ktaskgc thread. */
} thread_join_type_t;
 
/** Thread structure. There is one per thread. */
typedef struct thread {
link_t rq_link; /**< Run queue link. */
152,12 → 146,12
*/
bool interrupted;
/** Who joinins the thread. */
thread_join_type_t join_type;
/** If true, thread_join_timeout() cannot be used on this thread. */
bool detached;
/** Waitq for thread_join_timeout(). */
waitq_t join_wq;
/** Link used in the joiner_head list. */
link_t joiner_link;
 
fpu_context_t *saved_fpu_context;
int fpu_context_exists;
/trunk/kernel/generic/include/adt/list.h
180,7 → 180,7
headless_list_split_or_concat(part1, part2);
}
 
#define list_get_instance(link,type,member) \
#define list_get_instance(link, type, member) \
((type *)(((uint8_t *)(link)) - ((uint8_t *)&(((type *)NULL)->member))))
 
extern bool list_member(const link_t *link, const link_t *head);